diff --git a/compiler/rustc_codegen_llvm/src/type_of.rs b/compiler/rustc_codegen_llvm/src/type_of.rs index a02601eb43e..5df78e253d4 100644 --- a/compiler/rustc_codegen_llvm/src/type_of.rs +++ b/compiler/rustc_codegen_llvm/src/type_of.rs @@ -4,6 +4,7 @@ use crate::type_::Type; use rustc_codegen_ssa::traits::*; use rustc_middle::bug; use rustc_middle::ty::layout::{FnAbiExt, TyAndLayout}; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, Ty, TypeFoldable}; use rustc_target::abi::{Abi, AddressSpace, Align, FieldsShape}; use rustc_target::abi::{Int, Pointer, F32, F64}; @@ -57,7 +58,7 @@ fn uncached_llvm_type<'a, 'tcx>( ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str if !cx.sess().fewer_names() => { - let mut name = layout.ty.to_string(); + let mut name = with_no_trimmed_paths(|| layout.ty.to_string()); if let (&ty::Adt(def, _), &Variants::Single { index }) = (&layout.ty.kind, &layout.variants) { diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 6eb80157239..d448fa165e0 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -16,6 +16,7 @@ use rustc_middle::mir; use rustc_middle::mir::interpret::{AllocId, ConstValue, Pointer, Scalar}; use rustc_middle::mir::AssertKind; use rustc_middle::ty::layout::{FnAbiExt, HasTyCtxt}; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, Instance, Ty, TypeFoldable}; use rustc_span::source_map::Span; use rustc_span::{sym, Symbol}; @@ -479,14 +480,16 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { UninitValid => !layout.might_permit_raw_init(bx, /*zero:*/ false).unwrap(), }; if do_panic { - let msg_str = if layout.abi.is_uninhabited() { - // Use this error even for the other intrinsics as it is more precise. - format!("attempted to instantiate uninhabited type `{}`", ty) - } else if intrinsic == ZeroValid { - format!("attempted to zero-initialize type `{}`, which is invalid", ty) - } else { - format!("attempted to leave type `{}` uninitialized, which is invalid", ty) - }; + let msg_str = with_no_trimmed_paths(|| { + if layout.abi.is_uninhabited() { + // Use this error even for the other intrinsics as it is more precise. + format!("attempted to instantiate uninhabited type `{}`", ty) + } else if intrinsic == ZeroValid { + format!("attempted to zero-initialize type `{}`, which is invalid", ty) + } else { + format!("attempted to leave type `{}` uninitialized, which is invalid", ty) + } + }); let msg = bx.const_str(Symbol::intern(&msg_str)); let location = self.get_caller_location(bx, span).immediate(); diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 0d8332a20ae..d989d0041c5 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -34,7 +34,7 @@ use rustc_save_analysis as save; use rustc_save_analysis::DumpHandler; use rustc_serialize::json::{self, ToJson}; use rustc_session::config::nightly_options; -use rustc_session::config::{ErrorOutputType, Input, OutputType, PrintRequest}; +use rustc_session::config::{ErrorOutputType, Input, OutputType, PrintRequest, TrimmedDefPaths}; use rustc_session::getopts; use rustc_session::lint::{Lint, LintId}; use rustc_session::{config, DiagnosticOutput, Session}; @@ -159,7 +159,10 @@ pub fn run_compiler( None => return Ok(()), }; - let sopts = config::build_session_options(&matches); + let sopts = config::Options { + trimmed_def_paths: TrimmedDefPaths::GoodPath, + ..config::build_session_options(&matches) + }; let cfg = interface::parse_cfgspecs(matches.opt_strs("cfg")); let mut dummy_config = |sopts, cfg, diagnostic_output| { diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index ada8dc90494..dc4fa807f78 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -518,6 +518,7 @@ fn test_debugging_options_tracking_hash() { untracked!(time_llvm_passes, true); untracked!(time_passes, true); untracked!(trace_macros, true); + untracked!(trim_diagnostic_paths, false); untracked!(ui_testing, true); untracked!(unpretty, Some("expanded".to_string())); untracked!(unstable_options, true); diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index a6784ffffcd..d1f50e1e84d 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -31,6 +31,7 @@ use rustc_middle::lint::LintDiagnosticBuilder; use rustc_middle::middle::privacy::AccessLevels; use rustc_middle::middle::stability; use rustc_middle::ty::layout::{LayoutError, TyAndLayout}; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, print::Printer, subst::GenericArg, Ty, TyCtxt}; use rustc_session::lint::{add_elided_lifetime_in_path_suggestion, BuiltinLintDiagnostics}; use rustc_session::lint::{FutureIncompatibleInfo, Level, Lint, LintBuffer, LintId}; @@ -795,10 +796,12 @@ impl<'tcx> LateContext<'tcx> { } // This shouldn't ever be needed, but just in case: - Ok(vec![match trait_ref { - Some(trait_ref) => Symbol::intern(&format!("{:?}", trait_ref)), - None => Symbol::intern(&format!("<{}>", self_ty)), - }]) + with_no_trimmed_paths(|| { + Ok(vec![match trait_ref { + Some(trait_ref) => Symbol::intern(&format!("{:?}", trait_ref)), + None => Symbol::intern(&format!("<{}>", self_ty)), + }]) + }) } fn path_append_impl( @@ -812,12 +815,16 @@ impl<'tcx> LateContext<'tcx> { // This shouldn't ever be needed, but just in case: path.push(match trait_ref { - Some(trait_ref) => Symbol::intern(&format!( - "", - trait_ref.print_only_trait_path(), - self_ty - )), - None => Symbol::intern(&format!("", self_ty)), + Some(trait_ref) => with_no_trimmed_paths(|| { + Symbol::intern(&format!( + "", + trait_ref.print_only_trait_path(), + self_ty + )) + }), + None => { + with_no_trimmed_paths(|| Symbol::intern(&format!("", self_ty))) + } }); Ok(path) diff --git a/compiler/rustc_macros/src/query.rs b/compiler/rustc_macros/src/query.rs index c17d5311e8f..95096ef3fc4 100644 --- a/compiler/rustc_macros/src/query.rs +++ b/compiler/rustc_macros/src/query.rs @@ -392,7 +392,7 @@ fn add_query_description_impl( #tcx: TyCtxt<'tcx>, #key: #arg, ) -> Cow<'static, str> { - format!(#desc).into() + ::rustc_middle::ty::print::with_no_trimmed_paths(|| format!(#desc).into()) } }; diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index b32eebbb11e..27658d50d45 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -13,6 +13,7 @@ use rustc_hir as hir; use rustc_hir::def::DefKind; use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX}; use rustc_hir::{self, HirId}; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_session::lint::builtin::{DEPRECATED, DEPRECATED_IN_FUTURE, SOFT_UNSTABLE}; use rustc_session::lint::{BuiltinLintDiagnostics, Lint, LintBuffer}; use rustc_session::parse::feature_err_issue; @@ -308,7 +309,7 @@ impl<'tcx> TyCtxt<'tcx> { // #[rustc_deprecated] however wants to emit down the whole // hierarchy. if !skip || depr_entry.attr.is_since_rustc_version { - let path = &self.def_path_str(def_id); + let path = &with_no_trimmed_paths(|| self.def_path_str(def_id)); let kind = self.def_kind(def_id).descr(def_id); let (message, lint) = deprecation_message(&depr_entry.attr, kind, path); late_report_deprecation( diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs index 0dc3d6e344a..c7e32dd0708 100644 --- a/compiler/rustc_middle/src/mir/interpret/mod.rs +++ b/compiler/rustc_middle/src/mir/interpret/mod.rs @@ -108,6 +108,7 @@ use rustc_data_structures::sync::{HashMapExt, Lock}; use rustc_data_structures::tiny_list::TinyList; use rustc_hir::def_id::DefId; use rustc_macros::HashStable; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_serialize::{Decodable, Encodable}; use rustc_target::abi::{Endian, Size}; @@ -145,7 +146,7 @@ pub struct GlobalId<'tcx> { impl GlobalId<'tcx> { pub fn display(self, tcx: TyCtxt<'tcx>) -> String { - let instance_name = tcx.def_path_str(self.instance.def.def_id()); + let instance_name = with_no_trimmed_paths(|| tcx.def_path_str(self.instance.def.def_id())); if let Some(promoted) = self.promoted { format!("{}::{:?}", instance_name, promoted) } else { diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index e05752f08f6..719f0322fd7 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1255,6 +1255,11 @@ rustc_queries! { storage(ArenaCacheSelector<'tcx>) desc { "calculating the visible parent map" } } + query trimmed_def_paths(_: CrateNum) + -> FxHashMap { + storage(ArenaCacheSelector<'tcx>) + desc { "calculating trimmed def paths" } + } query missing_extern_crate_item(_: CrateNum) -> bool { eval_always desc { "seeing if we're missing an `extern crate` item for this crate" } diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 18ae744cb1e..6f157373de1 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -943,7 +943,7 @@ pub struct GlobalCtxt<'tcx> { maybe_unused_extern_crates: Vec<(LocalDefId, Span)>, /// A map of glob use to a set of names it actually imports. Currently only /// used in save-analysis. - glob_map: FxHashMap>, + pub(crate) glob_map: FxHashMap>, /// Extern prelude entries. The value is `true` if the entry was introduced /// via `extern crate` item and not `--extern` option or compiler built-in. pub extern_prelude: FxHashMap, diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index b6300a40b0d..8cad5439610 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -3101,6 +3101,7 @@ pub fn provide(providers: &mut ty::query::Providers) { erase_regions::provide(providers); layout::provide(providers); util::provide(providers); + print::provide(providers); super::util::bug::provide(providers); *providers = ty::query::Providers { trait_impls_of: trait_def::trait_impls_of_provider, diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 999a1d52a26..50ce80cc9fc 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -7,10 +7,13 @@ use rustc_apfloat::ieee::{Double, Single}; use rustc_apfloat::Float; use rustc_ast as ast; use rustc_attr::{SignedInt, UnsignedInt}; +use rustc_data_structures::fx::FxHashMap; use rustc_hir as hir; -use rustc_hir::def::{CtorKind, DefKind, Namespace}; -use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; +use rustc_hir::def::{self, CtorKind, DefKind, Namespace}; +use rustc_hir::def_id::{CrateNum, DefId, DefIdSet, CRATE_DEF_INDEX, LOCAL_CRATE}; use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; +use rustc_hir::ItemKind; +use rustc_session::config::TrimmedDefPaths; use rustc_span::symbol::{kw, Ident, Symbol}; use rustc_target::abi::{Integer, Size}; use rustc_target::spec::abi::Abi; @@ -52,6 +55,7 @@ macro_rules! define_scoped_cx { thread_local! { static FORCE_IMPL_FILENAME_LINE: Cell = Cell::new(false); static SHOULD_PREFIX_WITH_CRATE: Cell = Cell::new(false); + static NO_TRIMMED_PATH: Cell = Cell::new(false); static NO_QUERIES: Cell = Cell::new(false); } @@ -94,6 +98,18 @@ pub fn with_crate_prefix R, R>(f: F) -> R { }) } +/// Prevent path trimming if it is turned on. Path trimming affects `Display` impl +/// of various rustc types, for example `std::vec::Vec` would be trimmed to `Vec`, +/// if no other `Vec` is found. +pub fn with_no_trimmed_paths R, R>(f: F) -> R { + NO_TRIMMED_PATH.with(|flag| { + let old = flag.replace(true); + let result = f(); + flag.set(old); + result + }) +} + /// The "region highlights" are used to control region printing during /// specific error messages. When a "region highlight" is enabled, it /// gives an alternate way to print specific regions. For now, we @@ -243,6 +259,28 @@ pub trait PrettyPrinter<'tcx>: self.try_print_visible_def_path_recur(def_id, &mut callers) } + /// Try to see if this path can be trimmed to a unique symbol name. + fn try_print_trimmed_def_path( + mut self, + def_id: DefId, + ) -> Result<(Self::Path, bool), Self::Error> { + if !self.tcx().sess.opts.debugging_opts.trim_diagnostic_paths + || matches!(self.tcx().sess.opts.trimmed_def_paths, TrimmedDefPaths::Never) + || NO_TRIMMED_PATH.with(|flag| flag.get()) + || SHOULD_PREFIX_WITH_CRATE.with(|flag| flag.get()) + { + return Ok((self, false)); + } + + match self.tcx().trimmed_def_paths(LOCAL_CRATE).get(&def_id) { + None => return Ok((self, false)), + Some(symbol) => { + self.write_str(&symbol.as_str())?; + return Ok((self, true)); + } + } + } + /// Does the work of `try_print_visible_def_path`, building the /// full definition path recursively before attempting to /// post-process it into the valid and visible version that @@ -1324,6 +1362,11 @@ impl Printer<'tcx> for FmtPrinter<'_, 'tcx, F> { define_scoped_cx!(self); if substs.is_empty() { + match self.try_print_trimmed_def_path(def_id)? { + (cx, true) => return Ok(cx), + (cx, false) => self = cx, + } + match self.try_print_visible_def_path(def_id)? { (cx, true) => return Ok(cx), (cx, false) => self = cx, @@ -2064,3 +2107,134 @@ define_print_and_forward_display! { } } } + +fn for_each_def(tcx: TyCtxt<'_>, mut collect_fn: impl for<'b> FnMut(&'b Ident, Namespace, DefId)) { + // Iterate all local crate items no matter where they are defined. + let hir = tcx.hir(); + for item in hir.krate().items.values() { + if item.ident.name.as_str().is_empty() { + continue; + } + + match item.kind { + ItemKind::Use(_, _) => { + continue; + } + _ => {} + } + + if let Some(local_def_id) = hir.definitions().opt_hir_id_to_local_def_id(item.hir_id) { + let def_id = local_def_id.to_def_id(); + let ns = tcx.def_kind(def_id).ns().unwrap_or(Namespace::TypeNS); + collect_fn(&item.ident, ns, def_id); + } + } + + // Now take care of extern crate items. + let queue = &mut Vec::new(); + let mut seen_defs: DefIdSet = Default::default(); + + for &cnum in tcx.crates().iter() { + let def_id = DefId { krate: cnum, index: CRATE_DEF_INDEX }; + + // Ignore crates that are not direct dependencies. + match tcx.extern_crate(def_id) { + None => continue, + Some(extern_crate) => { + if !extern_crate.is_direct() { + continue; + } + } + } + + queue.push(def_id); + } + + // Iterate external crate defs but be mindful about visibility + while let Some(def) = queue.pop() { + for child in tcx.item_children(def).iter() { + if child.vis != ty::Visibility::Public { + continue; + } + + match child.res { + def::Res::Def(DefKind::AssocTy, _) => {} + def::Res::Def(defkind, def_id) => { + if let Some(ns) = defkind.ns() { + collect_fn(&child.ident, ns, def_id); + } + + if seen_defs.insert(def_id) { + queue.push(def_id); + } + } + _ => {} + } + } + } +} + +/// The purpose of this function is to collect public symbols names that are unique across all +/// crates in the build. Later, when printing about types we can use those names instead of the +/// full exported path to them. +/// +/// So essentially, if a symbol name can only be imported from one place for a type, and as +/// long as it was not glob-imported anywhere in the current crate, we can trim its printed +/// path and print only the name. +/// +/// This has wide implications on error messages with types, for example, shortening +/// `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. +/// +/// The implementation uses similar import discovery logic to that of 'use' suggestions. +fn trimmed_def_paths(tcx: TyCtxt<'_>, crate_num: CrateNum) -> FxHashMap { + assert_eq!(crate_num, LOCAL_CRATE); + + let mut map = FxHashMap::default(); + + if let TrimmedDefPaths::GoodPath = tcx.sess.opts.trimmed_def_paths { + // For good paths causing this bug, the `rustc_middle::ty::print::with_no_trimmed_paths` + // wrapper can be used to suppress this query, in exchange for full paths being formatted. + tcx.sess.delay_good_path_bug("trimmed_def_paths constructed"); + } + + let unique_symbols_rev: &mut FxHashMap<(Namespace, Symbol), Option> = + &mut FxHashMap::default(); + + for symbol_set in tcx.glob_map.values() { + for symbol in symbol_set { + unique_symbols_rev.insert((Namespace::TypeNS, *symbol), None); + unique_symbols_rev.insert((Namespace::ValueNS, *symbol), None); + unique_symbols_rev.insert((Namespace::MacroNS, *symbol), None); + } + } + + for_each_def(tcx, |ident, ns, def_id| { + use std::collections::hash_map::Entry::{Occupied, Vacant}; + + match unique_symbols_rev.entry((ns, ident.name)) { + Occupied(mut v) => match v.get() { + None => {} + Some(existing) => { + if *existing != def_id { + v.insert(None); + } + } + }, + Vacant(v) => { + v.insert(Some(def_id)); + } + } + }); + + for ((_, symbol), opt_def_id) in unique_symbols_rev.drain() { + if let Some(def_id) = opt_def_id { + map.insert(def_id, symbol); + } + } + + map +} + +pub fn provide(providers: &mut ty::query::Providers) { + *providers = ty::query::Providers { trimmed_def_paths, ..*providers }; +} diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index 605e3545dea..bfe97cb7a02 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -5,7 +5,7 @@ use crate::mir::interpret; use crate::mir::ProjectionKind; use crate::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor}; -use crate::ty::print::{FmtPrinter, Printer}; +use crate::ty::print::{with_no_trimmed_paths, FmtPrinter, Printer}; use crate::ty::{self, InferConst, Lift, Ty, TyCtxt}; use rustc_hir as hir; use rustc_hir::def::Namespace; @@ -20,7 +20,9 @@ use std::sync::Arc; impl fmt::Debug for ty::TraitDef { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { ty::tls::with(|tcx| { - FmtPrinter::new(tcx, f, Namespace::TypeNS).print_def_path(self.def_id, &[])?; + with_no_trimmed_paths(|| { + FmtPrinter::new(tcx, f, Namespace::TypeNS).print_def_path(self.def_id, &[]) + })?; Ok(()) }) } @@ -29,7 +31,9 @@ impl fmt::Debug for ty::TraitDef { impl fmt::Debug for ty::AdtDef { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { ty::tls::with(|tcx| { - FmtPrinter::new(tcx, f, Namespace::TypeNS).print_def_path(self.did, &[])?; + with_no_trimmed_paths(|| { + FmtPrinter::new(tcx, f, Namespace::TypeNS).print_def_path(self.did, &[]) + })?; Ok(()) }) } @@ -50,7 +54,7 @@ impl fmt::Debug for ty::UpvarBorrow<'tcx> { impl fmt::Debug for ty::ExistentialTraitRef<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - fmt::Display::fmt(self, f) + with_no_trimmed_paths(|| fmt::Display::fmt(self, f)) } } @@ -183,13 +187,13 @@ impl fmt::Debug for ty::FloatVarValue { impl fmt::Debug for ty::TraitRef<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - fmt::Display::fmt(self, f) + with_no_trimmed_paths(|| fmt::Display::fmt(self, f)) } } impl fmt::Debug for Ty<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - fmt::Display::fmt(self, f) + with_no_trimmed_paths(|| fmt::Display::fmt(self, f)) } } diff --git a/compiler/rustc_mir/src/const_eval/eval_queries.rs b/compiler/rustc_mir/src/const_eval/eval_queries.rs index 291b42c12d7..c8a68b97932 100644 --- a/compiler/rustc_mir/src/const_eval/eval_queries.rs +++ b/compiler/rustc_mir/src/const_eval/eval_queries.rs @@ -10,6 +10,7 @@ use rustc_hir::def::DefKind; use rustc_middle::mir; use rustc_middle::mir::interpret::ErrorHandled; use rustc_middle::traits::Reveal; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, subst::Subst, TyCtxt}; use rustc_span::source_map::Span; use rustc_target::abi::{Abi, LayoutOf}; @@ -33,7 +34,8 @@ fn eval_body_using_ecx<'mir, 'tcx>( assert!(!layout.is_unsized()); let ret = ecx.allocate(layout, MemoryKind::Stack); - let name = ty::tls::with(|tcx| tcx.def_path_str(cid.instance.def_id())); + let name = + with_no_trimmed_paths(|| ty::tls::with(|tcx| tcx.def_path_str(cid.instance.def_id()))); let prom = cid.promoted.map_or(String::new(), |p| format!("::promoted[{:?}]", p)); trace!("eval_body_using_ecx: pushing stack frame for global: {}{}", name, prom); @@ -290,7 +292,7 @@ pub fn const_eval_raw_provider<'tcx>( // The next two lines concatenated contain some discussion: // https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/ // subject/anon_const_instance_printing/near/135980032 - let instance = key.value.instance.to_string(); + let instance = with_no_trimmed_paths(|| key.value.instance.to_string()); trace!("const eval: {:?} ({})", key, instance); } diff --git a/compiler/rustc_mir/src/interpret/validity.rs b/compiler/rustc_mir/src/interpret/validity.rs index 9cd20340138..4220483608d 100644 --- a/compiler/rustc_mir/src/interpret/validity.rs +++ b/compiler/rustc_mir/src/interpret/validity.rs @@ -26,18 +26,22 @@ use super::{ macro_rules! throw_validation_failure { ($where:expr, { $( $what_fmt:expr ),+ } $( expected { $( $expected_fmt:expr ),+ } )?) => {{ - let mut msg = String::new(); - msg.push_str("encountered "); - write!(&mut msg, $($what_fmt),+).unwrap(); - let where_ = &$where; - if !where_.is_empty() { - msg.push_str(" at "); - write_path(&mut msg, where_); - } - $( - msg.push_str(", but expected "); - write!(&mut msg, $($expected_fmt),+).unwrap(); - )? + let msg = rustc_middle::ty::print::with_no_trimmed_paths(|| { + let mut msg = String::new(); + msg.push_str("encountered "); + write!(&mut msg, $($what_fmt),+).unwrap(); + let where_ = &$where; + if !where_.is_empty() { + msg.push_str(" at "); + write_path(&mut msg, where_); + } + $( + msg.push_str(", but expected "); + write!(&mut msg, $($expected_fmt),+).unwrap(); + )? + + msg + }); throw_ub!(ValidationFailure(msg)) }}; } diff --git a/compiler/rustc_mir/src/monomorphize/partitioning/mod.rs b/compiler/rustc_mir/src/monomorphize/partitioning/mod.rs index b45fe0ee010..e96af77bbb8 100644 --- a/compiler/rustc_mir/src/monomorphize/partitioning/mod.rs +++ b/compiler/rustc_mir/src/monomorphize/partitioning/mod.rs @@ -100,6 +100,7 @@ use rustc_data_structures::sync; use rustc_hir::def_id::{CrateNum, DefIdSet, LOCAL_CRATE}; use rustc_middle::mir::mono::MonoItem; use rustc_middle::mir::mono::{CodegenUnit, Linkage}; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::query::Providers; use rustc_middle::ty::TyCtxt; use rustc_span::symbol::Symbol; @@ -374,7 +375,7 @@ fn collect_and_partition_mono_items<'tcx>( let mut item_keys: Vec<_> = items .iter() .map(|i| { - let mut output = i.to_string(); + let mut output = with_no_trimmed_paths(|| i.to_string()); output.push_str(" @@"); let mut empty = Vec::new(); let cgus = item_to_cgus.get_mut(i).unwrap_or(&mut empty); diff --git a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs index f6d3ccc1ae0..e7ddf38719c 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs @@ -2,6 +2,7 @@ use rustc_hir as hir; use rustc_index::vec::Idx; use rustc_infer::infer::{InferCtxt, TyCtxtInferExt}; use rustc_middle::mir::Field; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_session::lint; use rustc_span::Span; @@ -118,7 +119,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> { } if let Some(non_sm_ty) = structural { - let msg = match non_sm_ty { + let msg = with_no_trimmed_paths(|| match non_sm_ty { traits::NonStructuralMatchTy::Adt(adt_def) => { let path = self.tcx().def_path_str(adt_def.did); format!( @@ -148,7 +149,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> { traits::NonStructuralMatchTy::Foreign => { bug!("use of a value of a foreign type inside a pattern") } - }; + }); // double-check there even *is* a semantic `PartialEq` to dispatch to. // diff --git a/compiler/rustc_save_analysis/src/lib.rs b/compiler/rustc_save_analysis/src/lib.rs index 629051c1820..a12eb264065 100644 --- a/compiler/rustc_save_analysis/src/lib.rs +++ b/compiler/rustc_save_analysis/src/lib.rs @@ -21,7 +21,7 @@ use rustc_hir_pretty::{enum_def_to_string, fn_to_string, ty_to_string}; use rustc_middle::hir::map::Map; use rustc_middle::middle::cstore::ExternCrate; use rustc_middle::middle::privacy::AccessLevels; -use rustc_middle::ty::{self, DefIdTree, TyCtxt}; +use rustc_middle::ty::{self, print::with_no_trimmed_paths, DefIdTree, TyCtxt}; use rustc_middle::{bug, span_bug}; use rustc_session::config::{CrateType, Input, OutputType}; use rustc_session::output::{filename_for_metadata, out_filename}; @@ -989,32 +989,34 @@ pub fn process_crate<'l, 'tcx, H: SaveHandler>( config: Option, mut handler: H, ) { - tcx.dep_graph.with_ignore(|| { - info!("Dumping crate {}", cratename); + with_no_trimmed_paths(|| { + tcx.dep_graph.with_ignore(|| { + info!("Dumping crate {}", cratename); - // Privacy checking requires and is done after type checking; use a - // fallback in case the access levels couldn't have been correctly computed. - let access_levels = match tcx.sess.compile_status() { - Ok(..) => tcx.privacy_access_levels(LOCAL_CRATE), - Err(..) => tcx.arena.alloc(AccessLevels::default()), - }; + // Privacy checking requires and is done after type checking; use a + // fallback in case the access levels couldn't have been correctly computed. + let access_levels = match tcx.sess.compile_status() { + Ok(..) => tcx.privacy_access_levels(LOCAL_CRATE), + Err(..) => tcx.arena.alloc(AccessLevels::default()), + }; - let save_ctxt = SaveContext { - tcx, - maybe_typeck_results: None, - access_levels: &access_levels, - span_utils: SpanUtils::new(&tcx.sess), - config: find_config(config), - impl_counter: Cell::new(0), - }; + let save_ctxt = SaveContext { + tcx, + maybe_typeck_results: None, + access_levels: &access_levels, + span_utils: SpanUtils::new(&tcx.sess), + config: find_config(config), + impl_counter: Cell::new(0), + }; - let mut visitor = DumpVisitor::new(save_ctxt); + let mut visitor = DumpVisitor::new(save_ctxt); - visitor.dump_crate_info(cratename, tcx.hir().krate()); - visitor.dump_compilation_options(input, cratename); - visitor.process_crate(tcx.hir().krate()); + visitor.dump_crate_info(cratename, tcx.hir().krate()); + visitor.dump_compilation_options(input, cratename); + visitor.process_crate(tcx.hir().krate()); - handler.save(&visitor.save_ctxt, &visitor.analysis()) + handler.save(&visitor.save_ctxt, &visitor.analysis()) + }) }) } diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 6861314a88f..65377b08820 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -328,6 +328,23 @@ impl Default for ErrorOutputType { } } +/// Parameter to control path trimming. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum TrimmedDefPaths { + /// `try_print_trimmed_def_path` never prints a trimmed path and never calls the expensive query + Never, + /// `try_print_trimmed_def_path` calls the expensive query, the query doesn't call `delay_good_path_bug` + Always, + /// `try_print_trimmed_def_path` calls the expensive query, the query calls `delay_good_path_bug` + GoodPath, +} + +impl Default for TrimmedDefPaths { + fn default() -> Self { + Self::Never + } +} + /// Use tree-based collections to cheaply get a deterministic `Hash` implementation. /// *Do not* switch `BTreeMap` out for an unsorted container type! That would break /// dependency tracking for command-line arguments. @@ -621,6 +638,7 @@ impl Default for Options { unstable_features: UnstableFeatures::Disallow, debug_assertions: true, actually_rustdoc: false, + trimmed_def_paths: TrimmedDefPaths::default(), cli_forced_codegen_units: None, cli_forced_thinlto_off: false, remap_path_prefix: Vec::new(), @@ -1811,6 +1829,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { unstable_features: UnstableFeatures::from_environment(), debug_assertions, actually_rustdoc: false, + trimmed_def_paths: TrimmedDefPaths::default(), cli_forced_codegen_units: codegen_units, cli_forced_thinlto_off: disable_thinlto, remap_path_prefix, @@ -2057,7 +2076,7 @@ crate mod dep_tracking { use super::{ CFGuard, CrateType, DebugInfo, ErrorOutputType, LinkerPluginLto, LtoCli, OptLevel, OutputTypes, Passes, SanitizerSet, SourceFileHashAlgorithm, SwitchWithOptPath, - SymbolManglingVersion, + SymbolManglingVersion, TrimmedDefPaths, }; use crate::lint; use crate::utils::NativeLibKind; @@ -2138,6 +2157,7 @@ crate mod dep_tracking { impl_dep_tracking_hash_via_hash!(SwitchWithOptPath); impl_dep_tracking_hash_via_hash!(SymbolManglingVersion); impl_dep_tracking_hash_via_hash!(Option); + impl_dep_tracking_hash_via_hash!(TrimmedDefPaths); impl_dep_tracking_hash_for_sortable_vec_of!(String); impl_dep_tracking_hash_for_sortable_vec_of!(PathBuf); diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index a28c17917df..f502d43a0e0 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -125,6 +125,9 @@ top_level_options!( // try to not rely on this too much. actually_rustdoc: bool [TRACKED], + // Control path trimming. + trimmed_def_paths: TrimmedDefPaths [TRACKED], + // Specifications of codegen units / ThinLTO which are forced as a // result of parsing command line options. These are not necessarily // what rustc was invoked with, but massaged a bit to agree with @@ -1084,6 +1087,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "for every macro invocation, print its name and arguments (default: no)"), treat_err_as_bug: Option = (None, parse_treat_err_as_bug, [TRACKED], "treat error number `val` that occurs as bug"), + trim_diagnostic_paths: bool = (true, parse_bool, [UNTRACKED], + "in diagnostics, use heuristics to shorten paths referring to items"), ui_testing: bool = (false, parse_bool, [UNTRACKED], "emit compiler diagnostics in a form suitable for UI testing (default: no)"), unleash_the_miri_inside_of_you: bool = (false, parse_bool, [TRACKED], diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 82f476b463d..dbceb998371 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -32,6 +32,7 @@ use rustc_hir::def_id::DefId; use rustc_middle::dep_graph::{DepKind, DepNodeIndex}; use rustc_middle::mir::interpret::ErrorHandled; use rustc_middle::ty::fast_reject; +use rustc_middle::ty::print::with_no_trimmed_paths; use rustc_middle::ty::relate::TypeRelation; use rustc_middle::ty::subst::{GenericArgKind, Subst, SubstsRef}; use rustc_middle::ty::{ @@ -778,14 +779,16 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { if !candidate_set.ambiguous && candidate_set.vec.is_empty() { let trait_ref = stack.obligation.predicate.skip_binder().trait_ref; let self_ty = trait_ref.self_ty(); - let cause = IntercrateAmbiguityCause::DownstreamCrate { - trait_desc: trait_ref.print_only_trait_path().to_string(), - self_desc: if self_ty.has_concrete_skeleton() { - Some(self_ty.to_string()) - } else { - None - }, - }; + let cause = + with_no_trimmed_paths(|| IntercrateAmbiguityCause::DownstreamCrate { + trait_desc: trait_ref.print_only_trait_path().to_string(), + self_desc: if self_ty.has_concrete_skeleton() { + Some(self_ty.to_string()) + } else { + None + }, + }); + debug!("evaluate_stack: pushing cause = {:?}", cause); self.intercrate_ambiguity_causes.as_mut().unwrap().push(cause); } @@ -1030,12 +1033,15 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { if !candidate_set.ambiguous && no_candidates_apply { let trait_ref = stack.obligation.predicate.skip_binder().trait_ref; let self_ty = trait_ref.self_ty(); - let trait_desc = trait_ref.print_only_trait_path().to_string(); - let self_desc = if self_ty.has_concrete_skeleton() { - Some(self_ty.to_string()) - } else { - None - }; + let (trait_desc, self_desc) = with_no_trimmed_paths(|| { + let trait_desc = trait_ref.print_only_trait_path().to_string(); + let self_desc = if self_ty.has_concrete_skeleton() { + Some(self_ty.to_string()) + } else { + None + }; + (trait_desc, self_desc) + }); let cause = if let Conflict::Upstream = conflict { IntercrateAmbiguityCause::UpstreamCrateUpdate { trait_desc, self_desc } } else { diff --git a/src/test/compile-fail/issue-43733-2.rs b/src/test/compile-fail/issue-43733-2.rs index dae27c4785f..61dd3a923f2 100644 --- a/src/test/compile-fail/issue-43733-2.rs +++ b/src/test/compile-fail/issue-43733-2.rs @@ -22,7 +22,7 @@ impl Key { use std::thread::__FastLocalKeyInner as Key; static __KEY: Key<()> = Key::new(); -//~^ ERROR `std::cell::UnsafeCell>` cannot be shared between threads +//~^ ERROR `UnsafeCell>` cannot be shared between threads //~| ERROR cannot be shared between threads safely [E0277] fn main() {} diff --git a/src/test/compile-fail/must_use-in-stdlib-traits.rs b/src/test/compile-fail/must_use-in-stdlib-traits.rs index 39472ae11fb..70dddf61fb7 100644 --- a/src/test/compile-fail/must_use-in-stdlib-traits.rs +++ b/src/test/compile-fail/must_use-in-stdlib-traits.rs @@ -39,9 +39,9 @@ fn square_fn() -> impl Fn(u32) -> u32 { } fn main() { - iterator(); //~ ERROR unused implementer of `std::iter::Iterator` that must be used - future(); //~ ERROR unused implementer of `std::future::Future` that must be used - square_fn_once(); //~ ERROR unused implementer of `std::ops::FnOnce` that must be used - square_fn_mut(); //~ ERROR unused implementer of `std::ops::FnMut` that must be used - square_fn(); //~ ERROR unused implementer of `std::ops::Fn` that must be used + iterator(); //~ ERROR unused implementer of `Iterator` that must be used + future(); //~ ERROR unused implementer of `Future` that must be used + square_fn_once(); //~ ERROR unused implementer of `FnOnce` that must be used + square_fn_mut(); //~ ERROR unused implementer of `FnMut` that must be used + square_fn(); //~ ERROR unused implementer of `Fn` that must be used } diff --git a/src/test/incremental/dirty_clean.rs b/src/test/incremental/dirty_clean.rs index 2a1056df4ce..02c9a0c5798 100644 --- a/src/test/incremental/dirty_clean.rs +++ b/src/test/incremental/dirty_clean.rs @@ -27,7 +27,7 @@ mod y { #[rustc_clean(label="typeck", cfg="cfail2")] pub fn y() { - //[cfail2]~^ ERROR `typeck(y::y)` should be clean but is not + //[cfail2]~^ ERROR `typeck(y)` should be clean but is not x::x(); } } @@ -35,6 +35,6 @@ mod y { mod z { #[rustc_dirty(label="typeck", cfg="cfail2")] pub fn z() { - //[cfail2]~^ ERROR `typeck(z::z)` should be dirty but is not + //[cfail2]~^ ERROR `typeck(z)` should be dirty but is not } } diff --git a/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir index 06869735f1e..50326253ce4 100644 --- a/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir @@ -35,7 +35,7 @@ fn main() -> () { _2 = move _3; // scope 2 at $DIR/basic_assignment.rs:16:5: 16:24 StorageDead(_3); // scope 2 at $DIR/basic_assignment.rs:16:23: 16:24 StorageLive(_4); // scope 2 at $DIR/basic_assignment.rs:18:9: 18:15 - _4 = std::option::Option::>::None; // scope 2 at $DIR/basic_assignment.rs:18:36: 18:40 + _4 = Option::>::None; // scope 2 at $DIR/basic_assignment.rs:18:36: 18:40 FakeRead(ForLet, _4); // scope 2 at $DIR/basic_assignment.rs:18:9: 18:15 AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/basic_assignment.rs:18:17: 18:33 StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:19:9: 19:15 diff --git a/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir index 46dbb997ef4..408efb4cade 100644 --- a/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir +++ b/src/test/mir-opt/box_expr.main.ElaborateDrops.before.mir @@ -38,7 +38,7 @@ fn main() -> () { StorageLive(_3); // scope 1 at $DIR/box_expr.rs:8:5: 8:12 StorageLive(_4); // scope 1 at $DIR/box_expr.rs:8:10: 8:11 _4 = move _1; // scope 1 at $DIR/box_expr.rs:8:10: 8:11 - _3 = std::mem::drop::>(move _4) -> [return: bb5, unwind: bb7]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12 + _3 = std::mem::drop::>(move _4) -> [return: bb5, unwind: bb7]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12 // mir::Constant // + span: $DIR/box_expr.rs:8:5: 8:9 // + literal: Const { ty: fn(std::boxed::Box) {std::mem::drop::>}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit index 09a4eca9389..a137d7fadba 100644 --- a/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit +++ b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.32bit @@ -8,7 +8,7 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - _2 = const {alloc0: &&[(std::option::Option, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + _2 = const {alloc0: &&[(Option, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 // ty::Const // + ty: &&[(std::option::Option, &[&str])] // + val: Value(Scalar(alloc0)) diff --git a/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit index b10cc3e0985..ef98cf9c091 100644 --- a/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit +++ b/src/test/mir-opt/const_allocation.main.ConstProp.after.mir.64bit @@ -8,7 +8,7 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 - _2 = const {alloc0: &&[(std::option::Option, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 + _2 = const {alloc0: &&[(Option, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8 // ty::Const // + ty: &&[(std::option::Option, &[&str])] // + val: Value(Scalar(alloc0)) diff --git a/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit index 19cbab74ab8..c4f10064890 100644 --- a/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit +++ b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.32bit @@ -8,7 +8,7 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - _2 = const {alloc0: &&[(std::option::Option, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + _2 = const {alloc0: &&[(Option, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 // ty::Const // + ty: &&[(std::option::Option, &[&u8])] // + val: Value(Scalar(alloc0)) diff --git a/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit index 4dd960c8ddc..b16b85c4e95 100644 --- a/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit +++ b/src/test/mir-opt/const_allocation2.main.ConstProp.after.mir.64bit @@ -8,7 +8,7 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 - _2 = const {alloc0: &&[(std::option::Option, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 + _2 = const {alloc0: &&[(Option, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8 // ty::Const // + ty: &&[(std::option::Option, &[&u8])] // + val: Value(Scalar(alloc0)) diff --git a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff index bfc848bbfc9..916a876b582 100644 --- a/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff +++ b/src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff @@ -16,7 +16,7 @@ StorageLive(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10 StorageLive(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30 StorageLive(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 - _3 = const main::FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 + _3 = const FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16 // ty::Const // + ty: &i32 // + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), const_param_did: None }, [], None) diff --git a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff index b55e3a63533..80b7e7ecdda 100644 --- a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff +++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff @@ -22,7 +22,7 @@ bb2: { StorageLive(_2); // scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL - std::rt::begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL + begin_panic::<&str>(const "explicit panic"); // scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/macros.rs:LL:COL // + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir index 28364d4fbfb..0db0f8349bb 100644 --- a/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir +++ b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir @@ -1,6 +1,6 @@ // MIR for `match_tuple` after SimplifyCfg-initial -fn match_tuple(_1: (u32, bool, std::option::Option, u32)) -> u32 { +fn match_tuple(_1: (u32, bool, Option, u32)) -> u32 { debug x => _1; // in scope 0 at $DIR/exponential-or.rs:6:16: 6:17 let mut _0: u32; // return place in scope 0 at $DIR/exponential-or.rs:6:53: 6:56 let mut _2: isize; // in scope 0 at $DIR/exponential-or.rs:8:37: 8:48 diff --git a/src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir b/src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir index 199cbcf8375..d3f92d389f5 100644 --- a/src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir +++ b/src/test/mir-opt/fn_ptr_shim.core.ops-function-Fn-call.AddMovesForPackedDrops.before.mir @@ -1,6 +1,6 @@ // MIR for `std::ops::Fn::call` before AddMovesForPackedDrops -fn std::ops::Fn::call(_1: *const fn(), _2: Args) -> >::Output { +fn std::ops::Fn::call(_1: *const fn(), _2: Args) -> >::Output { let mut _0: >::Output; // return place in scope 0 at $SRC_DIR/core/src/ops/function.rs:LL:COL bb0: { diff --git a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff index 9bf666bc761..bb79cd80e51 100644 --- a/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff +++ b/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff @@ -1,7 +1,7 @@ - // MIR for `float_to_exponential_common` before ConstProp + // MIR for `float_to_exponential_common` after ConstProp - fn float_to_exponential_common(_1: &mut std::fmt::Formatter, _2: &T, _3: bool) -> std::result::Result<(), std::fmt::Error> { + fn float_to_exponential_common(_1: &mut Formatter, _2: &T, _3: bool) -> std::result::Result<(), std::fmt::Error> { debug fmt => _1; // in scope 0 at $DIR/funky_arms.rs:11:35: 11:38 debug num => _2; // in scope 0 at $DIR/funky_arms.rs:11:60: 11:63 debug upper => _3; // in scope 0 at $DIR/funky_arms.rs:11:69: 11:74 @@ -38,7 +38,7 @@ StorageLive(_4); // scope 0 at $DIR/funky_arms.rs:15:9: 15:19 StorageLive(_5); // scope 0 at $DIR/funky_arms.rs:15:22: 15:25 _5 = &(*_1); // scope 0 at $DIR/funky_arms.rs:15:22: 15:25 - _4 = std::fmt::Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:15:22: 15:37 + _4 = Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:15:22: 15:37 // mir::Constant // + span: $DIR/funky_arms.rs:15:26: 15:35 // + literal: Const { ty: for<'r> fn(&'r std::fmt::Formatter) -> bool {std::fmt::Formatter::sign_plus}, val: Value(Scalar()) } @@ -64,7 +64,7 @@ StorageLive(_7); // scope 2 at $DIR/funky_arms.rs:24:30: 24:45 StorageLive(_8); // scope 2 at $DIR/funky_arms.rs:24:30: 24:33 _8 = &(*_1); // scope 2 at $DIR/funky_arms.rs:24:30: 24:33 - _7 = std::fmt::Formatter::precision(move _8) -> bb5; // scope 2 at $DIR/funky_arms.rs:24:30: 24:45 + _7 = Formatter::precision(move _8) -> bb5; // scope 2 at $DIR/funky_arms.rs:24:30: 24:45 // mir::Constant // + span: $DIR/funky_arms.rs:24:34: 24:43 // + literal: Const { ty: for<'r> fn(&'r std::fmt::Formatter) -> std::option::Option {std::fmt::Formatter::precision}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir b/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir index bd64a31663a..89396b64fce 100644 --- a/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir +++ b/src/test/mir-opt/generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir @@ -14,7 +14,7 @@ }, } */ -fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 13:6 {std::string::String, ()}]) -> () { +fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 13:6 {String, ()}]) -> () { let mut _0: (); // return place in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 let mut _2: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:10:15: 13:6 let _3: std::string::String; // in scope 0 at $DIR/generator-drop-cleanup.rs:11:13: 11:15 diff --git a/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir b/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir index 691f5eedad8..87889460e7e 100644 --- a/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir +++ b/src/test/mir-opt/generator_tiny.main-{{closure}}.generator_resume.0.mir @@ -10,7 +10,7 @@ storage_conflicts: BitMatrix(0x0) {}, } */ -fn main::{{closure}}#0(_1: std::pin::Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]>, _2: u8) -> std::ops::GeneratorState<(), ()> { +fn main::{{closure}}#0(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]>, _2: u8) -> GeneratorState<(), ()> { debug _x => _10; // in scope 0 at $DIR/generator-tiny.rs:19:17: 19:19 let mut _0: std::ops::GeneratorState<(), ()>; // return place in scope 0 at $DIR/generator-tiny.rs:19:16: 25:6 let _3: HasDrop; // in scope 0 at $DIR/generator-tiny.rs:20:13: 20:15 diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit index 0957698820f..2d52f034e52 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.32bit @@ -17,9 +17,9 @@ StorageLive(_1); // scope 0 at $DIR/inline-into-box-place.rs:8:9: 8:11 StorageLive(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 _2 = Box(std::vec::Vec); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -- (*_2) = std::vec::Vec::::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 +- (*_2) = Vec::::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 + _4 = &mut (*_2); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: std::ptr::Unique:: { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData:: }, cap: 0_usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL ++ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: Unique:: { pointer: {0x4 as *const u32}, _marker: PhantomData:: }, cap: 0_usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL + // ty::Const + // + ty: alloc::raw_vec::RawVec + // + val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) @@ -54,7 +54,7 @@ - } - - bb4 (cleanup): { -- _3 = alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 +- _3 = alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 - // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:42: 8:43 - // + literal: Const { ty: unsafe fn(std::ptr::Unique>) {alloc::alloc::box_free::>}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit index ab065fc3d25..d4e2df6fbfa 100644 --- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit +++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff.64bit @@ -17,9 +17,9 @@ StorageLive(_1); // scope 0 at $DIR/inline-into-box-place.rs:8:9: 8:11 StorageLive(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 _2 = Box(std::vec::Vec); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43 -- (*_2) = std::vec::Vec::::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 +- (*_2) = Vec::::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 + _4 = &mut (*_2); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43 -+ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: std::ptr::Unique:: { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData:: }, cap: 0_usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL ++ ((*_4).0: alloc::raw_vec::RawVec) = const alloc::raw_vec::RawVec:: { ptr: Unique:: { pointer: {0x4 as *const u32}, _marker: PhantomData:: }, cap: 0_usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL + // ty::Const + // + ty: alloc::raw_vec::RawVec + // + val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, size: Size { raw: 16 }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) @@ -54,7 +54,7 @@ - } - - bb4 (cleanup): { -- _3 = alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 +- _3 = alloc::alloc::box_free::>(move (_2.0: std::ptr::Unique>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43 - // mir::Constant - // + span: $DIR/inline-into-box-place.rs:8:42: 8:43 - // + literal: Const { ty: unsafe fn(std::ptr::Unique>) {alloc::alloc::box_free::>}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff index e97191b53e5..2ffc0252359 100644 --- a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff +++ b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff @@ -12,7 +12,7 @@ bb0: { StorageLive(_1); // scope 0 at $DIR/inline-specialization.rs:5:9: 5:10 -- _1 = as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:5:13: 5:38 +- _1 = as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:5:13: 5:38 - // mir::Constant - // + span: $DIR/inline-specialization.rs:5:13: 5:36 - // + literal: Const { ty: fn() -> u32 { as Foo>::bar}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir index 6add8d9d75a..c9a6aed3d4a 100644 --- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir @@ -1,6 +1,6 @@ // MIR for `b` after Inline -fn b(_1: &mut std::boxed::Box) -> &mut T { +fn b(_1: &mut Box) -> &mut T { debug x => _1; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:7:13: 7:14 let mut _0: &mut T; // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:7:32: 7:38 let mut _2: &mut T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15 diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir index 51bda6d334c..89f8aae73cd 100644 --- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir +++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir @@ -1,6 +1,6 @@ // MIR for `d` after Inline -fn d(_1: &std::boxed::Box) -> &T { +fn d(_1: &Box) -> &T { debug x => _1; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:17:13: 17:14 let mut _0: &T; // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:17:28: 17:30 let _2: &T; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15 diff --git a/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir index c71ae934622..137d9a8247f 100644 --- a/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir +++ b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir @@ -1,6 +1,6 @@ // MIR for `test` before ElaborateDrops -fn test() -> std::option::Option> { +fn test() -> Option> { let mut _0: std::option::Option>; // return place in scope 0 at $DIR/issue-62289.rs:8:14: 8:30 let mut _1: std::boxed::Box; // in scope 0 at $DIR/issue-62289.rs:9:10: 9:21 let mut _2: std::boxed::Box; // in scope 0 at $DIR/issue-62289.rs:9:10: 9:21 @@ -29,8 +29,8 @@ fn test() -> std::option::Option> { _2 = Box(u32); // scope 0 at $DIR/issue-62289.rs:9:10: 9:21 StorageLive(_3); // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 StorageLive(_4); // scope 0 at $DIR/issue-62289.rs:9:15: 9:19 - _4 = std::option::Option::::None; // scope 0 at $DIR/issue-62289.rs:9:15: 9:19 - _3 = as std::ops::Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 + _4 = Option::::None; // scope 0 at $DIR/issue-62289.rs:9:15: 9:19 + _3 = as Try>::into_result(move _4) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue-62289.rs:9:15: 9:20 // mir::Constant // + span: $DIR/issue-62289.rs:9:15: 9:20 // + literal: Const { ty: fn(std::option::Option) -> std::result::Result< as std::ops::Try>::Ok, as std::ops::Try>::Error> { as std::ops::Try>::into_result}, val: Value(Scalar()) } @@ -69,7 +69,7 @@ fn test() -> std::option::Option> { StorageLive(_8); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 StorageLive(_9); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 _9 = _6; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - _8 = >::from(move _9) -> [return: bb8, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + _8 = >::from(move _9) -> [return: bb8, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 // mir::Constant // + span: $DIR/issue-62289.rs:9:19: 9:20 // + literal: Const { ty: fn(std::option::NoneError) -> std::option::NoneError {>::from}, val: Value(Scalar()) } @@ -81,7 +81,7 @@ fn test() -> std::option::Option> { bb8: { StorageDead(_9); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 - _0 = > as std::ops::Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 + _0 = > as Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20 // mir::Constant // + span: $DIR/issue-62289.rs:9:15: 9:20 // + literal: Const { ty: fn(> as std::ops::Try>::Error) -> std::option::Option> {> as std::ops::Try>::from_error}, val: Value(Scalar()) } @@ -106,7 +106,7 @@ fn test() -> std::option::Option> { bb12: { StorageDead(_2); // scope 0 at $DIR/issue-62289.rs:9:20: 9:21 - _0 = std::option::Option::>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:9:5: 9:22 + _0 = Option::>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:9:5: 9:22 drop(_1) -> bb13; // scope 0 at $DIR/issue-62289.rs:9:21: 9:22 } diff --git a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir index b3aea29f13c..d9e5d2c3892 100644 --- a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir +++ b/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir @@ -21,7 +21,7 @@ fn main() -> () { StorageLive(_2); // scope 0 at $DIR/issue-72181-1.rs:16:9: 16:10 StorageLive(_3); // scope 2 at $DIR/issue-72181-1.rs:17:41: 17:43 _3 = (); // scope 2 at $DIR/issue-72181-1.rs:17:41: 17:43 - _2 = std::intrinsics::transmute::<(), Void>(move _3) -> [return: bb2, unwind: bb1]; // scope 2 at $DIR/issue-72181-1.rs:17:9: 17:44 + _2 = transmute::<(), Void>(move _3) -> [return: bb2, unwind: bb1]; // scope 2 at $DIR/issue-72181-1.rs:17:9: 17:44 // mir::Constant // + span: $DIR/issue-72181-1.rs:17:9: 17:40 // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(()) -> Void {std::intrinsics::transmute::<(), Void>}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit index b940f1a929d..f86755cfa7f 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.32bit @@ -140,12 +140,12 @@ _22 = (_18.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _23 = (_18.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_24); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL - _25 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _25 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _28 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _28 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -153,7 +153,7 @@ bb3: { StorageLive(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _29 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _22) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _29 = transmute::<&&i32, &core::fmt::Opaque>(move _22) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -165,12 +165,12 @@ StorageDead(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageDead(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL - _27 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _27 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _30 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _30 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -178,7 +178,7 @@ bb5: { StorageLive(_31); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _31 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _23) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _31 = transmute::<&&i32, &core::fmt::Opaque>(move _23) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -201,7 +201,7 @@ (_13.2: &[std::fmt::ArgumentV1]) = move _15; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageDead(_32); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _12 = &_13; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL - std::rt::begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL + begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/macros.rs:LL:COL // + literal: Const { ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit index b940f1a929d..f86755cfa7f 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.diff.64bit @@ -140,12 +140,12 @@ _22 = (_18.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _23 = (_18.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_24); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL - _25 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _25 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _28 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _28 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -153,7 +153,7 @@ bb3: { StorageLive(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _29 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _22) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _29 = transmute::<&&i32, &core::fmt::Opaque>(move _22) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -165,12 +165,12 @@ StorageDead(_29); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageDead(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_26); // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL - _27 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _27 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _30 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _30 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -178,7 +178,7 @@ bb5: { StorageLive(_31); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _31 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _23) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _31 = transmute::<&&i32, &core::fmt::Opaque>(move _23) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -201,7 +201,7 @@ (_13.2: &[std::fmt::ArgumentV1]) = move _15; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageDead(_32); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _12 = &_13; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL - std::rt::begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL + begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/macros.rs:LL:COL // + literal: Const { ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit index 586a9f7624c..302612f5a0a 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.32bit @@ -217,14 +217,14 @@ StorageLive(_39); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _39 = _36; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_40); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _40 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _40 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_46); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_47); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _47 = _40; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _46 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _46 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -235,7 +235,7 @@ StorageLive(_48); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_49); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _49 = _39; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _48 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _49) -> bb7; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _48 = transmute::<&&i32, &core::fmt::Opaque>(move _49) -> bb7; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -253,14 +253,14 @@ StorageLive(_42); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _42 = _37; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_43); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _43 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _43 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_50); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_51); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _51 = _43; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _50 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _50 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -271,7 +271,7 @@ StorageLive(_52); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_53); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _53 = _42; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _52 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _53) -> bb9; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _52 = transmute::<&&i32, &core::fmt::Opaque>(move _53) -> bb9; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -310,7 +310,7 @@ StorageDead(_23); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL _21 = &_22; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL _20 = _21; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL - std::rt::begin_panic_fmt(move _20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL + begin_panic_fmt(move _20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/macros.rs:LL:COL // + literal: Const { ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit index 586a9f7624c..302612f5a0a 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff.64bit @@ -217,14 +217,14 @@ StorageLive(_39); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _39 = _36; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_40); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _40 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _40 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_46); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_47); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _47 = _40; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _46 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _46 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -235,7 +235,7 @@ StorageLive(_48); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_49); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _49 = _39; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _48 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _49) -> bb7; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _48 = transmute::<&&i32, &core::fmt::Opaque>(move _49) -> bb7; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -253,14 +253,14 @@ StorageLive(_42); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _42 = _37; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_43); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _43 = <&i32 as std::fmt::Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _43 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar()) } StorageLive(_50); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_51); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _51 = _43; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _50 = std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _50 = transmute:: fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute:: fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar()) } @@ -271,7 +271,7 @@ StorageLive(_52); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL StorageLive(_53); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL _53 = _42; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL - _52 = std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>(move _53) -> bb9; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL + _52 = transmute::<&&i32, &core::fmt::Opaque>(move _53) -> bb9; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar()) } @@ -310,7 +310,7 @@ StorageDead(_23); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL _21 = &_22; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL _20 = _21; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL - std::rt::begin_panic_fmt(move _20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL + begin_panic_fmt(move _20); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/macros.rs:LL:COL // + literal: Const { ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff index 7a7d86f98ac..8062f33a866 100644 --- a/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff +++ b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff @@ -1,7 +1,7 @@ - // MIR for `complicated_match` after SimplifyCfg-initial + // MIR for `complicated_match` after ElaborateDrops - fn complicated_match(_1: bool, _2: (bool, bool, std::string::String)) -> i32 { + fn complicated_match(_1: bool, _2: (bool, bool, String)) -> i32 { debug cond => _1; // in scope 0 at $DIR/match-arm-scopes.rs:13:22: 13:26 debug items => _2; // in scope 0 at $DIR/match-arm-scopes.rs:13:34: 13:39 let mut _0: i32; // return place in scope 0 at $DIR/match-arm-scopes.rs:13:66: 13:69 diff --git a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir index c0249d134f2..14b1508f608 100644 --- a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir +++ b/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir @@ -26,7 +26,7 @@ fn full_tested_match() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6 StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 - _2 = std::option::Option::::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 + _2 = Option::::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27 _3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 switchInt(move _3) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16 diff --git a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir index a2ad5be265d..a6c492581fe 100644 --- a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir @@ -25,7 +25,7 @@ fn full_tested_match2() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6 StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 - _2 = std::option::Option::::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 + _2 = Option::::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27 _3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 switchInt(move _3) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16 diff --git a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir index b7322e7da0f..1d451cef2a0 100644 --- a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir +++ b/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir @@ -36,7 +36,7 @@ fn main() -> () { bb0: { StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6 StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 - _2 = std::option::Option::::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 + _2 = Option::::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26 _4 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 switchInt(move _4) -> [1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17 diff --git a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit index 883a4e1470b..41f36036a18 100644 --- a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit +++ b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.32bit @@ -1,7 +1,7 @@ - // MIR for `foo` before MatchBranchSimplification + // MIR for `foo` after MatchBranchSimplification - fn foo(_1: std::option::Option<()>) -> () { + fn foo(_1: Option<()>) -> () { debug bar => _1; // in scope 0 at $DIR/matches_reduce_branches.rs:5:8: 5:11 let mut _0: (); // return place in scope 0 at $DIR/matches_reduce_branches.rs:5:25: 5:25 let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL diff --git a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit index 883a4e1470b..41f36036a18 100644 --- a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit +++ b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.diff.64bit @@ -1,7 +1,7 @@ - // MIR for `foo` before MatchBranchSimplification + // MIR for `foo` after MatchBranchSimplification - fn foo(_1: std::option::Option<()>) -> () { + fn foo(_1: Option<()>) -> () { debug bar => _1; // in scope 0 at $DIR/matches_reduce_branches.rs:5:8: 5:11 let mut _0: (); // return place in scope 0 at $DIR/matches_reduce_branches.rs:5:25: 5:25 let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL diff --git a/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir index e90364c1ccf..5de8e98ced4 100644 --- a/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir @@ -1,6 +1,6 @@ // MIR for `unwrap` after SimplifyCfg-elaborate-drops -fn unwrap(_1: std::option::Option) -> T { +fn unwrap(_1: Option) -> T { debug opt => _1; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:7:14: 7:17 let mut _0: T; // return place in scope 0 at $DIR/no-drop-for-inactive-variant.rs:7:33: 7:34 let mut _2: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16 @@ -20,7 +20,7 @@ fn unwrap(_1: std::option::Option) -> T { bb1: { StorageLive(_4); // scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL - std::rt::begin_panic::<&str>(const "explicit panic") -> bb4; // scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL + begin_panic::<&str>(const "explicit panic") -> bb4; // scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL // mir::Constant // + span: $SRC_DIR/std/src/macros.rs:LL:COL // + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir index 5e1866fbc53..495c7f24c8c 100644 --- a/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir +++ b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir @@ -20,7 +20,7 @@ fn main() -> () { // + span: $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [], len: Size { raw: 0 } }, size: Size { raw: 0 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 0 }) } _3 = &(*_4); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:22 - _2 = ::to_string(move _3) -> bb2; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 + _2 = ::to_string(move _3) -> bb2; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34 // mir::Constant // + span: $DIR/no-spurious-drop-after-call.rs:9:23: 9:32 // + literal: Const { ty: for<'r> fn(&'r str) -> std::string::String {::to_string}, val: Value(Scalar()) } @@ -32,7 +32,7 @@ fn main() -> () { bb2: { StorageDead(_3); // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:33: 9:34 - _1 = std::mem::drop::(move _2) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 + _1 = std::mem::drop::(move _2) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35 // mir::Constant // + span: $DIR/no-spurious-drop-after-call.rs:9:5: 9:19 // + literal: Const { ty: fn(std::string::String) {std::mem::drop::}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff index 2b7e4bbffe9..47027311b47 100644 --- a/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff +++ b/src/test/mir-opt/remove_fake_borrows.match_guard.CleanupNonCodegenStatements.diff @@ -1,7 +1,7 @@ - // MIR for `match_guard` before CleanupNonCodegenStatements + // MIR for `match_guard` after CleanupNonCodegenStatements - fn match_guard(_1: std::option::Option<&&i32>, _2: bool) -> i32 { + fn match_guard(_1: Option<&&i32>, _2: bool) -> i32 { debug x => _1; // in scope 0 at $DIR/remove_fake_borrows.rs:6:16: 6:17 debug c => _2; // in scope 0 at $DIR/remove_fake_borrows.rs:6:34: 6:35 let mut _0: i32; // return place in scope 0 at $DIR/remove_fake_borrows.rs:6:46: 6:49 diff --git a/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir b/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir index b10ca218314..d0268cf207b 100644 --- a/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir +++ b/src/test/mir-opt/retag.core.ptr-drop_in_place.Test.SimplifyCfg-make_shim.after.mir @@ -1,6 +1,6 @@ -// MIR for `std::intrinsics::drop_in_place` after SimplifyCfg-make_shim +// MIR for `drop_in_place` after SimplifyCfg-make_shim -fn std::intrinsics::drop_in_place(_1: *mut Test) -> () { +fn drop_in_place(_1: *mut Test) -> () { let mut _0: (); // return place in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _2: &mut Test; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _3: (); // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL @@ -8,7 +8,7 @@ fn std::intrinsics::drop_in_place(_1: *mut Test) -> () { bb0: { Retag([raw] _1); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL _2 = &mut (*_1); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - _3 = ::drop(move _2) -> bb1; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL + _3 = ::drop(move _2) -> bb1; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL // + literal: Const { ty: for<'r> fn(&'r mut Test) {::drop}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff index ecb4384fc6f..e390662307e 100644 --- a/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff @@ -1,7 +1,7 @@ - // MIR for `id` before SimplifyArmIdentity + // MIR for `id` after SimplifyArmIdentity - fn id(_1: std::option::Option) -> std::option::Option { + fn id(_1: Option) -> Option { debug o => _1; // in scope 0 at $DIR/simplify-arm.rs:9:7: 9:8 let mut _0: std::option::Option; // return place in scope 0 at $DIR/simplify-arm.rs:9:25: 9:35 let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:11:9: 11:16 diff --git a/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff b/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff index eb1d6f656f4..81a0e6ba0b4 100644 --- a/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff +++ b/src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff @@ -1,7 +1,7 @@ - // MIR for `id` before SimplifyBranchSame + // MIR for `id` after SimplifyBranchSame - fn id(_1: std::option::Option) -> std::option::Option { + fn id(_1: Option) -> Option { debug o => _1; // in scope 0 at $DIR/simplify-arm.rs:9:7: 9:8 let mut _0: std::option::Option; // return place in scope 0 at $DIR/simplify-arm.rs:9:25: 9:35 let mut _2: isize; // in scope 0 at $DIR/simplify-arm.rs:11:9: 11:16 diff --git a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit index 4418c9f12b3..68a113f94ef 100644 --- a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit +++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.32bit @@ -1,7 +1,7 @@ - // MIR for `map` before SimplifyLocals + // MIR for `map` after SimplifyLocals - fn map(_1: std::option::Option>) -> std::option::Option> { + fn map(_1: Option>) -> Option> { debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:8: 1:9 let mut _0: std::option::Option>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:31: 1:46 - let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 diff --git a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit index 4418c9f12b3..68a113f94ef 100644 --- a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit +++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff.64bit @@ -1,7 +1,7 @@ - // MIR for `map` before SimplifyLocals + // MIR for `map` after SimplifyLocals - fn map(_1: std::option::Option>) -> std::option::Option> { + fn map(_1: Option>) -> Option> { debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:8: 1:9 let mut _0: std::option::Option>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:31: 1:46 - let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13 diff --git a/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff index 51a1e6ba4c3..869e3647f45 100644 --- a/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff +++ b/src/test/mir-opt/simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff @@ -35,7 +35,7 @@ StorageLive(_5); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:60 StorageLive(_6); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:53 _6 = &mut ((*_2).0: std::option::Option>); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:53 - _5 = std::option::Option::>::take(move _6) -> bb4; // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:60 + _5 = Option::>::take(move _6) -> bb4; // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:60 // mir::Constant // + span: $DIR/simplify_try_if_let.rs:26:54: 26:58 // + literal: Const { ty: for<'r> fn(&'r mut std::option::Option>) -> std::option::Option> {std::option::Option::>::take}, val: Value(Scalar()) } @@ -73,7 +73,7 @@ StorageLive(_11); // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:38 StorageLive(_12); // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:29 _12 = &mut _4; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:29 - _11 = std::ptr::NonNull::::as_mut(move _12) -> bb7; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:38 + _11 = NonNull::::as_mut(move _12) -> bb7; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:38 // mir::Constant // + span: $DIR/simplify_try_if_let.rs:28:30: 28:36 // + literal: Const { ty: for<'r> unsafe fn(&'r mut std::ptr::NonNull) -> &'r mut Node {std::ptr::NonNull::::as_mut}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/slice-drop-shim.rs b/src/test/mir-opt/slice-drop-shim.rs index 3b98b8474e5..0fd32906db6 100644 --- a/src/test/mir-opt/slice-drop-shim.rs +++ b/src/test/mir-opt/slice-drop-shim.rs @@ -1,7 +1,7 @@ // compile-flags: -Zmir-opt-level=0 // EMIT_MIR_FOR_EACH_BIT_WIDTH -// EMIT_MIR core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir +// EMIT_MIR core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir fn main() { let _fn = std::ptr::drop_in_place::<[String]> as unsafe fn(_); } diff --git a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir.32bit similarity index 97% rename from src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit rename to src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir.32bit index 50cfe19974a..8051c61bce9 100644 --- a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.32bit +++ b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir.32bit @@ -1,6 +1,6 @@ -// MIR for `std::intrinsics::drop_in_place` before AddMovesForPackedDrops +// MIR for `drop_in_place` before AddMovesForPackedDrops -fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { +fn drop_in_place(_1: *mut [String]) -> () { let mut _0: (); // return place in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _2: usize; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _3: usize; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL diff --git a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir.64bit similarity index 97% rename from src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit rename to src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir.64bit index 50cfe19974a..8051c61bce9 100644 --- a/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[std__string__String].AddMovesForPackedDrops.before.mir.64bit +++ b/src/test/mir-opt/slice_drop_shim.core.ptr-drop_in_place.[String].AddMovesForPackedDrops.before.mir.64bit @@ -1,6 +1,6 @@ -// MIR for `std::intrinsics::drop_in_place` before AddMovesForPackedDrops +// MIR for `drop_in_place` before AddMovesForPackedDrops -fn std::intrinsics::drop_in_place(_1: *mut [std::string::String]) -> () { +fn drop_in_place(_1: *mut [String]) -> () { let mut _0: (); // return place in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _2: usize; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _3: usize; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL diff --git a/src/test/mir-opt/storage_ranges.main.nll.0.mir b/src/test/mir-opt/storage_ranges.main.nll.0.mir index 707caf57c60..6fa83d3de62 100644 --- a/src/test/mir-opt/storage_ranges.main.nll.0.mir +++ b/src/test/mir-opt/storage_ranges.main.nll.0.mir @@ -45,7 +45,7 @@ fn main() -> () { StorageLive(_4); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 StorageLive(_5); // scope 1 at $DIR/storage_ranges.rs:6:23: 6:24 _5 = _1; // scope 1 at $DIR/storage_ranges.rs:6:23: 6:24 - _4 = std::option::Option::::Some(move _5); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 + _4 = Option::::Some(move _5); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25 StorageDead(_5); // scope 1 at $DIR/storage_ranges.rs:6:24: 6:25 _3 = &_4; // scope 1 at $DIR/storage_ranges.rs:6:17: 6:25 FakeRead(ForLet, _3); // scope 1 at $DIR/storage_ranges.rs:6:13: 6:14 diff --git a/src/test/mir-opt/unusual-item-types.rs b/src/test/mir-opt/unusual-item-types.rs index 249a851af25..9a6b8227239 100644 --- a/src/test/mir-opt/unusual-item-types.rs +++ b/src/test/mir-opt/unusual-item-types.rs @@ -24,6 +24,6 @@ enum E { fn main() { let f = Test::X as fn(usize) -> Test; -// EMIT_MIR core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir +// EMIT_MIR core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir let v = Vec::::new(); } diff --git a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir.32bit similarity index 84% rename from src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit rename to src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir.32bit index 1f5804e0b2c..2d96f64aeb4 100644 --- a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.32bit +++ b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir.32bit @@ -1,6 +1,6 @@ -// MIR for `std::intrinsics::drop_in_place` before AddMovesForPackedDrops +// MIR for `drop_in_place` before AddMovesForPackedDrops -fn std::intrinsics::drop_in_place(_1: *mut std::vec::Vec) -> () { +fn drop_in_place(_1: *mut Vec) -> () { let mut _0: (); // return place in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _2: &mut std::vec::Vec; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _3: (); // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL @@ -35,7 +35,7 @@ fn std::intrinsics::drop_in_place(_1: *mut std::vec::Vec) -> () { bb7: { _2 = &mut (*_1); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - _3 = as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL + _3 = as Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL // + literal: Const { ty: for<'r> fn(&'r mut std::vec::Vec) { as std::ops::Drop>::drop}, val: Value(Scalar()) } diff --git a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir.64bit similarity index 84% rename from src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit rename to src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir.64bit index 1f5804e0b2c..2d96f64aeb4 100644 --- a/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.std__vec__Vec_i32_.AddMovesForPackedDrops.before.mir.64bit +++ b/src/test/mir-opt/unusual_item_types.core.ptr-drop_in_place.Vec_i32_.AddMovesForPackedDrops.before.mir.64bit @@ -1,6 +1,6 @@ -// MIR for `std::intrinsics::drop_in_place` before AddMovesForPackedDrops +// MIR for `drop_in_place` before AddMovesForPackedDrops -fn std::intrinsics::drop_in_place(_1: *mut std::vec::Vec) -> () { +fn drop_in_place(_1: *mut Vec) -> () { let mut _0: (); // return place in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _2: &mut std::vec::Vec; // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL let mut _3: (); // in scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL @@ -35,7 +35,7 @@ fn std::intrinsics::drop_in_place(_1: *mut std::vec::Vec) -> () { bb7: { _2 = &mut (*_1); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL - _3 = as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL + _3 = as Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/ptr/mod.rs:LL:COL // + literal: Const { ty: for<'r> fn(&'r mut std::vec::Vec) { as std::ops::Drop>::drop}, val: Value(Scalar()) } diff --git a/src/test/pretty/issue-4264.pp b/src/test/pretty/issue-4264.pp index 0e45b6f04a8..7b0a00282fb 100644 --- a/src/test/pretty/issue-4264.pp +++ b/src/test/pretty/issue-4264.pp @@ -32,34 +32,34 @@ pub fn bar() ({ ({ let res = ((::alloc::fmt::format as - for<'r> fn(std::fmt::Arguments<'r>) -> std::string::String {std::fmt::format})(((::core::fmt::Arguments::new_v1 - as - fn(&[&'static str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1})((&([("test" - as - &str)] - as - [&str; 1]) - as - &[&str; 1]), - (&(match (() - as - ()) - { - () - => - ([] - as - [std::fmt::ArgumentV1; 0]), - } - as - [std::fmt::ArgumentV1; 0]) - as - &[std::fmt::ArgumentV1; 0])) - as - std::fmt::Arguments)) - as std::string::String); - (res as std::string::String) - } as std::string::String); + for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1 + as + fn(&[&'static str], &[ArgumentV1]) -> Arguments {Arguments::new_v1})((&([("test" + as + &str)] + as + [&str; 1]) + as + &[&str; 1]), + (&(match (() + as + ()) + { + () + => + ([] + as + [ArgumentV1; 0]), + } + as + [ArgumentV1; 0]) + as + &[ArgumentV1; 0])) + as + Arguments)) + as String); + (res as String) + } as String); } as ()) pub type Foo = [i32; (3 as usize)]; pub struct Bar { diff --git a/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile index 9fd1377322b..802b3df460a 100644 --- a/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile +++ b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile @@ -11,9 +11,9 @@ all: tr -d '\r\n' | $(CGREP) -e \ "mismatched types.*\ crateB::try_foo\(foo2\);.*\ - expected struct \`crateA::foo::Foo\`, found struct \`crateA::Foo\`.*\ + expected struct \`crateA::foo::Foo\`, found struct \`Foo\`.*\ different versions of crate \`crateA\`.*\ mismatched types.*\ crateB::try_bar\(bar2\);.*\ - expected trait \`crateA::bar::Bar\`, found trait \`crateA::Bar\`.*\ + expected trait \`crateA::bar::Bar\`, found trait \`Bar\`.*\ different versions of crate \`crateA\`" diff --git a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr index 98c1a22bd1d..4299688221a 100644 --- a/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr +++ b/src/test/ui-fulldeps/dropck-tarena-cycle-checked.stderr @@ -7,7 +7,7 @@ LL | } | - | | | `arena` dropped here while still borrowed - | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `rustc_arena::TypedArena` + | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `TypedArena` error: aborting due to previous error diff --git a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr index 22c7487e8f5..ccffee9cdbd 100644 --- a/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr +++ b/src/test/ui-fulldeps/dropck-tarena-unsound-drop.stderr @@ -7,7 +7,7 @@ LL | } | - | | | `arena` dropped here while still borrowed - | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `rustc_arena::TypedArena` + | borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `TypedArena` error: aborting due to previous error diff --git a/src/test/ui/access-mode-in-closures.stderr b/src/test/ui/access-mode-in-closures.stderr index 349e3f4a836..c32e944afe3 100644 --- a/src/test/ui/access-mode-in-closures.stderr +++ b/src/test/ui/access-mode-in-closures.stderr @@ -5,7 +5,7 @@ LL | match *s { S(v) => v } | ^^ - | | | | | data moved here - | | move occurs because `v` has type `std::vec::Vec`, which does not implement the `Copy` trait + | | move occurs because `v` has type `Vec`, which does not implement the `Copy` trait | help: consider borrowing here: `&*s` error: aborting due to previous error diff --git a/src/test/ui/allocator/not-an-allocator.stderr b/src/test/ui/allocator/not-an-allocator.stderr index 0d52a23c1f3..c0ea8ff47e8 100644 --- a/src/test/ui/allocator/not-an-allocator.stderr +++ b/src/test/ui/allocator/not-an-allocator.stderr @@ -1,35 +1,35 @@ -error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied +error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 | LL | static A: usize = 0; - | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` + | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::alloc` = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied +error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 | LL | static A: usize = 0; - | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` + | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::dealloc` = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied +error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 | LL | static A: usize = 0; - | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` + | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::realloc` = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied +error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied --> $DIR/not-an-allocator.rs:2:1 | LL | static A: usize = 0; - | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize` + | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` | = note: required by `std::alloc::GlobalAlloc::alloc_zeroed` = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/anonymous-higher-ranked-lifetime.stderr b/src/test/ui/anonymous-higher-ranked-lifetime.stderr index de478417d06..576fcc6fade 100644 --- a/src/test/ui/anonymous-higher-ranked-lifetime.stderr +++ b/src/test/ui/anonymous-higher-ranked-lifetime.stderr @@ -59,7 +59,7 @@ error[E0631]: type mismatch in closure arguments LL | g1(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | - | expected signature of `for<'r> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>) -> _` + | expected signature of `for<'r> fn(&'r (), Box<(dyn for<'s> Fn(&'s ()) + 'static)>) -> _` ... LL | fn g1(_: F) where F: Fn(&(), Box) {} | ------------------------- required by this bound in `g1` @@ -81,7 +81,7 @@ error[E0631]: type mismatch in closure arguments LL | g3(|_: (), _: ()| {}); | ^^ -------------- found signature of `fn((), ()) -> _` | | - | expected signature of `for<'s> fn(&'s (), std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r ()) + 'static)>) -> _` + | expected signature of `for<'s> fn(&'s (), Box<(dyn for<'r> Fn(&'r ()) + 'static)>) -> _` ... LL | fn g3(_: F) where F: for<'s> Fn(&'s (), Box) {} | ------------------------------------ required by this bound in `g3` @@ -103,7 +103,7 @@ error[E0631]: type mismatch in closure arguments LL | h1(|_: (), _: (), _: (), _: ()| {}); | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | - | expected signature of `for<'r, 's> fn(&'r (), std::boxed::Box<(dyn for<'t0> std::ops::Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _` + | expected signature of `for<'r, 's> fn(&'r (), Box<(dyn for<'t0> Fn(&'t0 ()) + 'static)>, &'s (), for<'t0, 't1> fn(&'t0 (), &'t1 ())) -> _` ... LL | fn h1(_: F) where F: Fn(&(), Box, &(), fn(&(), &())) {} | -------------------------------------------- required by this bound in `h1` @@ -114,7 +114,7 @@ error[E0631]: type mismatch in closure arguments LL | h2(|_: (), _: (), _: (), _: ()| {}); | ^^ ---------------------------- found signature of `fn((), (), (), ()) -> _` | | - | expected signature of `for<'r, 't0> fn(&'r (), std::boxed::Box<(dyn for<'s> std::ops::Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _` + | expected signature of `for<'r, 't0> fn(&'r (), Box<(dyn for<'s> Fn(&'s ()) + 'static)>, &'t0 (), for<'s, 't1> fn(&'s (), &'t1 ())) -> _` ... LL | fn h2(_: F) where F: for<'t0> Fn(&(), Box, &'t0 (), fn(&(), &())) {} | --------------------------------------------------------- required by this bound in `h2` diff --git a/src/test/ui/array-slice-vec/slice-pat-type-mismatches.rs b/src/test/ui/array-slice-vec/slice-pat-type-mismatches.rs index 34adb42a32f..521b898e7fe 100644 --- a/src/test/ui/array-slice-vec/slice-pat-type-mismatches.rs +++ b/src/test/ui/array-slice-vec/slice-pat-type-mismatches.rs @@ -1,7 +1,7 @@ fn main() { match "foo".to_string() { ['f', 'o', ..] => {} - //~^ ERROR expected an array or slice, found `std::string::String` + //~^ ERROR expected an array or slice, found `String` _ => { } }; diff --git a/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr b/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr index c4548142c13..20a5b99845b 100644 --- a/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr +++ b/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr @@ -4,11 +4,11 @@ error[E0425]: cannot find value `does_not_exist` in this scope LL | match does_not_exist { | ^^^^^^^^^^^^^^ not found in this scope -error[E0529]: expected an array or slice, found `std::string::String` +error[E0529]: expected an array or slice, found `String` --> $DIR/slice-pat-type-mismatches.rs:3:9 | LL | ['f', 'o', ..] => {} - | ^^^^^^^^^^^^^^ pattern cannot match with input type `std::string::String` + | ^^^^^^^^^^^^^^ pattern cannot match with input type `String` error[E0527]: pattern requires 1 element but array has 3 --> $DIR/slice-pat-type-mismatches.rs:18:9 diff --git a/src/test/ui/asm/type-check-1.stderr b/src/test/ui/asm/type-check-1.stderr index 1f11d19c70e..556e83fdb0d 100644 --- a/src/test/ui/asm/type-check-1.stderr +++ b/src/test/ui/asm/type-check-1.stderr @@ -16,7 +16,7 @@ error[E0277]: the size for values of type `[u64]` cannot be known at compilation LL | asm!("{}", in(reg) v[..]); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u64]` + = help: the trait `Sized` is not implemented for `[u64]` = note: all inline asm arguments must have a statically known size error[E0277]: the size for values of type `[u64]` cannot be known at compilation time @@ -25,7 +25,7 @@ error[E0277]: the size for values of type `[u64]` cannot be known at compilation LL | asm!("{}", out(reg) v[..]); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u64]` + = help: the trait `Sized` is not implemented for `[u64]` = note: all inline asm arguments must have a statically known size error[E0277]: the size for values of type `[u64]` cannot be known at compilation time @@ -34,7 +34,7 @@ error[E0277]: the size for values of type `[u64]` cannot be known at compilation LL | asm!("{}", inout(reg) v[..]); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u64]` + = help: the trait `Sized` is not implemented for `[u64]` = note: all inline asm arguments must have a statically known size error: aborting due to 5 previous errors diff --git a/src/test/ui/asm/type-check-2.rs b/src/test/ui/asm/type-check-2.rs index 1652e9e4c9f..01c8b4eb654 100644 --- a/src/test/ui/asm/type-check-2.rs +++ b/src/test/ui/asm/type-check-2.rs @@ -78,7 +78,7 @@ fn main() { asm!("{}", in(reg) |x: i32| x); //~^ ERROR cannot use value of type asm!("{}", in(reg) vec![0]); - //~^ ERROR cannot use value of type `std::vec::Vec` for inline assembly + //~^ ERROR cannot use value of type `Vec` for inline assembly asm!("{}", in(reg) (1, 2, 3)); //~^ ERROR cannot use value of type `(i32, i32, i32)` for inline assembly asm!("{}", in(reg) [1, 2, 3]); diff --git a/src/test/ui/asm/type-check-2.stderr b/src/test/ui/asm/type-check-2.stderr index dc7949534f1..a520bea8f1d 100644 --- a/src/test/ui/asm/type-check-2.stderr +++ b/src/test/ui/asm/type-check-2.stderr @@ -26,7 +26,7 @@ LL | asm!("{}", in(reg) |x: i32| x); | = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly -error: cannot use value of type `std::vec::Vec` for inline assembly +error: cannot use value of type `Vec` for inline assembly --> $DIR/type-check-2.rs:80:28 | LL | asm!("{}", in(reg) vec![0]); diff --git a/src/test/ui/asm/type-check-3.rs b/src/test/ui/asm/type-check-3.rs index 0f803eff17b..6890baead81 100644 --- a/src/test/ui/asm/type-check-3.rs +++ b/src/test/ui/asm/type-check-3.rs @@ -12,9 +12,9 @@ fn main() { asm!("{}", in(reg) 0i128); //~^ ERROR type `i128` cannot be used with this register class asm!("{}", in(reg) _mm_setzero_ps()); - //~^ ERROR type `std::arch::x86_64::__m128` cannot be used with this register class + //~^ ERROR type `__m128` cannot be used with this register class asm!("{}", in(reg) _mm256_setzero_ps()); - //~^ ERROR type `std::arch::x86_64::__m256` cannot be used with this register class + //~^ ERROR type `__m256` cannot be used with this register class asm!("{}", in(xmm_reg) 0u8); //~^ ERROR type `u8` cannot be used with this register class asm!("{:e}", in(reg) 0i32); diff --git a/src/test/ui/asm/type-check-3.stderr b/src/test/ui/asm/type-check-3.stderr index 01dbe78db88..42497456ac3 100644 --- a/src/test/ui/asm/type-check-3.stderr +++ b/src/test/ui/asm/type-check-3.stderr @@ -6,7 +6,7 @@ LL | asm!("{}", in(reg) 0i128); | = note: register class `reg` supports these types: i16, i32, i64, f32, f64 -error: type `std::arch::x86_64::__m128` cannot be used with this register class +error: type `__m128` cannot be used with this register class --> $DIR/type-check-3.rs:14:28 | LL | asm!("{}", in(reg) _mm_setzero_ps()); @@ -14,7 +14,7 @@ LL | asm!("{}", in(reg) _mm_setzero_ps()); | = note: register class `reg` supports these types: i16, i32, i64, f32, f64 -error: type `std::arch::x86_64::__m256` cannot be used with this register class +error: type `__m256` cannot be used with this register class --> $DIR/type-check-3.rs:16:28 | LL | asm!("{}", in(reg) _mm256_setzero_ps()); diff --git a/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs b/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs index a58cec53421..498a555c441 100644 --- a/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs +++ b/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs @@ -24,7 +24,7 @@ impl Bar for AssocNoCopy { type Assoc = String; } impl Thing for AssocNoCopy { type Out = Box>; - //~^ ERROR the trait bound `std::string::String: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `String: Copy` is not satisfied fn func() -> Self::Out { Box::new(AssocNoCopy) diff --git a/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr b/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr index b6b49c2e903..5236f0efa86 100644 --- a/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr +++ b/src/test/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/assoc-type-eq-with-dyn-atb-fail.rs:26:28 | LL | type Out = Box>; - | ^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | ^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | = note: the return type of a function must have a statically known size diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs index 3db5e468b35..556d8900d1a 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - // NOTE: rustc cannot currently handle bounds of the form `for<'a> >::Assoc: Baz`. // This should hopefully be fixed with Chalk. @@ -29,15 +27,15 @@ trait Case1 { pub struct S1; impl Case1 for S1 { -//~^ ERROR `>::App` doesn't implement `std::fmt::Debug` [E0277] +//~^ ERROR `>::App` doesn't implement `Debug` [E0277] type C = Once>; } fn assume_case1() { -//~^ ERROR `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug` [E0277] -//~| ERROR `<::C as std::iter::Iterator>::Item` is not an iterator [E0277] -//~| ERROR `<::C as std::iter::Iterator>::Item` cannot be sent between threads safely [E0277] -//~| ERROR `<::C as std::iter::Iterator>::Item` cannot be shared between threads safely [E0277] +//~^ ERROR `<_ as Lam<&'a u8>>::App` doesn't implement `Debug` [E0277] +//~| ERROR `<::C as Iterator>::Item` is not an iterator [E0277] +//~| ERROR `<::C as Iterator>::Item` cannot be sent between threads safely [E0277] +//~| ERROR `<::C as Iterator>::Item` cannot be shared between threads safely [E0277] fn assert_a<_0, A>() where A: Iterator, _0: Debug {} assert_a::<_, T::A>(); diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index cbacc3610dc..49b5e7fbb89 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -1,5 +1,5 @@ -error[E0277]: `>::App` doesn't implement `std::fmt::Debug` - --> $DIR/bad-bounds-on-assoc-in-trait.rs:31:6 +error[E0277]: `>::App` doesn't implement `Debug` + --> $DIR/bad-bounds-on-assoc-in-trait.rs:29:6 | LL | trait Case1 { | ----- required by a bound in this @@ -8,24 +8,24 @@ LL | Debug | ----- required by this bound in `Case1` ... LL | impl Case1 for S1 { - | ^^^^^ `>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^ `>::App` cannot be formatted using `{:?}` because it doesn't implement `Debug` | - = help: the trait `for<'a> std::fmt::Debug` is not implemented for `>::App` + = help: the trait `for<'a> Debug` is not implemented for `>::App` -error[E0277]: `<::C as std::iter::Iterator>::Item` is not an iterator - --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20 +error[E0277]: `<::C as Iterator>::Item` is not an iterator + --> $DIR/bad-bounds-on-assoc-in-trait.rs:34:20 | LL | fn assume_case1() { - | ^^^^^ `<::C as std::iter::Iterator>::Item` is not an iterator + | ^^^^^ `<::C as Iterator>::Item` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `<::C as std::iter::Iterator>::Item` + = help: the trait `Iterator` is not implemented for `<::C as Iterator>::Item` help: consider further restricting the associated type | -LL | fn assume_case1() where <::C as std::iter::Iterator>::Item: std::iter::Iterator { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn assume_case1() where <::C as Iterator>::Item: Iterator { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `<::C as std::iter::Iterator>::Item` cannot be sent between threads safely - --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20 +error[E0277]: `<::C as Iterator>::Item` cannot be sent between threads safely + --> $DIR/bad-bounds-on-assoc-in-trait.rs:34:20 | LL | trait Case1 { | ----- required by a bound in this @@ -34,16 +34,16 @@ LL | Send + Iterator() { - | ^^^^^ `<::C as std::iter::Iterator>::Item` cannot be sent between threads safely + | ^^^^^ `<::C as Iterator>::Item` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `<::C as std::iter::Iterator>::Item` + = help: the trait `Send` is not implemented for `<::C as Iterator>::Item` help: consider further restricting the associated type | -LL | fn assume_case1() where <::C as std::iter::Iterator>::Item: std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn assume_case1() where <::C as Iterator>::Item: Send { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `<::C as std::iter::Iterator>::Item` cannot be shared between threads safely - --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20 +error[E0277]: `<::C as Iterator>::Item` cannot be shared between threads safely + --> $DIR/bad-bounds-on-assoc-in-trait.rs:34:20 | LL | trait Case1 { | ----- required by a bound in this @@ -52,16 +52,16 @@ LL | > + Sync>; | ---- required by this bound in `Case1` ... LL | fn assume_case1() { - | ^^^^^ `<::C as std::iter::Iterator>::Item` cannot be shared between threads safely + | ^^^^^ `<::C as Iterator>::Item` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `<::C as std::iter::Iterator>::Item` + = help: the trait `Sync` is not implemented for `<::C as Iterator>::Item` help: consider further restricting the associated type | -LL | fn assume_case1() where <::C as std::iter::Iterator>::Item: std::marker::Sync { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn assume_case1() where <::C as Iterator>::Item: Sync { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug` - --> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20 +error[E0277]: `<_ as Lam<&'a u8>>::App` doesn't implement `Debug` + --> $DIR/bad-bounds-on-assoc-in-trait.rs:34:20 | LL | trait Case1 { | ----- required by a bound in this @@ -70,9 +70,9 @@ LL | Debug | ----- required by this bound in `Case1` ... LL | fn assume_case1() { - | ^^^^^ `<_ as Lam<&'a u8>>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^ `<_ as Lam<&'a u8>>::App` cannot be formatted using `{:?}` because it doesn't implement `Debug` | - = help: the trait `for<'a> std::fmt::Debug` is not implemented for `<_ as Lam<&'a u8>>::App` + = help: the trait `for<'a> Debug` is not implemented for `<_ as Lam<&'a u8>>::App` error: aborting due to 5 previous errors diff --git a/src/test/ui/associated-type-bounds/duplicate.rs b/src/test/ui/associated-type-bounds/duplicate.rs index 8b5c5219430..6c860530832 100644 --- a/src/test/ui/associated-type-bounds/duplicate.rs +++ b/src/test/ui/associated-type-bounds/duplicate.rs @@ -8,172 +8,172 @@ use std::iter; struct SI1> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] struct SI2> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] struct SI3> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] struct SW1 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] struct SW2 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] struct SW3 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] enum EI1> { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] enum EI2> { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] enum EI3> { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] enum EW1 where T: Iterator { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] enum EW2 where T: Iterator { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] enum EW3 where T: Iterator { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] union UI1> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] union UI2> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] union UI3> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] union UW1 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] union UW2 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] union UW3 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FI1>() {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FI2>() {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FI3>() {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FW1() where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FW2() where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FW3() where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FRPIT1() -> impl Iterator { iter::empty() } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FRPIT2() -> impl Iterator { iter::empty() } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FRPIT3() -> impl Iterator { iter::empty() } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FAPIT1(_: impl Iterator) {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FAPIT2(_: impl Iterator) {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FAPIT3(_: impl Iterator) {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] const CIT1: impl Iterator = iter::empty(); -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] const CIT2: impl Iterator = iter::empty(); -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] const CIT3: impl Iterator = iter::empty(); -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] static SIT1: impl Iterator = iter::empty(); -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] static SIT2: impl Iterator = iter::empty(); -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] static SIT3: impl Iterator = iter::empty(); -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn lit1() { let _: impl Iterator = iter::empty(); } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn lit2() { let _: impl Iterator = iter::empty(); } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn lit3() { let _: impl Iterator = iter::empty(); } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI1> = T; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI2> = T; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI3> = T; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAW1 where T: Iterator = T; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAW2 where T: Iterator = T; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAW3 where T: Iterator = T; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type ETAI1> = impl Copy; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses type ETAI2> = impl Copy; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses type ETAI3> = impl Copy; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses type ETAI4 = impl Iterator; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses //~| ERROR could not find defining uses //~| ERROR could not find defining uses type ETAI5 = impl Iterator; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses //~| ERROR could not find defining uses //~| ERROR could not find defining uses type ETAI6 = impl Iterator; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses //~| ERROR could not find defining uses //~| ERROR could not find defining uses trait TRI1> {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRI2> {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRI3> {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS1: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS2: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS3: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRW1 where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRW2 where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRW3 where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRSW1 where Self: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] -//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRSW2 where Self: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] -//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRSW3 where Self: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] -//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRA1 { type A: Iterator; } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRA2 { type A: Iterator; } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRA3 { type A: Iterator; } -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TADyn1 = dyn Iterator; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses //~| ERROR could not find defining uses type TADyn2 = Box>; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses //~| ERROR could not find defining uses type TADyn3 = dyn Iterator; -//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719] +//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR could not find defining uses //~| ERROR could not find defining uses diff --git a/src/test/ui/associated-type-bounds/duplicate.stderr b/src/test/ui/associated-type-bounds/duplicate.stderr index 712211e60cb..ac59e1f2fba 100644 --- a/src/test/ui/associated-type-bounds/duplicate.stderr +++ b/src/test/ui/associated-type-bounds/duplicate.stderr @@ -7,7 +7,7 @@ LL | #![feature(impl_trait_in_bindings)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #63065 for more information -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:10:36 | LL | struct SI1> { f: T } @@ -15,7 +15,7 @@ LL | struct SI1> { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:12:36 | LL | struct SI2> { f: T } @@ -23,7 +23,7 @@ LL | struct SI2> { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:14:39 | LL | struct SI3> { f: T } @@ -31,7 +31,7 @@ LL | struct SI3> { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:16:45 | LL | struct SW1 where T: Iterator { f: T } @@ -39,7 +39,7 @@ LL | struct SW1 where T: Iterator { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:18:45 | LL | struct SW2 where T: Iterator { f: T } @@ -47,7 +47,7 @@ LL | struct SW2 where T: Iterator { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:20:48 | LL | struct SW3 where T: Iterator { f: T } @@ -55,7 +55,7 @@ LL | struct SW3 where T: Iterator { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:23:34 | LL | enum EI1> { V(T) } @@ -63,7 +63,7 @@ LL | enum EI1> { V(T) } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:25:34 | LL | enum EI2> { V(T) } @@ -71,7 +71,7 @@ LL | enum EI2> { V(T) } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:27:37 | LL | enum EI3> { V(T) } @@ -79,7 +79,7 @@ LL | enum EI3> { V(T) } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:29:43 | LL | enum EW1 where T: Iterator { V(T) } @@ -87,7 +87,7 @@ LL | enum EW1 where T: Iterator { V(T) } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:31:43 | LL | enum EW2 where T: Iterator { V(T) } @@ -95,7 +95,7 @@ LL | enum EW2 where T: Iterator { V(T) } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:33:46 | LL | enum EW3 where T: Iterator { V(T) } @@ -103,7 +103,7 @@ LL | enum EW3 where T: Iterator { V(T) } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:36:35 | LL | union UI1> { f: T } @@ -111,7 +111,7 @@ LL | union UI1> { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:38:35 | LL | union UI2> { f: T } @@ -119,7 +119,7 @@ LL | union UI2> { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:40:38 | LL | union UI3> { f: T } @@ -127,7 +127,7 @@ LL | union UI3> { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:42:44 | LL | union UW1 where T: Iterator { f: T } @@ -135,7 +135,7 @@ LL | union UW1 where T: Iterator { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:44:44 | LL | union UW2 where T: Iterator { f: T } @@ -143,7 +143,7 @@ LL | union UW2 where T: Iterator { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:46:47 | LL | union UW3 where T: Iterator { f: T } @@ -151,7 +151,7 @@ LL | union UW3 where T: Iterator { f: T } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:49:32 | LL | fn FI1>() {} @@ -159,7 +159,7 @@ LL | fn FI1>() {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:51:32 | LL | fn FI2>() {} @@ -167,7 +167,7 @@ LL | fn FI2>() {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:53:35 | LL | fn FI3>() {} @@ -175,7 +175,7 @@ LL | fn FI3>() {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:55:43 | LL | fn FW1() where T: Iterator {} @@ -183,7 +183,7 @@ LL | fn FW1() where T: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:57:43 | LL | fn FW2() where T: Iterator {} @@ -191,7 +191,7 @@ LL | fn FW2() where T: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:59:46 | LL | fn FW3() where T: Iterator {} @@ -199,7 +199,7 @@ LL | fn FW3() where T: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:68:40 | LL | fn FAPIT1(_: impl Iterator) {} @@ -207,7 +207,7 @@ LL | fn FAPIT1(_: impl Iterator) {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:70:40 | LL | fn FAPIT2(_: impl Iterator) {} @@ -215,7 +215,7 @@ LL | fn FAPIT2(_: impl Iterator) {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:72:43 | LL | fn FAPIT3(_: impl Iterator) {} @@ -223,7 +223,7 @@ LL | fn FAPIT3(_: impl Iterator) {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:75:39 | LL | const CIT1: impl Iterator = iter::empty(); @@ -231,7 +231,7 @@ LL | const CIT1: impl Iterator = iter::empty(); | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:77:39 | LL | const CIT2: impl Iterator = iter::empty(); @@ -239,7 +239,7 @@ LL | const CIT2: impl Iterator = iter::empty(); | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:79:42 | LL | const CIT3: impl Iterator = iter::empty(); @@ -247,7 +247,7 @@ LL | const CIT3: impl Iterator = iter::empty(); | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:81:40 | LL | static SIT1: impl Iterator = iter::empty(); @@ -255,7 +255,7 @@ LL | static SIT1: impl Iterator = iter::empty(); | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:83:40 | LL | static SIT2: impl Iterator = iter::empty(); @@ -263,7 +263,7 @@ LL | static SIT2: impl Iterator = iter::empty(); | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:85:43 | LL | static SIT3: impl Iterator = iter::empty(); @@ -271,7 +271,7 @@ LL | static SIT3: impl Iterator = iter::empty(); | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:88:46 | LL | fn lit1() { let _: impl Iterator = iter::empty(); } @@ -279,7 +279,7 @@ LL | fn lit1() { let _: impl Iterator = iter::empty(); } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:90:46 | LL | fn lit2() { let _: impl Iterator = iter::empty(); } @@ -287,7 +287,7 @@ LL | fn lit2() { let _: impl Iterator = iter::empty(); } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:92:49 | LL | fn lit3() { let _: impl Iterator = iter::empty(); } @@ -295,7 +295,7 @@ LL | fn lit3() { let _: impl Iterator = iter::empt | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:95:35 | LL | type TAI1> = T; @@ -303,7 +303,7 @@ LL | type TAI1> = T; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:97:35 | LL | type TAI2> = T; @@ -311,7 +311,7 @@ LL | type TAI2> = T; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:99:38 | LL | type TAI3> = T; @@ -319,7 +319,7 @@ LL | type TAI3> = T; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:101:44 | LL | type TAW1 where T: Iterator = T; @@ -327,7 +327,7 @@ LL | type TAW1 where T: Iterator = T; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:103:44 | LL | type TAW2 where T: Iterator = T; @@ -335,7 +335,7 @@ LL | type TAW2 where T: Iterator = T; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:105:47 | LL | type TAW3 where T: Iterator = T; @@ -343,7 +343,7 @@ LL | type TAW3 where T: Iterator = T; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:108:36 | LL | type ETAI1> = impl Copy; @@ -351,7 +351,7 @@ LL | type ETAI1> = impl Copy; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:62:42 | LL | fn FRPIT1() -> impl Iterator { iter::empty() } @@ -359,7 +359,7 @@ LL | fn FRPIT1() -> impl Iterator { iter::empty() } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:64:42 | LL | fn FRPIT2() -> impl Iterator { iter::empty() } @@ -367,7 +367,7 @@ LL | fn FRPIT2() -> impl Iterator { iter::empty() } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:66:45 | LL | fn FRPIT3() -> impl Iterator { iter::empty() } @@ -381,7 +381,7 @@ error: could not find defining uses LL | type ETAI1> = impl Copy; | ^^^^^^^^^ -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:111:36 | LL | type ETAI2> = impl Copy; @@ -395,7 +395,7 @@ error: could not find defining uses LL | type ETAI2> = impl Copy; | ^^^^^^^^^ -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:114:39 | LL | type ETAI3> = impl Copy; @@ -415,7 +415,7 @@ error: could not find defining uses LL | type ETAI4 = impl Iterator; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:117:40 | LL | type ETAI4 = impl Iterator; @@ -429,7 +429,7 @@ error: could not find defining uses LL | type ETAI5 = impl Iterator; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:122:40 | LL | type ETAI5 = impl Iterator; @@ -443,7 +443,7 @@ error: could not find defining uses LL | type ETAI6 = impl Iterator; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:127:43 | LL | type ETAI6 = impl Iterator; @@ -451,7 +451,7 @@ LL | type ETAI6 = impl Iterator; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:133:36 | LL | trait TRI1> {} @@ -459,7 +459,7 @@ LL | trait TRI1> {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:135:36 | LL | trait TRI2> {} @@ -467,7 +467,7 @@ LL | trait TRI2> {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:137:39 | LL | trait TRI3> {} @@ -475,7 +475,7 @@ LL | trait TRI3> {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:139:34 | LL | trait TRS1: Iterator {} @@ -483,7 +483,7 @@ LL | trait TRS1: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:141:34 | LL | trait TRS2: Iterator {} @@ -491,7 +491,7 @@ LL | trait TRS2: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:143:37 | LL | trait TRS3: Iterator {} @@ -499,7 +499,7 @@ LL | trait TRS3: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:145:45 | LL | trait TRW1 where T: Iterator {} @@ -507,7 +507,7 @@ LL | trait TRW1 where T: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:147:45 | LL | trait TRW2 where T: Iterator {} @@ -515,7 +515,7 @@ LL | trait TRW2 where T: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:149:48 | LL | trait TRW3 where T: Iterator {} @@ -523,7 +523,7 @@ LL | trait TRW3 where T: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:151:46 | LL | trait TRSW1 where Self: Iterator {} @@ -531,7 +531,7 @@ LL | trait TRSW1 where Self: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:151:46 | LL | trait TRSW1 where Self: Iterator {} @@ -539,7 +539,7 @@ LL | trait TRSW1 where Self: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:154:46 | LL | trait TRSW2 where Self: Iterator {} @@ -547,7 +547,7 @@ LL | trait TRSW2 where Self: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:154:46 | LL | trait TRSW2 where Self: Iterator {} @@ -555,7 +555,7 @@ LL | trait TRSW2 where Self: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:157:49 | LL | trait TRSW3 where Self: Iterator {} @@ -563,7 +563,7 @@ LL | trait TRSW3 where Self: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:157:49 | LL | trait TRSW3 where Self: Iterator {} @@ -571,7 +571,7 @@ LL | trait TRSW3 where Self: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:160:43 | LL | trait TRA1 { type A: Iterator; } @@ -579,7 +579,7 @@ LL | trait TRA1 { type A: Iterator; } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:162:43 | LL | trait TRA2 { type A: Iterator; } @@ -587,7 +587,7 @@ LL | trait TRA2 { type A: Iterator; } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:164:46 | LL | trait TRA3 { type A: Iterator; } @@ -595,7 +595,7 @@ LL | trait TRA3 { type A: Iterator; } | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:167:40 | LL | type TADyn1 = dyn Iterator; @@ -603,7 +603,7 @@ LL | type TADyn1 = dyn Iterator; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:171:44 | LL | type TADyn2 = Box>; @@ -611,7 +611,7 @@ LL | type TADyn2 = Box>; | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/duplicate.rs:175:43 | LL | type TADyn3 = dyn Iterator; diff --git a/src/test/ui/associated-types/associated-types-in-ambiguous-context.stderr b/src/test/ui/associated-types/associated-types-in-ambiguous-context.stderr index 77835c5f676..289911779ff 100644 --- a/src/test/ui/associated-types/associated-types-in-ambiguous-context.stderr +++ b/src/test/ui/associated-types/associated-types-in-ambiguous-context.stderr @@ -14,7 +14,7 @@ error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:25:10 | LL | type X = std::ops::Deref::Target; - | ^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `::Target` + | ^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `::Target` error[E0223]: ambiguous associated type --> $DIR/associated-types-in-ambiguous-context.rs:11:23 diff --git a/src/test/ui/associated-types/associated-types-issue-20346.stderr b/src/test/ui/associated-types/associated-types-issue-20346.stderr index db35c1af171..7193d4163b9 100644 --- a/src/test/ui/associated-types/associated-types-issue-20346.stderr +++ b/src/test/ui/associated-types/associated-types-issue-20346.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving ` as Iterator>::Item == std::option::Option` +error[E0271]: type mismatch resolving ` as Iterator>::Item == Option` --> $DIR/associated-types-issue-20346.rs:34:5 | LL | fn is_iterator_of>(_: &I) {} @@ -8,9 +8,9 @@ LL | fn test_adapter>>(it: I) { | - this type parameter ... LL | is_iterator_of::, _>(&adapter); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found type parameter `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found type parameter `T` | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found type `T` error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr b/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr index 82c0eba87ef..9f1abf2a6c4 100644 --- a/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr +++ b/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr @@ -1,10 +1,10 @@ -error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == i32` +error[E0271]: type mismatch resolving ` as Iterator>::Item == i32` --> $DIR/associated-types-overridden-binding-2.rs:6:43 | LL | let _: &dyn I32Iterator = &vec![42].into_iter(); | ^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32` | - = note: required for the cast to the object type `dyn std::iter::Iterator` + = note: required for the cast to the object type `dyn Iterator` error: aborting due to previous error diff --git a/src/test/ui/associated-types/associated-types-overridden-binding.stderr b/src/test/ui/associated-types/associated-types-overridden-binding.stderr index b8321ce5b25..87612679af6 100644 --- a/src/test/ui/associated-types/associated-types-overridden-binding.stderr +++ b/src/test/ui/associated-types/associated-types-overridden-binding.stderr @@ -1,18 +1,18 @@ -error[E0284]: type annotations needed: cannot satisfy `::Item == i32` +error[E0284]: type annotations needed: cannot satisfy `::Item == i32` --> $DIR/associated-types-overridden-binding.rs:4:12 | LL | trait Foo: Iterator {} | ---------- required by this bound in `Foo` LL | trait Bar: Foo {} - | ^^^^^^^^^^^^^^^ cannot satisfy `::Item == i32` + | ^^^^^^^^^^^^^^^ cannot satisfy `::Item == i32` -error[E0284]: type annotations needed: cannot satisfy `::Item == i32` +error[E0284]: type annotations needed: cannot satisfy `::Item == i32` --> $DIR/associated-types-overridden-binding.rs:7:21 | LL | trait I32Iterator = Iterator; | ---------- required by this bound in `I32Iterator` LL | trait U32Iterator = I32Iterator; - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `::Item == i32` + | ^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `::Item == i32` error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/associated-types-unsized.fixed b/src/test/ui/associated-types/associated-types-unsized.fixed index 9837796e308..328c8f944e2 100644 --- a/src/test/ui/associated-types/associated-types-unsized.fixed +++ b/src/test/ui/associated-types/associated-types-unsized.fixed @@ -6,7 +6,7 @@ trait Get { fn get(&self) -> ::Value; } -fn foo(t: T) where ::Value: std::marker::Sized { +fn foo(t: T) where ::Value: Sized { let x = t.get(); //~ ERROR the size for values of type } diff --git a/src/test/ui/associated-types/associated-types-unsized.stderr b/src/test/ui/associated-types/associated-types-unsized.stderr index e96d0e0eff7..c2af5483003 100644 --- a/src/test/ui/associated-types/associated-types-unsized.stderr +++ b/src/test/ui/associated-types/associated-types-unsized.stderr @@ -4,13 +4,13 @@ error[E0277]: the size for values of type `::Value` cannot be known at LL | let x = t.get(); | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `::Value` + = help: the trait `Sized` is not implemented for `::Value` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature help: consider further restricting the associated type | -LL | fn foo(t: T) where ::Value: std::marker::Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn foo(t: T) where ::Value: Sized { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/associated-types/defaults-suitability.rs b/src/test/ui/associated-types/defaults-suitability.rs index 2be01cba105..30c2555df8b 100644 --- a/src/test/ui/associated-types/defaults-suitability.rs +++ b/src/test/ui/associated-types/defaults-suitability.rs @@ -13,12 +13,12 @@ struct NotClone; // Assoc. type bounds must hold for the default type trait Tr { type Ty: Clone = NotClone; - //~^ ERROR the trait bound `NotClone: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `NotClone: Clone` is not satisfied } // Where-clauses defined on the trait must also be considered trait Tr2 where Self::Ty: Clone { - //~^ ERROR the trait bound `NotClone: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `NotClone: Clone` is not satisfied type Ty = NotClone; } @@ -31,7 +31,7 @@ trait Tr3 { // Involved type parameters must fulfill all bounds required by defaults that mention them trait Foo { type Bar: Clone = Vec; - //~^ ERROR the trait bound `T: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `T: Clone` is not satisfied } trait Bar: Sized { @@ -55,7 +55,7 @@ trait C where // Test that we get all expected errors if that default is unsuitable trait D where Vec: Clone, - //~^ ERROR the trait bound `NotClone: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `NotClone: Clone` is not satisfied Self::Assoc: IsU8, //~^ ERROR the trait bound `NotClone: IsU8` is not satisfied bool: IsU8, @@ -70,7 +70,7 @@ trait D where // `Clone`. trait Foo2 { type Bar: Clone = Vec; - //~^ ERROR the trait bound `>::Baz: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `>::Baz: Clone` is not satisfied type Baz = T; } @@ -79,7 +79,7 @@ trait Foo2 { // this would be accepted. trait Foo25 { type Bar: Clone = Vec; - //~^ ERROR the trait bound `>::Baz: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `>::Baz: Clone` is not satisfied type Baz = T; } @@ -88,7 +88,7 @@ trait Foo25 { trait Foo3 where Self::Bar: Clone, Self::Baz: Clone, - //~^ ERROR the trait bound `T: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `T: Clone` is not satisfied { type Bar = Vec; type Baz = T; diff --git a/src/test/ui/associated-types/defaults-suitability.stderr b/src/test/ui/associated-types/defaults-suitability.stderr index 4ff4ee542b2..c2ad4c5824e 100644 --- a/src/test/ui/associated-types/defaults-suitability.stderr +++ b/src/test/ui/associated-types/defaults-suitability.stderr @@ -1,33 +1,33 @@ -error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `NotClone: Clone` is not satisfied --> $DIR/defaults-suitability.rs:15:14 | LL | trait Tr { | -------- required by `Tr` LL | type Ty: Clone = NotClone; - | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone` + | ^^^^^ the trait `Clone` is not implemented for `NotClone` -error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `NotClone: Clone` is not satisfied --> $DIR/defaults-suitability.rs:20:27 | LL | trait Tr2 where Self::Ty: Clone { | --------------------------^^^^^ | | | - | | the trait `std::clone::Clone` is not implemented for `NotClone` + | | the trait `Clone` is not implemented for `NotClone` | required by `Tr2` -error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `T: Clone` is not satisfied --> $DIR/defaults-suitability.rs:33:15 | LL | trait Foo { | ------------ required by `Foo` LL | type Bar: Clone = Vec; - | ^^^^^ the trait `std::clone::Clone` is not implemented for `T` + | ^^^^^ the trait `Clone` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec` + = note: required because of the requirements on the impl of `Clone` for `Vec` help: consider restricting type parameter `T` | -LL | trait Foo { - | ^^^^^^^^^^^^^^^^^^^ +LL | trait Foo { + | ^^^^^^^ error[E0277]: the trait bound `(): Foo` is not satisfied --> $DIR/defaults-suitability.rs:39:17 @@ -66,12 +66,12 @@ LL | | type Assoc = NotClone; LL | | } | |_- required by `D` -error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `NotClone: Clone` is not satisfied --> $DIR/defaults-suitability.rs:57:23 | LL | / trait D where LL | | Vec: Clone, - | | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone` + | | ^^^^^ the trait `Clone` is not implemented for `NotClone` LL | | LL | | Self::Assoc: IsU8, ... | @@ -79,43 +79,43 @@ LL | | type Assoc = NotClone; LL | | } | |_- required by `D` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec` + = note: required because of the requirements on the impl of `Clone` for `Vec` -error[E0277]: the trait bound `>::Baz: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `>::Baz: Clone` is not satisfied --> $DIR/defaults-suitability.rs:72:15 | LL | trait Foo2 { | ------------- required by `Foo2` LL | type Bar: Clone = Vec; - | ^^^^^ the trait `std::clone::Clone` is not implemented for `>::Baz` + | ^^^^^ the trait `Clone` is not implemented for `>::Baz` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<>::Baz>` + = note: required because of the requirements on the impl of `Clone` for `Vec<>::Baz>` help: consider further restricting the associated type | -LL | trait Foo2 where >::Baz: std::clone::Clone { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Foo2 where >::Baz: Clone { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `>::Baz: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `>::Baz: Clone` is not satisfied --> $DIR/defaults-suitability.rs:81:15 | LL | trait Foo25 { | --------------------- required by `Foo25` LL | type Bar: Clone = Vec; - | ^^^^^ the trait `std::clone::Clone` is not implemented for `>::Baz` + | ^^^^^ the trait `Clone` is not implemented for `>::Baz` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<>::Baz>` + = note: required because of the requirements on the impl of `Clone` for `Vec<>::Baz>` help: consider further restricting the associated type | -LL | trait Foo25 where >::Baz: std::clone::Clone { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Foo25 where >::Baz: Clone { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `T: Clone` is not satisfied --> $DIR/defaults-suitability.rs:90:16 | LL | / trait Foo3 where LL | | Self::Bar: Clone, LL | | Self::Baz: Clone, - | | ^^^^^ the trait `std::clone::Clone` is not implemented for `T` + | | ^^^^^ the trait `Clone` is not implemented for `T` LL | | ... | LL | | type Baz = T; @@ -124,8 +124,8 @@ LL | | } | help: consider further restricting type parameter `T` | -LL | Self::Baz: Clone, T: std::clone::Clone - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | Self::Baz: Clone, T: Clone + | ^^^^^^^^^^ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/defaults-suitability.rs:27:5 @@ -136,9 +136,9 @@ LL | type Ty = Vec<[u8]>; ::: $SRC_DIR/alloc/src/vec.rs:LL:COL | LL | pub struct Vec { - | - required by this bound in `std::vec::Vec` + | - required by this bound in `Vec` | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` error: aborting due to 11 previous errors diff --git a/src/test/ui/associated-types/defaults-unsound-62211-1.rs b/src/test/ui/associated-types/defaults-unsound-62211-1.rs index c8b4734d6ed..f283d22b3c7 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-1.rs +++ b/src/test/ui/associated-types/defaults-unsound-62211-1.rs @@ -19,9 +19,9 @@ trait UncheckedCopy: Sized { // This Output is said to be Copy. Yet we default to Self // and it's accepted, not knowing if Self ineed is Copy type Output: Copy - //~^ ERROR the trait bound `Self: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `Self: Copy` is not satisfied + Deref - //~^ ERROR the trait bound `Self: std::ops::Deref` is not satisfied + //~^ ERROR the trait bound `Self: Deref` is not satisfied + AddAssign<&'static str> //~^ ERROR cannot add-assign `&'static str` to `Self` + From @@ -40,9 +40,9 @@ trait UncheckedCopy: Sized { impl UncheckedCopy for T {} //~^ ERROR `T` doesn't implement `std::fmt::Display` -//~| ERROR the trait bound `T: std::ops::Deref` is not satisfied +//~| ERROR the trait bound `T: Deref` is not satisfied //~| ERROR cannot add-assign `&'static str` to `T` -//~| ERROR the trait bound `T: std::marker::Copy` is not satisfied +//~| ERROR the trait bound `T: Copy` is not satisfied fn bug(origin: T) { let origin = T::make_origin(origin); diff --git a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr index 2ba854eac46..29a7c2eab41 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Self: Copy` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:21:18 | LL | trait UncheckedCopy: Sized { | -------------------------- required by `UncheckedCopy` ... LL | type Output: Copy - | ^^^^ the trait `std::marker::Copy` is not implemented for `Self` + | ^^^^ the trait `Copy` is not implemented for `Self` | help: consider further restricting `Self` | -LL | trait UncheckedCopy: Sized + std::marker::Copy { - | ^^^^^^^^^^^^^^^^^^^ +LL | trait UncheckedCopy: Sized + Copy { + | ^^^^^^ error[E0277]: cannot add-assign `&'static str` to `Self` --> $DIR/defaults-unsound-62211-1.rs:25:7 @@ -23,22 +23,22 @@ LL | + AddAssign<&'static str> | help: consider further restricting `Self` | -LL | trait UncheckedCopy: Sized + std::ops::AddAssign<&'static str> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied +error[E0277]: the trait bound `Self: Deref` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:23:7 | LL | trait UncheckedCopy: Sized { | -------------------------- required by `UncheckedCopy` ... LL | + Deref - | ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self` + | ^^^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `Self` | help: consider further restricting `Self` | -LL | trait UncheckedCopy: Sized + std::ops::Deref { - | ^^^^^^^^^^^^^^^^^ +LL | trait UncheckedCopy: Sized + Deref { + | ^^^^^^^ error[E0277]: `Self` doesn't implement `std::fmt::Display` --> $DIR/defaults-unsound-62211-1.rs:28:7 @@ -73,7 +73,7 @@ help: consider restricting type parameter `T` LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `T: std::ops::Deref` is not satisfied +error[E0277]: the trait bound `T: Deref` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:41:9 | LL | trait UncheckedCopy: Sized { @@ -83,12 +83,12 @@ LL | + Deref | ------------------- required by this bound in `UncheckedCopy` ... LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `T` + | ^^^^^^^^^^^^^ the trait `Deref` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^^^^^ +LL | impl UncheckedCopy for T {} + | ^^^^^^^ error[E0277]: cannot add-assign `&'static str` to `T` --> $DIR/defaults-unsound-62211-1.rs:41:9 @@ -104,10 +104,10 @@ LL | impl UncheckedCopy for T {} | help: consider restricting type parameter `T` | -LL | impl> UncheckedCopy for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl> UncheckedCopy for T {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:41:9 | LL | trait UncheckedCopy: Sized { @@ -117,12 +117,12 @@ LL | type Output: Copy | ---- required by this bound in `UncheckedCopy` ... LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^^^^^^^ +LL | impl UncheckedCopy for T {} + | ^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/associated-types/defaults-unsound-62211-2.rs b/src/test/ui/associated-types/defaults-unsound-62211-2.rs index aa343e759a8..5518cda3708 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-2.rs +++ b/src/test/ui/associated-types/defaults-unsound-62211-2.rs @@ -19,9 +19,9 @@ trait UncheckedCopy: Sized { // This Output is said to be Copy. Yet we default to Self // and it's accepted, not knowing if Self ineed is Copy type Output: Copy - //~^ ERROR the trait bound `Self: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `Self: Copy` is not satisfied + Deref - //~^ ERROR the trait bound `Self: std::ops::Deref` is not satisfied + //~^ ERROR the trait bound `Self: Deref` is not satisfied + AddAssign<&'static str> //~^ ERROR cannot add-assign `&'static str` to `Self` + From @@ -40,9 +40,9 @@ trait UncheckedCopy: Sized { impl UncheckedCopy for T {} //~^ ERROR `T` doesn't implement `std::fmt::Display` -//~| ERROR the trait bound `T: std::ops::Deref` is not satisfied +//~| ERROR the trait bound `T: Deref` is not satisfied //~| ERROR cannot add-assign `&'static str` to `T` -//~| ERROR the trait bound `T: std::marker::Copy` is not satisfied +//~| ERROR the trait bound `T: Copy` is not satisfied fn bug(origin: T) { let origin = T::make_origin(origin); diff --git a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr index d4fd0ca98ee..49c66093bf0 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Self: Copy` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:21:18 | LL | trait UncheckedCopy: Sized { | -------------------------- required by `UncheckedCopy` ... LL | type Output: Copy - | ^^^^ the trait `std::marker::Copy` is not implemented for `Self` + | ^^^^ the trait `Copy` is not implemented for `Self` | help: consider further restricting `Self` | -LL | trait UncheckedCopy: Sized + std::marker::Copy { - | ^^^^^^^^^^^^^^^^^^^ +LL | trait UncheckedCopy: Sized + Copy { + | ^^^^^^ error[E0277]: cannot add-assign `&'static str` to `Self` --> $DIR/defaults-unsound-62211-2.rs:25:7 @@ -23,22 +23,22 @@ LL | + AddAssign<&'static str> | help: consider further restricting `Self` | -LL | trait UncheckedCopy: Sized + std::ops::AddAssign<&'static str> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied +error[E0277]: the trait bound `Self: Deref` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:23:7 | LL | trait UncheckedCopy: Sized { | -------------------------- required by `UncheckedCopy` ... LL | + Deref - | ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self` + | ^^^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `Self` | help: consider further restricting `Self` | -LL | trait UncheckedCopy: Sized + std::ops::Deref { - | ^^^^^^^^^^^^^^^^^ +LL | trait UncheckedCopy: Sized + Deref { + | ^^^^^^^ error[E0277]: `Self` doesn't implement `std::fmt::Display` --> $DIR/defaults-unsound-62211-2.rs:28:7 @@ -73,7 +73,7 @@ help: consider restricting type parameter `T` LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `T: std::ops::Deref` is not satisfied +error[E0277]: the trait bound `T: Deref` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:41:9 | LL | trait UncheckedCopy: Sized { @@ -83,12 +83,12 @@ LL | + Deref | ------------------- required by this bound in `UncheckedCopy` ... LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `T` + | ^^^^^^^^^^^^^ the trait `Deref` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^^^^^ +LL | impl UncheckedCopy for T {} + | ^^^^^^^ error[E0277]: cannot add-assign `&'static str` to `T` --> $DIR/defaults-unsound-62211-2.rs:41:9 @@ -104,10 +104,10 @@ LL | impl UncheckedCopy for T {} | help: consider restricting type parameter `T` | -LL | impl> UncheckedCopy for T {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl> UncheckedCopy for T {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:41:9 | LL | trait UncheckedCopy: Sized { @@ -117,12 +117,12 @@ LL | type Output: Copy | ---- required by this bound in `UncheckedCopy` ... LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl UncheckedCopy for T {} - | ^^^^^^^^^^^^^^^^^^^ +LL | impl UncheckedCopy for T {} + | ^^^^^^ error: aborting due to 8 previous errors diff --git a/src/test/ui/associated-types/hr-associated-type-bound-1.rs b/src/test/ui/associated-types/hr-associated-type-bound-1.rs index 497b86eeab8..cdf32dd82a6 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-1.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-1.rs @@ -10,7 +10,7 @@ where impl X<'_> for i32 { type U = str; - //~^ ERROR the trait bound `for<'b> >::U: std::clone::Clone` + //~^ ERROR the trait bound `for<'b> >::U: Clone` } fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-1.stderr b/src/test/ui/associated-types/hr-associated-type-bound-1.stderr index 7ef2faef9c6..c9255c91d2d 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-1.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> >::U: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::U: Clone` is not satisfied --> $DIR/hr-associated-type-bound-1.rs:12:14 | LL | trait X<'a> @@ -8,11 +8,11 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for `>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to previous error diff --git a/src/test/ui/associated-types/hr-associated-type-bound-2.stderr b/src/test/ui/associated-types/hr-associated-type-bound-2.stderr index 2a364d349d7..20b6659bbc1 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-2.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-2.stderr @@ -5,7 +5,7 @@ LL | 1u32.f("abc"); | ^ method not found in `u32` | = note: the method `f` exists but the following trait bounds were not satisfied: - `>::U: std::clone::Clone` + `>::U: Clone` which is required by `u32: X` error: aborting due to previous error diff --git a/src/test/ui/associated-types/hr-associated-type-bound-object.rs b/src/test/ui/associated-types/hr-associated-type-bound-object.rs index 7c64ae38caf..e19c918c3df 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-object.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-object.rs @@ -5,7 +5,7 @@ where type U: ?Sized; } fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { - //~^ ERROR the trait bound `for<'b> >::U: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> >::U: Clone` is not satisfied <>::U>::clone(x); } diff --git a/src/test/ui/associated-types/hr-associated-type-bound-object.stderr b/src/test/ui/associated-types/hr-associated-type-bound-object.stderr index db966875c70..225b18a3b04 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-object.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-object.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> >::U: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::U: Clone` is not satisfied --> $DIR/hr-associated-type-bound-object.rs:7:13 | LL | trait X<'a> @@ -8,11 +8,11 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { - | ^^^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::U` + | ^^^^^ the trait `for<'b> Clone` is not implemented for `>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to previous error diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-1.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-1.rs index a65f8a8c498..0a81f373ad4 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-1.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-1.rs @@ -12,7 +12,7 @@ where impl<'a> Y<'a, u8> for u8 { type V = str; - //~^ ERROR the trait bound `for<'b> >::V: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> >::V: Clone` is not satisfied } fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-1.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-1.stderr index 347a5818dce..7af261e4b3d 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-1.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> >::V: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::V: Clone` is not satisfied --> $DIR/hr-associated-type-bound-param-1.rs:14:14 | LL | trait Y<'a, T: ?Sized> @@ -8,11 +8,11 @@ LL | for<'b> >::V: Clone, | ----- required by this bound in `Y` ... LL | type V = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::V` + | ^^^ the trait `for<'b> Clone` is not implemented for `>::V` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to previous error diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs index 9f849b03276..5db619dc98f 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs @@ -1,8 +1,8 @@ trait Z<'a, T: ?Sized> where T: Z<'a, u16>, - //~^ the trait bound `for<'b> >::W: std::clone::Clone` is not satisfied - //~| the trait bound `for<'b> >::W: std::clone::Clone` is not satisfied + //~^ the trait bound `for<'b> >::W: Clone` is not satisfied + //~| the trait bound `for<'b> >::W: Clone` is not satisfied for<'b> >::W: Clone, { type W: ?Sized; @@ -13,7 +13,7 @@ where impl<'a> Z<'a, u16> for u16 { type W = str; - //~^ ERROR the trait bound `for<'b> >::W: std::clone::Clone + //~^ ERROR the trait bound `for<'b> >::W: Clone } fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr index e06777e36a8..9a701943796 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr @@ -1,20 +1,20 @@ -error[E0277]: the trait bound `for<'b> >::W: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::W: Clone` is not satisfied --> $DIR/hr-associated-type-bound-param-2.rs:3:8 | LL | trait Z<'a, T: ?Sized> | - required by a bound in this LL | where LL | T: Z<'a, u16>, - | ^^^^^^^^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::W` + | ^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `>::W` ... LL | for<'b> >::W: Clone, | ----- required by this bound in `Z` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> -error[E0277]: the trait bound `for<'b> >::W: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::W: Clone` is not satisfied --> $DIR/hr-associated-type-bound-param-2.rs:15:14 | LL | trait Z<'a, T: ?Sized> @@ -24,27 +24,27 @@ LL | for<'b> >::W: Clone, | ----- required by this bound in `Z` ... LL | type W = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::W` + | ^^^ the trait `for<'b> Clone` is not implemented for `>::W` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> -error[E0277]: the trait bound `for<'b> >::W: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::W: Clone` is not satisfied --> $DIR/hr-associated-type-bound-param-2.rs:3:8 | LL | trait Z<'a, T: ?Sized> | - required by a bound in this LL | where LL | T: Z<'a, u16>, - | ^^^^^^^^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::W` + | ^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `>::W` ... LL | for<'b> >::W: Clone, | ----- required by this bound in `Z` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to 3 previous errors diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-3.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-3.rs index 9aca59f8ce6..1af63bf9070 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-3.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-3.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - trait X<'a, T> where for<'b> T: X<'b, T>, @@ -13,7 +11,7 @@ where impl X<'_, (T,)> for (S,) { type U = str; - //~^ ERROR the trait bound `for<'b> <(T,) as X<'b, (T,)>>::U: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> <(T,) as X<'b, (T,)>>::U: Clone` is not satisfied } pub fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-3.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-3.stderr index ff56f60e4c9..48c4d77dcc7 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-3.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-3.stderr @@ -1,5 +1,5 @@ -error[E0277]: the trait bound `for<'b> <(T,) as X<'b, (T,)>>::U: std::clone::Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-3.rs:15:14 +error[E0277]: the trait bound `for<'b> <(T,) as X<'b, (T,)>>::U: Clone` is not satisfied + --> $DIR/hr-associated-type-bound-param-3.rs:13:14 | LL | trait X<'a, T> | - required by a bound in this @@ -8,11 +8,11 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for `<(T,) as X<'b, (T,)>>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for `<(T,) as X<'b, (T,)>>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to previous error diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-4.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-4.rs index ffe43c674c3..6f06b925bd2 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-4.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-4.rs @@ -11,7 +11,7 @@ where impl X<'_, T> for (S,) { type U = str; - //~^ ERROR the trait bound `for<'b> <(T,) as X<'b, T>>::U: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> <(T,) as X<'b, T>>::U: Clone` is not satisfied } pub fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-4.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-4.stderr index c41efb8b6e1..111ca8566b1 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-4.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-4.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> <(T,) as X<'b, T>>::U: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> <(T,) as X<'b, T>>::U: Clone` is not satisfied --> $DIR/hr-associated-type-bound-param-4.rs:13:14 | LL | trait X<'a, T> @@ -8,11 +8,11 @@ LL | for<'b> <(T,) as X<'b, T>>::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for `<(T,) as X<'b, T>>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for `<(T,) as X<'b, T>>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to previous error diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs index dcca0b3ce92..ec627c7f7ea 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs @@ -1,5 +1,3 @@ -// ignore-tidy-linelength - trait Cycle: Sized { type Next: Cycle; } @@ -26,14 +24,14 @@ where impl X<'_, Vec> for S { type U = str; - //~^ ERROR the trait bound `for<'b> as X<'b, std::boxed::Box>>::U: std::clone::Clone` is not satisfied - //~| ERROR the trait bound `for<'b> as X<'b, std::vec::Vec>>::U: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> as X<'b, Box>>::U: Clone` is not satisfied + //~| ERROR the trait bound `for<'b> as X<'b, Vec>>::U: Clone` is not satisfied } impl X<'_, Box> for S { type U = str; - //~^ ERROR the trait bound `for<'b> as X<'b, std::boxed::Box>>::U: std::clone::Clone` is not satisfied - //~| ERROR the trait bound `for<'b> as X<'b, std::vec::Vec>>::U: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> as X<'b, Box>>::U: Clone` is not satisfied + //~| ERROR the trait bound `for<'b> as X<'b, Vec>>::U: Clone` is not satisfied } pub fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr index 39c191e9747..81eceb46667 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr @@ -1,5 +1,5 @@ -error[E0277]: the trait bound `for<'b> as X<'b, std::boxed::Box>>::U: std::clone::Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-5.rs:28:14 +error[E0277]: the trait bound `for<'b> as X<'b, Box>>::U: Clone` is not satisfied + --> $DIR/hr-associated-type-bound-param-5.rs:26:14 | LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> | - required by a bound in this @@ -8,14 +8,14 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for ` as X<'b, std::boxed::Box>>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for ` as X<'b, Box>>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> -error[E0277]: the trait bound `for<'b> as X<'b, std::vec::Vec>>::U: std::clone::Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-5.rs:28:14 +error[E0277]: the trait bound `for<'b> as X<'b, Vec>>::U: Clone` is not satisfied + --> $DIR/hr-associated-type-bound-param-5.rs:26:14 | LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> | - required by a bound in this @@ -24,14 +24,14 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for ` as X<'b, std::vec::Vec>>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for ` as X<'b, Vec>>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> -error[E0277]: the trait bound `for<'b> as X<'b, std::vec::Vec>>::U: std::clone::Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-5.rs:34:14 +error[E0277]: the trait bound `for<'b> as X<'b, Vec>>::U: Clone` is not satisfied + --> $DIR/hr-associated-type-bound-param-5.rs:32:14 | LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> | - required by a bound in this @@ -40,14 +40,14 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for ` as X<'b, std::vec::Vec>>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for ` as X<'b, Vec>>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> -error[E0277]: the trait bound `for<'b> as X<'b, std::boxed::Box>>::U: std::clone::Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-5.rs:34:14 +error[E0277]: the trait bound `for<'b> as X<'b, Box>>::U: Clone` is not satisfied + --> $DIR/hr-associated-type-bound-param-5.rs:32:14 | LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> | - required by a bound in this @@ -56,11 +56,11 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for ` as X<'b, std::boxed::Box>>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for ` as X<'b, Box>>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error: aborting due to 4 previous errors diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-6.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-6.rs index 4b8018cb430..04b88c7f4fc 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-6.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-6.rs @@ -12,7 +12,7 @@ where impl X<'_, T> for (S,) { //~^ ERROR the trait bound `for<'b> T: X<'b, T>` is not satisfied type U = str; - //~^ ERROR the trait bound `for<'b> >::U: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `for<'b> >::U: Clone` is not satisfied } pub fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr index 83845d3a941..2efdb2445af 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-6.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> >::U: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `for<'b> >::U: Clone` is not satisfied --> $DIR/hr-associated-type-bound-param-6.rs:14:14 | LL | trait X<'a, T> @@ -8,11 +8,11 @@ LL | for<'b> >::U: Clone, | ----- required by this bound in `X` ... LL | type U = str; - | ^^^ the trait `for<'b> std::clone::Clone` is not implemented for `>::U` + | ^^^ the trait `for<'b> Clone` is not implemented for `>::U` | = help: the following implementations were found: - <&T as std::clone::Clone> - <&mut T as std::clone::Clone> + <&T as Clone> + <&mut T as Clone> error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied --> $DIR/hr-associated-type-bound-param-6.rs:12:12 diff --git a/src/test/ui/associated-types/hr-associated-type-projection-1.rs b/src/test/ui/associated-types/hr-associated-type-projection-1.rs index 0d4567a55fc..1270cd6706a 100644 --- a/src/test/ui/associated-types/hr-associated-type-projection-1.rs +++ b/src/test/ui/associated-types/hr-associated-type-projection-1.rs @@ -11,9 +11,9 @@ where } impl UnsafeCopy<'_, T> for T { - //~^ ERROR the trait bound `>::Item: std::ops::Deref` is not satisfied + //~^ ERROR the trait bound `>::Item: Deref` is not satisfied type Item = T; - //~^ ERROR the trait bound `for<'b> >::Item: std::ops::Deref + //~^ ERROR the trait bound `for<'b> >::Item: Deref } pub fn main() { diff --git a/src/test/ui/associated-types/hr-associated-type-projection-1.stderr b/src/test/ui/associated-types/hr-associated-type-projection-1.stderr index 5ab57410c44..cf4ec0babfc 100644 --- a/src/test/ui/associated-types/hr-associated-type-projection-1.stderr +++ b/src/test/ui/associated-types/hr-associated-type-projection-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> >::Item: std::ops::Deref` is not satisfied +error[E0277]: the trait bound `for<'b> >::Item: Deref` is not satisfied --> $DIR/hr-associated-type-projection-1.rs:15:17 | LL | trait UnsafeCopy<'a, T: Copy> @@ -8,22 +8,22 @@ LL | for<'b> >::Item: std::ops::Deref, | --------------------------- required by this bound in `UnsafeCopy` ... LL | type Item = T; - | ^ the trait `for<'b> std::ops::Deref` is not implemented for `>::Item` + | ^ the trait `for<'b> Deref` is not implemented for `>::Item` | = help: the following implementations were found: - <&T as std::ops::Deref> - <&mut T as std::ops::Deref> + <&T as Deref> + <&mut T as Deref> -error[E0277]: the trait bound `>::Item: std::ops::Deref` is not satisfied +error[E0277]: the trait bound `>::Item: Deref` is not satisfied --> $DIR/hr-associated-type-projection-1.rs:13:33 | LL | impl UnsafeCopy<'_, T> for T { - | ^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `>::Item` + | ^^^^^^^^^^^^^^^^^ the trait `Deref` is not implemented for `>::Item` | help: consider further restricting the associated type | -LL | impl UnsafeCopy<'_, T> for T where >::Item: std::ops::Deref { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl UnsafeCopy<'_, T> for T where >::Item: Deref { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/associated-types/issue-43924.stderr b/src/test/ui/associated-types/issue-43924.stderr index f21846fd82c..661730bcd75 100644 --- a/src/test/ui/associated-types/issue-43924.stderr +++ b/src/test/ui/associated-types/issue-43924.stderr @@ -1,12 +1,12 @@ -error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied +error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfied --> $DIR/issue-43924.rs:7:15 | LL | trait Foo { | -------------------------------- required by `Foo` LL | type Out: Default + ToString + ?Sized = dyn ToString; - | ^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)` + | ^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)` -error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied +error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfied --> $DIR/issue-43924.rs:10:6 | LL | trait Foo { @@ -15,9 +15,9 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString; | ------- required by this bound in `Foo` ... LL | impl Foo for () {} - | ^^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)` + | ^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)` -error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied +error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfied --> $DIR/issue-43924.rs:11:6 | LL | trait Foo { @@ -26,7 +26,7 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString; | ------- required by this bound in `Foo` ... LL | impl Foo for () {} - | ^^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)` + | ^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)` error: aborting due to 3 previous errors diff --git a/src/test/ui/associated-types/issue-63593.stderr b/src/test/ui/associated-types/issue-63593.stderr index be3b61665b1..ddc0bf436f6 100644 --- a/src/test/ui/associated-types/issue-63593.stderr +++ b/src/test/ui/associated-types/issue-63593.stderr @@ -8,8 +8,8 @@ LL | type This = Self; | help: consider further restricting `Self` | -LL | trait MyTrait: std::marker::Sized { - | ^^^^^^^^^^^^^^^^^^^^ +LL | trait MyTrait: Sized { + | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/associated-types/missing-associated-types.stderr b/src/test/ui/associated-types/missing-associated-types.stderr index 49003c74450..63164480a03 100644 --- a/src/test/ui/associated-types/missing-associated-types.stderr +++ b/src/test/ui/associated-types/missing-associated-types.stderr @@ -6,10 +6,10 @@ LL | type Foo = dyn Add + Sub + X + Y; | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add + std::ops::Sub + X + Y {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add + Sub + X + Y {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit -error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Sub`) must be specified +error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified --> $DIR/missing-associated-types.rs:12:21 | LL | type A; @@ -35,10 +35,10 @@ LL | type Bar = dyn Add + Sub + X + Z; | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add + std::ops::Sub + X + Z {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add + Sub + X + Z {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit -error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Sub`) must be specified +error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `Add`), `Output` (from trait `Div`), `Output` (from trait `Div`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified --> $DIR/missing-associated-types.rs:15:21 | LL | type A; @@ -49,7 +49,7 @@ LL | type B; LL | type Bar = dyn Add + Sub + X + Z; | ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^^^ associated types `A`, `B`, `Output` must be specified | | | | - | | | associated types `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Div`) must be specified + | | | associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified | | associated type `Output` must be specified | associated type `Output` must be specified | @@ -71,10 +71,10 @@ LL | type Baz = dyn Add + Sub + Y; | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add + std::ops::Sub + Y {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add + Sub + Y {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit -error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified +error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified --> $DIR/missing-associated-types.rs:18:21 | LL | type A; @@ -99,10 +99,10 @@ LL | type Bat = dyn Add + Sub + Fine; | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: std::ops::Add + std::ops::Sub + Fine {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add + Sub + Fine {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit -error[E0191]: the value of the associated types `Output` (from trait `std::ops::Add`), `Output` (from trait `std::ops::Sub`) must be specified +error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified --> $DIR/missing-associated-types.rs:21:21 | LL | type Bat = dyn Add + Sub + Fine; @@ -115,11 +115,11 @@ help: specify the associated types LL | type Bat = dyn Add + Sub + Fine; | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ -error[E0191]: the value of the associated types `Output` (from trait `std::ops::Div`), `Output` (from trait `std::ops::Mul`) must be specified +error[E0191]: the value of the associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified --> $DIR/missing-associated-types.rs:24:21 | LL | type Bal = dyn X; - | ^^^^^^ associated types `Output` (from trait `std::ops::Mul`), `Output` (from trait `std::ops::Div`) must be specified + | ^^^^^^ associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified | = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types diff --git a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr index cfdf5bd53ee..8fdca54d2d8 100644 --- a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr +++ b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr @@ -7,12 +7,12 @@ LL | trait ArithmeticOps: Add + Sub + Mul ::: $SRC_DIR/core/src/ops/arith.rs:LL:COL | LL | pub trait Add { - | --- required by this bound in `std::ops::Add` + | --- required by this bound in `Add` | help: consider further restricting `Self` | -LL | trait ArithmeticOps: Add + Sub + Mul + Div + std::marker::Sized {} - | ^^^^^^^^^^^^^^^^^^^^ +LL | trait ArithmeticOps: Add + Sub + Mul + Div + Sized {} + | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.rs b/src/test/ui/async-await/async-block-control-flow-static-semantics.rs index 971d4476334..5bc7069ff89 100644 --- a/src/test/ui/async-await/async-block-control-flow-static-semantics.rs +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.rs @@ -4,7 +4,6 @@ // 3. get targeted by `?` and not the parent function. // // edition:2018 -// ignore-tidy-linelength fn main() {} @@ -16,7 +15,7 @@ fn return_targets_async_block_not_fn() -> u8 { return 0u8; }; let _: &dyn Future = █ - //~^ ERROR type mismatch resolving `::Output == ()` + //~^ ERROR type mismatch resolving `::Output == ()` } async fn return_targets_async_block_not_async_fn() -> u8 { @@ -25,7 +24,7 @@ async fn return_targets_async_block_not_async_fn() -> u8 { return 0u8; }; let _: &dyn Future = █ - //~^ ERROR type mismatch resolving `::Output == ()` + //~^ ERROR type mismatch resolving `::Output == ()` } fn no_break_in_async_block() { diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr index 46a132da309..dbdfb2e71e0 100644 --- a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr @@ -1,5 +1,5 @@ error[E0267]: `break` inside of an `async` block - --> $DIR/async-block-control-flow-static-semantics.rs:33:9 + --> $DIR/async-block-control-flow-static-semantics.rs:32:9 | LL | async { | ___________- @@ -9,7 +9,7 @@ LL | | }; | |_____- enclosing `async` block error[E0267]: `break` inside of an `async` block - --> $DIR/async-block-control-flow-static-semantics.rs:40:13 + --> $DIR/async-block-control-flow-static-semantics.rs:39:13 | LL | async { | _______________- @@ -19,7 +19,7 @@ LL | | }; | |_________- enclosing `async` block error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:22:58 + --> $DIR/async-block-control-flow-static-semantics.rs:21:58 | LL | async fn return_targets_async_block_not_async_fn() -> u8 { | __________________________________________________________^ @@ -31,32 +31,32 @@ LL | | LL | | } | |_^ expected `u8`, found `()` -error[E0271]: type mismatch resolving `::Output == ()` - --> $DIR/async-block-control-flow-static-semantics.rs:27:39 +error[E0271]: type mismatch resolving `::Output == ()` + --> $DIR/async-block-control-flow-static-semantics.rs:26:39 | LL | let _: &dyn Future = █ | ^^^^^^ expected `()`, found `u8` | - = note: required for the cast to the object type `dyn std::future::Future` + = note: required for the cast to the object type `dyn Future` error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:13:43 + --> $DIR/async-block-control-flow-static-semantics.rs:12:43 | LL | fn return_targets_async_block_not_fn() -> u8 { | --------------------------------- ^^ expected `u8`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression -error[E0271]: type mismatch resolving `::Output == ()` - --> $DIR/async-block-control-flow-static-semantics.rs:18:39 +error[E0271]: type mismatch resolving `::Output == ()` + --> $DIR/async-block-control-flow-static-semantics.rs:17:39 | LL | let _: &dyn Future = █ | ^^^^^^ expected `()`, found `u8` | - = note: required for the cast to the object type `dyn std::future::Future` + = note: required for the cast to the object type `dyn Future` error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:48:44 + --> $DIR/async-block-control-flow-static-semantics.rs:47:44 | LL | fn rethrow_targets_async_block_not_fn() -> Result { | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()` @@ -67,7 +67,7 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result { found unit type `()` error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:57:50 + --> $DIR/async-block-control-flow-static-semantics.rs:56:50 | LL | fn rethrow_targets_async_block_not_async_fn() -> Result { | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()` diff --git a/src/test/ui/async-await/async-error-span.stderr b/src/test/ui/async-await/async-error-span.stderr index 9523f040aa8..d808a5939bb 100644 --- a/src/test/ui/async-await/async-error-span.stderr +++ b/src/test/ui/async-await/async-error-span.stderr @@ -7,7 +7,7 @@ LL | LL | panic!() | -------- this returned value is of type `!` | - = help: the trait `std::future::Future` is not implemented for `()` + = help: the trait `Future` is not implemented for `()` = note: the return type of a function must have a statically known size error[E0698]: type inside `async fn` body must be known in this context diff --git a/src/test/ui/async-await/async-fn-nonsend.stderr b/src/test/ui/async-await/async-fn-nonsend.stderr index d36d59f1f68..cd0db4cc01a 100644 --- a/src/test/ui/async-await/async-fn-nonsend.stderr +++ b/src/test/ui/async-await/async-fn-nonsend.stderr @@ -7,12 +7,12 @@ LL | fn assert_send(_: impl Send) {} LL | assert_send(local_dropped_before_await()); | ^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` + = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:24:5 | LL | let x = non_send(); - | - has type `impl std::fmt::Debug` which is not `Send` + | - has type `impl Debug` which is not `Send` LL | drop(x); LL | fut().await; | ^^^^^^^^^^^ await occurs here, with `x` maybe used later @@ -28,12 +28,12 @@ LL | fn assert_send(_: impl Send) {} LL | assert_send(non_send_temporary_in_match()); | ^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` + = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:33:20 | LL | match Some(non_send()) { - | ---------- has type `impl std::fmt::Debug` which is not `Send` + | ---------- has type `impl Debug` which is not `Send` LL | Some(_) => fut().await, | ^^^^^^^^^^^ await occurs here, with `non_send()` maybe used later ... @@ -49,12 +49,12 @@ LL | fn assert_send(_: impl Send) {} LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send` | - = help: the trait `std::marker::Send` is not implemented for `dyn std::fmt::Write` + = help: the trait `Send` is not implemented for `dyn std::fmt::Write` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:42:9 | LL | let f: &mut std::fmt::Formatter = panic!(); - | - has type `&mut std::fmt::Formatter<'_>` which is not `Send` + | - has type `&mut Formatter<'_>` which is not `Send` LL | if non_sync().fmt(f).unwrap() == () { LL | fut().await; | ^^^^^^^^^^^ await occurs here, with `f` maybe used later diff --git a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs index cebff3be6b0..337487fc80b 100644 --- a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs +++ b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs @@ -14,7 +14,7 @@ async fn foo2() -> Result<(), ()> { } async fn foo3() -> Result<(), ()> { let _ = await bar()?; //~ ERROR incorrect use of `await` - //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~^ ERROR the `?` operator can only be applied to values that implement `Try` Ok(()) } async fn foo21() -> Result<(), ()> { @@ -62,7 +62,7 @@ fn foo10() -> Result<(), ()> { fn foo11() -> Result<(), ()> { let _ = await bar()?; //~ ERROR `await` is only allowed inside `async` functions and blocks //~^ ERROR incorrect use of `await` - //~| ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~| ERROR the `?` operator can only be applied to values that implement `Try` Ok(()) } fn foo12() -> Result<(), ()> { diff --git a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr index 96158fc0e04..6a653fc060b 100644 --- a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr +++ b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr @@ -233,26 +233,26 @@ LL | let foo = || { LL | let _ = await!(bar())?; | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/incorrect-syntax-suggestions.rs:16:19 | LL | let _ = await bar()?; | ^^^^^^ | | - | the `?` operator cannot be applied to type `impl std::future::Future` + | the `?` operator cannot be applied to type `impl Future` | help: consider using `.await` here: `bar().await?` | - = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `impl Future` + = note: required by `into_result` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/incorrect-syntax-suggestions.rs:63:19 | LL | let _ = await bar()?; - | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future` + | ^^^^^^ the `?` operator cannot be applied to type `impl Future` | - = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `impl Future` + = note: required by `into_result` error: aborting due to 36 previous errors diff --git a/src/test/ui/async-await/dont-suggest-missing-await.stderr b/src/test/ui/async-await/dont-suggest-missing-await.stderr index dc3a4752fb1..e70ed9badbd 100644 --- a/src/test/ui/async-await/dont-suggest-missing-await.stderr +++ b/src/test/ui/async-await/dont-suggest-missing-await.stderr @@ -8,7 +8,7 @@ LL | take_u32(x) | ^ expected `u32`, found opaque type | = note: expected type `u32` - found opaque type `impl std::future::Future` + found opaque type `impl Future` error: aborting due to previous error diff --git a/src/test/ui/async-await/issue-61076.rs b/src/test/ui/async-await/issue-61076.rs index e383a9126f7..b1216ff4c45 100644 --- a/src/test/ui/async-await/issue-61076.rs +++ b/src/test/ui/async-await/issue-61076.rs @@ -39,7 +39,7 @@ async fn foo() -> Result<(), ()> { } async fn bar() -> Result<(), ()> { - foo()?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + foo()?; //~ ERROR the `?` operator can only be applied to values that implement `Try` Ok(()) } @@ -53,7 +53,7 @@ async fn tuple() -> Tuple { async fn baz() -> Result<(), ()> { let t = T; - t?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + t?; //~ ERROR the `?` operator can only be applied to values that implement `Try` let _: i32 = tuple().0; //~ ERROR no field `0` diff --git a/src/test/ui/async-await/issue-61076.stderr b/src/test/ui/async-await/issue-61076.stderr index 69b6e8c3cf5..f1f1b2d4439 100644 --- a/src/test/ui/async-await/issue-61076.stderr +++ b/src/test/ui/async-await/issue-61076.stderr @@ -1,16 +1,16 @@ -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/issue-61076.rs:42:5 | LL | foo()?; | ^^^^^^ | | - | the `?` operator cannot be applied to type `impl std::future::Future` + | the `?` operator cannot be applied to type `impl Future` | help: consider using `.await` here: `foo().await?` | - = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `impl Future` + = note: required by `into_result` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/issue-61076.rs:56:5 | LL | t?; @@ -19,10 +19,10 @@ LL | t?; | the `?` operator cannot be applied to type `T` | help: consider using `.await` here: `t.await?` | - = help: the trait `std::ops::Try` is not implemented for `T` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `T` + = note: required by `into_result` -error[E0609]: no field `0` on type `impl std::future::Future` +error[E0609]: no field `0` on type `impl Future` --> $DIR/issue-61076.rs:58:26 | LL | let _: i32 = tuple().0; @@ -33,7 +33,7 @@ help: consider awaiting before field access LL | let _: i32 = tuple().await.0; | ^^^^^^ -error[E0609]: no field `a` on type `impl std::future::Future` +error[E0609]: no field `a` on type `impl Future` --> $DIR/issue-61076.rs:60:28 | LL | let _: i32 = struct_().a; @@ -44,11 +44,11 @@ help: consider awaiting before field access LL | let _: i32 = struct_().await.a; | ^^^^^^ -error[E0599]: no method named `method` found for opaque type `impl std::future::Future` in the current scope +error[E0599]: no method named `method` found for opaque type `impl Future` in the current scope --> $DIR/issue-61076.rs:62:15 | LL | struct_().method(); - | ^^^^^^ method not found in `impl std::future::Future` + | ^^^^^^ method not found in `impl Future` | help: consider awaiting before this method call | @@ -64,7 +64,7 @@ LL | async fn tuple() -> Tuple { LL | Tuple(_) => {} | ^^^^^^^^ expected opaque type, found struct `Tuple` | - = note: expected opaque type `impl std::future::Future` + = note: expected opaque type `impl Future` found struct `Tuple` help: consider awaiting on the future | diff --git a/src/test/ui/async-await/issue-64130-1-sync.stderr b/src/test/ui/async-await/issue-64130-1-sync.stderr index 42e9e4642ce..ab732368001 100644 --- a/src/test/ui/async-await/issue-64130-1-sync.stderr +++ b/src/test/ui/async-await/issue-64130-1-sync.stderr @@ -7,7 +7,7 @@ LL | fn is_sync(t: T) { } LL | is_sync(bar()); | ^^^^^^^ future returned by `bar` is not `Sync` | - = help: within `impl std::future::Future`, the trait `std::marker::Sync` is not implemented for `Foo` + = help: within `impl Future`, the trait `Sync` is not implemented for `Foo` note: future is not `Sync` as this value is used across an await --> $DIR/issue-64130-1-sync.rs:15:5 | diff --git a/src/test/ui/async-await/issue-64130-2-send.stderr b/src/test/ui/async-await/issue-64130-2-send.stderr index f6f834618d3..5f7440a72d2 100644 --- a/src/test/ui/async-await/issue-64130-2-send.stderr +++ b/src/test/ui/async-await/issue-64130-2-send.stderr @@ -7,7 +7,7 @@ LL | fn is_send(t: T) { } LL | is_send(bar()); | ^^^^^^^ future returned by `bar` is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `Foo` + = help: within `impl Future`, the trait `Send` is not implemented for `Foo` note: future is not `Send` as this value is used across an await --> $DIR/issue-64130-2-send.rs:15:5 | diff --git a/src/test/ui/async-await/issue-64130-3-other.rs b/src/test/ui/async-await/issue-64130-3-other.rs index b819970d59d..133152c309a 100644 --- a/src/test/ui/async-await/issue-64130-3-other.rs +++ b/src/test/ui/async-await/issue-64130-3-other.rs @@ -22,5 +22,5 @@ async fn baz() { } fn main() { is_qux(bar()); - //~^ ERROR the trait bound `Foo: Qux` is not satisfied in `impl std::future::Future` + //~^ ERROR the trait bound `Foo: Qux` is not satisfied in `impl Future` } diff --git a/src/test/ui/async-await/issue-64130-3-other.stderr b/src/test/ui/async-await/issue-64130-3-other.stderr index 3475b66b375..4bf43f14cc1 100644 --- a/src/test/ui/async-await/issue-64130-3-other.stderr +++ b/src/test/ui/async-await/issue-64130-3-other.stderr @@ -1,14 +1,14 @@ -error[E0277]: the trait bound `Foo: Qux` is not satisfied in `impl std::future::Future` +error[E0277]: the trait bound `Foo: Qux` is not satisfied in `impl Future` --> $DIR/issue-64130-3-other.rs:24:5 | LL | fn is_qux(t: T) { } | --- required by this bound in `is_qux` LL | LL | async fn bar() { - | - within this `impl std::future::Future` + | - within this `impl Future` ... LL | is_qux(bar()); - | ^^^^^^ within `impl std::future::Future`, the trait `Qux` is not implemented for `Foo` + | ^^^^^^ within `impl Future`, the trait `Qux` is not implemented for `Foo` | = help: the following implementations were found: diff --git a/src/test/ui/async-await/issue-64130-4-async-move.stderr b/src/test/ui/async-await/issue-64130-4-async-move.stderr index fc231d394c1..440ea0a38e6 100644 --- a/src/test/ui/async-await/issue-64130-4-async-move.stderr +++ b/src/test/ui/async-await/issue-64130-4-async-move.stderr @@ -11,9 +11,9 @@ LL | | let _x = get().await; ... | LL | | } LL | | } - | |_____- this returned value is of type `impl std::future::Future` + | |_____- this returned value is of type `impl Future` | - = help: the trait `std::marker::Sync` is not implemented for `(dyn std::any::Any + std::marker::Send + 'static)` + = help: the trait `Sync` is not implemented for `(dyn Any + Send + 'static)` note: future is not `Send` as this value is used across an await --> $DIR/issue-64130-4-async-move.rs:21:26 | diff --git a/src/test/ui/async-await/issue-64130-non-send-future-diags.stderr b/src/test/ui/async-await/issue-64130-non-send-future-diags.stderr index f72757339cc..2d6615cd5d3 100644 --- a/src/test/ui/async-await/issue-64130-non-send-future-diags.stderr +++ b/src/test/ui/async-await/issue-64130-non-send-future-diags.stderr @@ -7,12 +7,12 @@ LL | fn is_send(t: T) { } LL | is_send(foo()); | ^^^^^^^ future returned by `foo` is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::sync::MutexGuard<'_, u32>` + = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, u32>` note: future is not `Send` as this value is used across an await --> $DIR/issue-64130-non-send-future-diags.rs:15:5 | LL | let g = x.lock().unwrap(); - | - has type `std::sync::MutexGuard<'_, u32>` which is not `Send` + | - has type `MutexGuard<'_, u32>` which is not `Send` LL | baz().await; | ^^^^^^^^^^^ await occurs here, with `g` maybe used later LL | } diff --git a/src/test/ui/async-await/issue-67252-unnamed-future.stderr b/src/test/ui/async-await/issue-67252-unnamed-future.stderr index b43478ee207..741623040c6 100644 --- a/src/test/ui/async-await/issue-67252-unnamed-future.stderr +++ b/src/test/ui/async-await/issue-67252-unnamed-future.stderr @@ -7,7 +7,7 @@ LL | fn spawn(_: T) {} LL | spawn(async { | ^^^^^ future created by async block is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `*mut ()` + = help: within `impl Future`, the trait `Send` is not implemented for `*mut ()` note: future is not `Send` as this value is used across an await --> $DIR/issue-67252-unnamed-future.rs:20:9 | diff --git a/src/test/ui/async-await/issue-68112.rs b/src/test/ui/async-await/issue-68112.rs index 11b17836808..bfabf81d1f5 100644 --- a/src/test/ui/async-await/issue-68112.rs +++ b/src/test/ui/async-await/issue-68112.rs @@ -58,7 +58,7 @@ fn test2() { ready(0).await; }; require_send(send_fut); - //~^ ERROR `std::cell::RefCell` cannot be shared between threads safely + //~^ ERROR `RefCell` cannot be shared between threads safely } fn main() {} diff --git a/src/test/ui/async-await/issue-68112.stderr b/src/test/ui/async-await/issue-68112.stderr index 6ded3e475bc..07269f70f6b 100644 --- a/src/test/ui/async-await/issue-68112.stderr +++ b/src/test/ui/async-await/issue-68112.stderr @@ -7,12 +7,12 @@ LL | fn require_send(_: impl Send) {} LL | require_send(send_fut); | ^^^^^^^^^^^^ future created by async block is not `Send` | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` + = help: the trait `Sync` is not implemented for `RefCell` note: future is not `Send` as it awaits another future which is not `Send` --> $DIR/issue-68112.rs:31:17 | LL | let _ = non_send_fut.await; - | ^^^^^^^^^^^^ await occurs here on type `impl std::future::Future`, which is not `Send` + | ^^^^^^^^^^^^ await occurs here on type `impl Future`, which is not `Send` error: future cannot be sent between threads safely --> $DIR/issue-68112.rs:43:5 @@ -23,33 +23,33 @@ LL | fn require_send(_: impl Send) {} LL | require_send(send_fut); | ^^^^^^^^^^^^ future created by async block is not `Send` | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` + = help: the trait `Sync` is not implemented for `RefCell` note: future is not `Send` as it awaits another future which is not `Send` --> $DIR/issue-68112.rs:40:17 | LL | let _ = make_non_send_future1().await; - | ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl std::future::Future`, which is not `Send` + | ^^^^^^^^^^^^^^^^^^^^^^^ await occurs here on type `impl Future`, which is not `Send` -error[E0277]: `std::cell::RefCell` cannot be shared between threads safely +error[E0277]: `RefCell` cannot be shared between threads safely --> $DIR/issue-68112.rs:60:5 | LL | fn require_send(_: impl Send) {} | ---- required by this bound in `require_send` ... LL | require_send(send_fut); - | ^^^^^^^^^^^^ `std::cell::RefCell` cannot be shared between threads safely + | ^^^^^^^^^^^^ `RefCell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc>` - = note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:47:31: 47:36 t:std::sync::Arc> {}]` - = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:47:31: 47:36 t:std::sync::Arc> {}]>` - = note: required because it appears within the type `impl std::future::Future` - = note: required because it appears within the type `impl std::future::Future` - = note: required because it appears within the type `impl std::future::Future` - = note: required because it appears within the type `{std::future::ResumeTy, impl std::future::Future, (), i32, Ready}` - = note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:55:26: 59:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready}]` - = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:55:26: 59:6 {std::future::ResumeTy, impl std::future::Future, (), i32, Ready}]>` - = note: required because it appears within the type `impl std::future::Future` + = help: the trait `Sync` is not implemented for `RefCell` + = note: required because of the requirements on the impl of `Send` for `Arc>` + = note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:47:31: 47:36 t:Arc> {}]` + = note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:47:31: 47:36 t:Arc> {}]>` + = note: required because it appears within the type `impl Future` + = note: required because it appears within the type `impl Future` + = note: required because it appears within the type `impl Future` + = note: required because it appears within the type `{ResumeTy, impl Future, (), i32, Ready}` + = note: required because it appears within the type `[static generator@$DIR/issue-68112.rs:55:26: 59:6 {ResumeTy, impl Future, (), i32, Ready}]` + = note: required because it appears within the type `from_generator::GenFuture<[static generator@$DIR/issue-68112.rs:55:26: 59:6 {ResumeTy, impl Future, (), i32, Ready}]>` + = note: required because it appears within the type `impl Future` error: aborting due to 3 previous errors diff --git a/src/test/ui/async-await/issue-68523.rs b/src/test/ui/async-await/issue-68523.rs index e6250c40c71..718c597e712 100644 --- a/src/test/ui/async-await/issue-68523.rs +++ b/src/test/ui/async-await/issue-68523.rs @@ -2,6 +2,6 @@ async fn main() -> Result { //~^ ERROR `main` function is not allowed to be `async` -//~^^ ERROR `main` has invalid return type `impl std::future::Future` +//~^^ ERROR `main` has invalid return type `impl Future` Ok(1) } diff --git a/src/test/ui/async-await/issue-68523.stderr b/src/test/ui/async-await/issue-68523.stderr index 62e37cf2629..6f67af04cd4 100644 --- a/src/test/ui/async-await/issue-68523.stderr +++ b/src/test/ui/async-await/issue-68523.stderr @@ -1,8 +1,8 @@ -error[E0277]: `main` has invalid return type `impl std::future::Future` +error[E0277]: `main` has invalid return type `impl Future` --> $DIR/issue-68523.rs:3:20 | LL | async fn main() -> Result { - | ^^^^^^^^^^^^^^^ `main` can only return types that implement `std::process::Termination` + | ^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination` | = help: consider using `()`, or a `Result` diff --git a/src/test/ui/async-await/issue-70594.stderr b/src/test/ui/async-await/issue-70594.stderr index badb7ae9f6f..fb1f8e4ffd2 100644 --- a/src/test/ui/async-await/issue-70594.stderr +++ b/src/test/ui/async-await/issue-70594.stderr @@ -24,8 +24,8 @@ error[E0277]: `()` is not a future LL | [1; ().await]; | ^^^^^^^^ `()` is not a future | - = help: the trait `std::future::Future` is not implemented for `()` - = note: required by `std::future::Future::poll` + = help: the trait `Future` is not implemented for `()` + = note: required by `poll` error: aborting due to 4 previous errors diff --git a/src/test/ui/async-await/issue-70818.stderr b/src/test/ui/async-await/issue-70818.stderr index 2166420070a..364194bea10 100644 --- a/src/test/ui/async-await/issue-70818.stderr +++ b/src/test/ui/async-await/issue-70818.stderr @@ -5,7 +5,7 @@ LL | fn foo(ty: T, ty1: U) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` LL | LL | async { (ty, ty1) } - | ------------------- this returned value is of type `impl std::future::Future` + | ------------------- this returned value is of type `impl Future` | note: captured value is not `Send` --> $DIR/issue-70818.rs:6:18 @@ -15,8 +15,8 @@ LL | async { (ty, ty1) } = note: the return type of a function must have a statically known size help: consider restricting type parameter `U` | -LL | fn foo(ty: T, ty1: U) -> impl Future + Send { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn foo(ty: T, ty1: U) -> impl Future + Send { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/async-await/issue-71137.stderr b/src/test/ui/async-await/issue-71137.stderr index 788a9bc2c7e..85cc7069b60 100644 --- a/src/test/ui/async-await/issue-71137.stderr +++ b/src/test/ui/async-await/issue-71137.stderr @@ -7,12 +7,12 @@ LL | fn fake_spawn(f: F) { } LL | fake_spawn(wrong_mutex()); | ^^^^^^^^^^ future returned by `wrong_mutex` is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::sync::MutexGuard<'_, i32>` + = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, i32>` note: future is not `Send` as this value is used across an await --> $DIR/issue-71137.rs:12:5 | LL | let mut guard = m.lock().unwrap(); - | --------- has type `std::sync::MutexGuard<'_, i32>` which is not `Send` + | --------- has type `MutexGuard<'_, i32>` which is not `Send` LL | (async { "right"; }).await; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `mut guard` maybe used later LL | *guard += 1; diff --git a/src/test/ui/async-await/issue-72442.stderr b/src/test/ui/async-await/issue-72442.stderr index 3b909689b5a..52245b63128 100644 --- a/src/test/ui/async-await/issue-72442.stderr +++ b/src/test/ui/async-await/issue-72442.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `std::option::Option<&str>: std::convert::AsRef` is not satisfied +error[E0277]: the trait bound `Option<&str>: AsRef` is not satisfied --> $DIR/issue-72442.rs:12:36 | LL | let mut f = File::open(path.to_str())?; - | ^^^^^^^^^^^^^ the trait `std::convert::AsRef` is not implemented for `std::option::Option<&str>` + | ^^^^^^^^^^^^^ the trait `AsRef` is not implemented for `Option<&str>` | ::: $SRC_DIR/std/src/fs.rs:LL:COL | LL | pub fn open>(path: P) -> io::Result { - | ----------- required by this bound in `std::fs::File::open` + | ----------- required by this bound in `File::open` error: aborting due to previous error diff --git a/src/test/ui/async-await/issue-72590-type-error-sized.stderr b/src/test/ui/async-await/issue-72590-type-error-sized.stderr index 762afa6450a..785fe21dd31 100644 --- a/src/test/ui/async-await/issue-72590-type-error-sized.stderr +++ b/src/test/ui/async-await/issue-72590-type-error-sized.stderr @@ -16,7 +16,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | async fn frob(self) {} | ^^^^ doesn't have a size known at compile-time | - = help: within `Foo`, the trait `std::marker::Sized` is not implemented for `str` + = help: within `Foo`, the trait `Sized` is not implemented for `str` = note: required because it appears within the type `Foo` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size diff --git a/src/test/ui/async-await/issues/issue-62009-1.stderr b/src/test/ui/async-await/issues/issue-62009-1.stderr index e3ba74a03c8..c879a65bc7f 100644 --- a/src/test/ui/async-await/issues/issue-62009-1.stderr +++ b/src/test/ui/async-await/issues/issue-62009-1.stderr @@ -33,8 +33,8 @@ error[E0277]: `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future LL | (|_| 2333).await; | ^^^^^^^^^^^^^^^^ `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future | - = help: the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` - = note: required by `std::future::Future::poll` + = help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` + = note: required by `poll` error: aborting due to 4 previous errors diff --git a/src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr b/src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr index 49cd30e11a0..e4b2725686a 100644 --- a/src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr +++ b/src/test/ui/async-await/issues/issue-65436-raw-ptr-not-send.stderr @@ -7,7 +7,7 @@ LL | fn assert_send(_: T) {} LL | assert_send(async { | ^^^^^^^^^^^ future created by async block is not `Send` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `*const u8` + = help: within `impl Future`, the trait `Send` is not implemented for `*const u8` note: future is not `Send` as this value is used across an await --> $DIR/issue-65436-raw-ptr-not-send.rs:14:9 | diff --git a/src/test/ui/async-await/issues/issue-67893.rs b/src/test/ui/async-await/issues/issue-67893.rs index 9679e3807b6..f34ce8081ca 100644 --- a/src/test/ui/async-await/issues/issue-67893.rs +++ b/src/test/ui/async-await/issues/issue-67893.rs @@ -7,5 +7,5 @@ fn g(_: impl Send) {} fn main() { g(issue_67893::run()) - //~^ ERROR: `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely + //~^ ERROR: `MutexGuard<'_, ()>` cannot be sent between threads safely } diff --git a/src/test/ui/async-await/issues/issue-67893.stderr b/src/test/ui/async-await/issues/issue-67893.stderr index 343a35a1663..a6f50a6657e 100644 --- a/src/test/ui/async-await/issues/issue-67893.stderr +++ b/src/test/ui/async-await/issues/issue-67893.stderr @@ -1,23 +1,23 @@ -error[E0277]: `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely +error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely --> $DIR/issue-67893.rs:9:5 | LL | fn g(_: impl Send) {} | ---- required by this bound in `g` ... LL | g(issue_67893::run()) - | ^ `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely + | ^ `MutexGuard<'_, ()>` cannot be sent between threads safely | ::: $DIR/auxiliary/issue_67893.rs:7:20 | LL | pub async fn run() { - | - within this `impl std::future::Future` + | - within this `impl Future` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::sync::MutexGuard<'_, ()>` - = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {std::future::ResumeTy, std::sync::Arc>, &'r std::sync::Mutex<()>, std::result::Result, std::sync::PoisonError>>, &'t1 std::sync::MutexGuard<'t2, ()>, std::sync::MutexGuard<'t3, ()>, (), impl std::future::Future}` - = note: required because it appears within the type `[static generator@issue_67893::run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {std::future::ResumeTy, std::sync::Arc>, &'r std::sync::Mutex<()>, std::result::Result, std::sync::PoisonError>>, &'t1 std::sync::MutexGuard<'t2, ()>, std::sync::MutexGuard<'t3, ()>, (), impl std::future::Future}]` - = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@issue_67893::run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {std::future::ResumeTy, std::sync::Arc>, &'r std::sync::Mutex<()>, std::result::Result, std::sync::PoisonError>>, &'t1 std::sync::MutexGuard<'t2, ()>, std::sync::MutexGuard<'t3, ()>, (), impl std::future::Future}]>` - = note: required because it appears within the type `impl std::future::Future` - = note: required because it appears within the type `impl std::future::Future` + = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` + = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc>, &'r Mutex<()>, std::result::Result, PoisonError>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}` + = note: required because it appears within the type `[static generator@run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc>, &'r Mutex<()>, std::result::Result, PoisonError>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]` + = note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc>, &'r Mutex<()>, std::result::Result, PoisonError>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]>` + = note: required because it appears within the type `impl Future` + = note: required because it appears within the type `impl Future` error: aborting due to previous error diff --git a/src/test/ui/async-await/no-move-across-await-struct.stderr b/src/test/ui/async-await/no-move-across-await-struct.stderr index adfae09925f..4eaed1cf155 100644 --- a/src/test/ui/async-await/no-move-across-await-struct.stderr +++ b/src/test/ui/async-await/no-move-across-await-struct.stderr @@ -6,7 +6,7 @@ LL | needs_vec(s.x).await; LL | s.x | ^^^ value used here after move | - = note: move occurs because `s.x` has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because `s.x` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/async-await/no-move-across-await-tuple.stderr b/src/test/ui/async-await/no-move-across-await-tuple.stderr index a60fd9361a7..d750df9918e 100644 --- a/src/test/ui/async-await/no-move-across-await-tuple.stderr +++ b/src/test/ui/async-await/no-move-across-await-tuple.stderr @@ -7,7 +7,7 @@ LL | nothing().await; LL | x.1 | ^^^ value used here after move | - = note: move occurs because `x.1` has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because `x.1` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/async-await/suggest-missing-await-closure.stderr b/src/test/ui/async-await/suggest-missing-await-closure.stderr index 2703cec581d..ed2c4cbfccc 100644 --- a/src/test/ui/async-await/suggest-missing-await-closure.stderr +++ b/src/test/ui/async-await/suggest-missing-await-closure.stderr @@ -11,7 +11,7 @@ LL | take_u32(x) | help: consider using `.await` here: `x.await` | = note: expected type `u32` - found opaque type `impl std::future::Future` + found opaque type `impl Future` error: aborting due to previous error diff --git a/src/test/ui/async-await/suggest-missing-await.stderr b/src/test/ui/async-await/suggest-missing-await.stderr index 6ac05a87aae..c6355680e25 100644 --- a/src/test/ui/async-await/suggest-missing-await.stderr +++ b/src/test/ui/async-await/suggest-missing-await.stderr @@ -11,7 +11,7 @@ LL | take_u32(x) | help: consider using `.await` here: `x.await` | = note: expected type `u32` - found opaque type `impl std::future::Future` + found opaque type `impl Future` error[E0308]: mismatched types --> $DIR/suggest-missing-await.rs:23:5 @@ -23,7 +23,7 @@ LL | dummy() | ^^^^^^^ expected `()`, found opaque type | = note: expected unit type `()` - found opaque type `impl std::future::Future` + found opaque type `impl Future` help: try adding a semicolon | LL | dummy(); diff --git a/src/test/ui/async-await/suggest-switching-edition-on-await.stderr b/src/test/ui/async-await/suggest-switching-edition-on-await.stderr index f623511c0eb..695d7dd59fb 100644 --- a/src/test/ui/async-await/suggest-switching-edition-on-await.stderr +++ b/src/test/ui/async-await/suggest-switching-edition-on-await.stderr @@ -18,7 +18,7 @@ LL | x.await; = help: set `edition = "2018"` in `Cargo.toml` = note: for more on editions, read https://doc.rust-lang.org/edition-guide -error[E0609]: no field `await` on type `std::pin::Pin<&mut dyn std::future::Future>` +error[E0609]: no field `await` on type `Pin<&mut dyn Future>` --> $DIR/suggest-switching-edition-on-await.rs:31:7 | LL | x.await; diff --git a/src/test/ui/async-await/try-on-option-in-async.stderr b/src/test/ui/async-await/try-on-option-in-async.stderr index 700296d6747..8e7823f3571 100644 --- a/src/test/ui/async-await/try-on-option-in-async.stderr +++ b/src/test/ui/async-await/try-on-option-in-async.stderr @@ -1,4 +1,4 @@ -error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-in-async.rs:8:9 | LL | async { @@ -10,10 +10,10 @@ LL | | 22 LL | | } | |_____- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `{integer}` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `{integer}` + = note: required by `from_error` -error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-in-async.rs:17:9 | LL | let async_closure = async || { @@ -25,10 +25,10 @@ LL | | 22_u32 LL | | }; | |_____- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `u32` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `u32` + = note: required by `from_error` -error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-in-async.rs:26:5 | LL | async fn an_async_function() -> u32 { @@ -40,8 +40,8 @@ LL | | 22 LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `u32` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `u32` + = note: required by `from_error` error: aborting due to 3 previous errors diff --git a/src/test/ui/auto-ref-slice-plus-ref.stderr b/src/test/ui/auto-ref-slice-plus-ref.stderr index dc7deb8a7c7..eb8447ff0f3 100644 --- a/src/test/ui/auto-ref-slice-plus-ref.stderr +++ b/src/test/ui/auto-ref-slice-plus-ref.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `test_mut` found for struct `std::vec::Vec<{integer}>` in the current scope +error[E0599]: no method named `test_mut` found for struct `Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:7:7 | LL | a.test_mut(); @@ -11,11 +11,11 @@ note: `MyIter` defines an item `test_mut`, perhaps you need to implement it LL | trait MyIter { | ^^^^^^^^^^^^ -error[E0599]: no method named `test` found for struct `std::vec::Vec<{integer}>` in the current scope +error[E0599]: no method named `test` found for struct `Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:8:7 | LL | a.test(); - | ^^^^ method not found in `std::vec::Vec<{integer}>` + | ^^^^ method not found in `Vec<{integer}>` | = help: items from traits can only be used if the trait is implemented and in scope note: `MyIter` defines an item `test`, perhaps you need to implement it diff --git a/src/test/ui/autoderef-full-lval.rs b/src/test/ui/autoderef-full-lval.rs index 4bef1012e33..f07a2c107ba 100644 --- a/src/test/ui/autoderef-full-lval.rs +++ b/src/test/ui/autoderef-full-lval.rs @@ -13,13 +13,13 @@ fn main() { let a: Clam = Clam{x: box 1, y: box 2}; let b: Clam = Clam{x: box 10, y: box 20}; let z: isize = a.x + b.y; - //~^ ERROR cannot add `std::boxed::Box` to `std::boxed::Box` + //~^ ERROR cannot add `Box` to `Box` println!("{}", z); assert_eq!(z, 21); let forty: Fish = Fish{a: box 40}; let two: Fish = Fish{a: box 2}; let answer: isize = forty.a + two.a; - //~^ ERROR cannot add `std::boxed::Box` to `std::boxed::Box` + //~^ ERROR cannot add `Box` to `Box` println!("{}", answer); assert_eq!(answer, 42); } diff --git a/src/test/ui/autoderef-full-lval.stderr b/src/test/ui/autoderef-full-lval.stderr index f094388794e..9921ce7c154 100644 --- a/src/test/ui/autoderef-full-lval.stderr +++ b/src/test/ui/autoderef-full-lval.stderr @@ -1,18 +1,18 @@ -error[E0369]: cannot add `std::boxed::Box` to `std::boxed::Box` +error[E0369]: cannot add `Box` to `Box` --> $DIR/autoderef-full-lval.rs:15:24 | LL | let z: isize = a.x + b.y; - | --- ^ --- std::boxed::Box + | --- ^ --- Box | | - | std::boxed::Box + | Box -error[E0369]: cannot add `std::boxed::Box` to `std::boxed::Box` +error[E0369]: cannot add `Box` to `Box` --> $DIR/autoderef-full-lval.rs:21:33 | LL | let answer: isize = forty.a + two.a; - | ------- ^ ----- std::boxed::Box + | ------- ^ ----- Box | | - | std::boxed::Box + | Box error: aborting due to 2 previous errors diff --git a/src/test/ui/bad/bad-const-type.rs b/src/test/ui/bad/bad-const-type.rs index ce9ea7bc9ed..934ee353da2 100644 --- a/src/test/ui/bad/bad-const-type.rs +++ b/src/test/ui/bad/bad-const-type.rs @@ -1,4 +1,4 @@ static i: String = 10; //~^ ERROR mismatched types -//~| expected struct `std::string::String`, found integer +//~| expected struct `String`, found integer fn main() { println!("{}", i); } diff --git a/src/test/ui/bad/bad-const-type.stderr b/src/test/ui/bad/bad-const-type.stderr index f667779fab5..a9c84b4b41c 100644 --- a/src/test/ui/bad/bad-const-type.stderr +++ b/src/test/ui/bad/bad-const-type.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | static i: String = 10; | ^^ | | - | expected struct `std::string::String`, found integer + | expected struct `String`, found integer | help: try using a conversion method: `10.to_string()` error: aborting due to previous error diff --git a/src/test/ui/bad/bad-expr-path.stderr b/src/test/ui/bad/bad-expr-path.stderr index 56bb6e2be88..77c48c951ac 100644 --- a/src/test/ui/bad/bad-expr-path.stderr +++ b/src/test/ui/bad/bad-expr-path.stderr @@ -23,7 +23,7 @@ LL | fn main(arguments: Vec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | = note: expected fn pointer `fn()` - found fn pointer `fn(std::vec::Vec)` + found fn pointer `fn(Vec)` error: aborting due to 4 previous errors diff --git a/src/test/ui/bad/bad-expr-path2.stderr b/src/test/ui/bad/bad-expr-path2.stderr index e217c45b267..d06e1027179 100644 --- a/src/test/ui/bad/bad-expr-path2.stderr +++ b/src/test/ui/bad/bad-expr-path2.stderr @@ -23,7 +23,7 @@ LL | fn main(arguments: Vec) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | = note: expected fn pointer `fn()` - found fn pointer `fn(std::vec::Vec)` + found fn pointer `fn(Vec)` error: aborting due to 4 previous errors diff --git a/src/test/ui/bad/bad-method-typaram-kind.stderr b/src/test/ui/bad/bad-method-typaram-kind.stderr index fd3999ae6fb..5b68d97a9ea 100644 --- a/src/test/ui/bad/bad-method-typaram-kind.stderr +++ b/src/test/ui/bad/bad-method-typaram-kind.stderr @@ -6,8 +6,8 @@ LL | 1.bar::(); | help: consider further restricting this bound | -LL | fn foo() { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn foo() { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/bad/bad-sized.stderr b/src/test/ui/bad/bad-sized.stderr index 93984f1c372..b9bce7fb5f4 100644 --- a/src/test/ui/bad/bad-sized.stderr +++ b/src/test/ui/bad/bad-sized.stderr @@ -6,7 +6,7 @@ LL | let x: Vec = Vec::new(); | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Trait + std::marker::Sized {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Trait + Sized {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time @@ -18,9 +18,9 @@ LL | let x: Vec = Vec::new(); ::: $SRC_DIR/alloc/src/vec.rs:LL:COL | LL | pub struct Vec { - | - required by this bound in `std::vec::Vec` + | - required by this bound in `Vec` | - = help: the trait `std::marker::Sized` is not implemented for `dyn Trait` + = help: the trait `Sized` is not implemented for `dyn Trait` error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time --> $DIR/bad-sized.rs:4:37 @@ -28,8 +28,8 @@ error[E0277]: the size for values of type `dyn Trait` cannot be known at compila LL | let x: Vec = Vec::new(); | ^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn Trait` - = note: required by `std::vec::Vec::::new` + = help: the trait `Sized` is not implemented for `dyn Trait` + = note: required by `Vec::::new` error: aborting due to 3 previous errors diff --git a/src/test/ui/binop/binop-bitxor-str.rs b/src/test/ui/binop/binop-bitxor-str.rs index e98ea4df97d..3085cce3f3e 100644 --- a/src/test/ui/binop/binop-bitxor-str.rs +++ b/src/test/ui/binop/binop-bitxor-str.rs @@ -1,3 +1,3 @@ -// error-pattern:no implementation for `std::string::String ^ std::string::String` +// error-pattern:no implementation for `String ^ String` fn main() { let x = "a".to_string() ^ "b".to_string(); } diff --git a/src/test/ui/binop/binop-bitxor-str.stderr b/src/test/ui/binop/binop-bitxor-str.stderr index 18c1ce0ff02..f236cd61efe 100644 --- a/src/test/ui/binop/binop-bitxor-str.stderr +++ b/src/test/ui/binop/binop-bitxor-str.stderr @@ -1,10 +1,10 @@ -error[E0369]: no implementation for `std::string::String ^ std::string::String` +error[E0369]: no implementation for `String ^ String` --> $DIR/binop-bitxor-str.rs:3:37 | LL | fn main() { let x = "a".to_string() ^ "b".to_string(); } - | --------------- ^ --------------- std::string::String + | --------------- ^ --------------- String | | - | std::string::String + | String error: aborting due to previous error diff --git a/src/test/ui/blind/blind-item-block-middle.stderr b/src/test/ui/blind/blind-item-block-middle.stderr index d8d15615d7c..9db11cf1590 100644 --- a/src/test/ui/blind/blind-item-block-middle.stderr +++ b/src/test/ui/blind/blind-item-block-middle.stderr @@ -7,7 +7,7 @@ LL | mod foo { pub struct bar; } LL | let bar = 5; | ^^^ | | - | expected integer, found struct `foo::bar` + | expected integer, found struct `bar` | `bar` is interpreted as a unit struct, not a new binding | help: introduce a new binding instead: `other_bar` diff --git a/src/test/ui/block-result/consider-removing-last-semi.stderr b/src/test/ui/block-result/consider-removing-last-semi.stderr index 15ca8316708..7c3d0165c6d 100644 --- a/src/test/ui/block-result/consider-removing-last-semi.stderr +++ b/src/test/ui/block-result/consider-removing-last-semi.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:3:15 | LL | pub fn f() -> String { - | - ^^^^^^ expected struct `std::string::String`, found `()` + | - ^^^^^^ expected struct `String`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression LL | 0u8; @@ -13,7 +13,7 @@ error[E0308]: mismatched types --> $DIR/consider-removing-last-semi.rs:8:15 | LL | pub fn g() -> String { - | - ^^^^^^ expected struct `std::string::String`, found `()` + | - ^^^^^^ expected struct `String`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression LL | "this won't work".to_string(); diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr index 707d24cd6ab..60aa2c5a6b0 100644 --- a/src/test/ui/block-result/issue-13428.stderr +++ b/src/test/ui/block-result/issue-13428.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-13428.rs:3:13 | LL | fn foo() -> String { - | --- ^^^^^^ expected struct `std::string::String`, found `()` + | --- ^^^^^^ expected struct `String`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression ... @@ -13,7 +13,7 @@ error[E0308]: mismatched types --> $DIR/issue-13428.rs:11:13 | LL | fn bar() -> String { - | --- ^^^^^^ expected struct `std::string::String`, found `()` + | --- ^^^^^^ expected struct `String`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression LL | "foobar".to_string() diff --git a/src/test/ui/block-result/issue-13624.rs b/src/test/ui/block-result/issue-13624.rs index bd1d0de320e..4d2844cc5ae 100644 --- a/src/test/ui/block-result/issue-13624.rs +++ b/src/test/ui/block-result/issue-13624.rs @@ -6,7 +6,7 @@ mod a { pub fn get_enum_struct_variant() -> () { Enum::EnumStructVariant { x: 1, y: 2, z: 3 } //~^ ERROR mismatched types - //~| expected `()`, found enum `a::Enum` + //~| expected `()`, found enum `Enum` } } @@ -19,7 +19,7 @@ mod b { match enum_struct_variant { a::Enum::EnumStructVariant { x, y, z } => { //~^ ERROR mismatched types - //~| expected `()`, found enum `a::Enum` + //~| expected `()`, found enum `Enum` } } } diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr index 416f055251b..13070b4e821 100644 --- a/src/test/ui/block-result/issue-13624.stderr +++ b/src/test/ui/block-result/issue-13624.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | pub fn get_enum_struct_variant() -> () { | -- expected `()` because of return type LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `a::Enum` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `Enum` error[E0308]: mismatched types --> $DIR/issue-13624.rs:20:9 @@ -12,7 +12,7 @@ error[E0308]: mismatched types LL | match enum_struct_variant { | ------------------- this expression has type `()` LL | a::Enum::EnumStructVariant { x, y, z } => { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `a::Enum` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `Enum` error: aborting due to 2 previous errors diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index 79eb1d4b890..6649e67a509 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -6,7 +6,7 @@ LL | b + 3 | = help: the following implementations were found: - = note: required because of the requirements on the impl of `std::ops::Add<{integer}>` for `Bob` + = note: required because of the requirements on the impl of `Add<{integer}>` for `Bob` error[E0308]: mismatched types --> $DIR/issue-22645.rs:15:3 diff --git a/src/test/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr b/src/test/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr index 35ed2763c2b..1bf81589275 100644 --- a/src/test/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr +++ b/src/test/ui/borrowck/bindings-after-at-or-patterns-slice-patterns-box-patterns.stderr @@ -20,7 +20,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:22:5 | LL | fn bindings_after_at_slice_patterns_move_binding(x: [String; 4]) { - | - move occurs because `x` has type `[std::string::String; 4]`, which does not implement the `Copy` trait + | - move occurs because `x` has type `[String; 4]`, which does not implement the `Copy` trait LL | match x { LL | a @ [.., _] => (), | ----------- value moved here @@ -68,7 +68,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:80:5 | LL | fn bindings_after_at_or_patterns_move(x: Option) { - | - move occurs because `x` has type `std::option::Option`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Option`, which does not implement the `Copy` trait LL | match x { LL | foo @ Some(Test::Foo | Test::Bar) => (), | --------------------------------- @@ -119,7 +119,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:138:5 | LL | fn bindings_after_at_slice_patterns_or_patterns_moves(x: [Option; 4]) { - | - move occurs because `x` has type `[std::option::Option; 4]`, which does not implement the `Copy` trait + | - move occurs because `x` has type `[Option; 4]`, which does not implement the `Copy` trait LL | match x { LL | a @ [.., Some(Test::Foo | Test::Bar)] => (), | ------------------------------------- diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr index 6f2b20285b9..426d5bc4726 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-auto-deref.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | let __isize = &mut x.y; | ^^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:40:19 @@ -12,7 +12,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | let __isize = &mut x.y; | ^^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:48:5 @@ -20,7 +20,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | &mut x.y | ^^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:52:5 @@ -28,7 +28,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | &mut x.y | ^^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0594]: cannot assign to data in an `Rc` --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:56:5 @@ -36,7 +36,7 @@ error[E0594]: cannot assign to data in an `Rc` LL | x.y = 3; | ^^^^^^^ cannot assign | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0594]: cannot assign to data in an `Rc` --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:60:5 @@ -44,7 +44,7 @@ error[E0594]: cannot assign to data in an `Rc` LL | x.y = 3; | ^^^^^^^ cannot assign | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0594]: cannot assign to data in an `Rc` --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:64:5 @@ -52,7 +52,7 @@ error[E0594]: cannot assign to data in an `Rc` LL | x.y = 3; | ^^^^^^^ cannot assign | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:72:5 @@ -60,7 +60,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | x.set(0, 0); | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:76:5 @@ -68,7 +68,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | x.set(0, 0); | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:84:5 @@ -76,7 +76,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | x.y_mut() | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:88:5 @@ -84,7 +84,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | x.y_mut() | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:92:6 @@ -92,7 +92,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | *x.y_mut() = 3; | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:96:6 @@ -100,7 +100,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | *x.y_mut() = 3; | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref.rs:100:6 @@ -108,7 +108,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | *x.y_mut() = 3; | ^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error: aborting due to 14 previous errors diff --git a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr index 246a7981ae3..9ed9d292493 100644 --- a/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr +++ b/src/test/ui/borrowck/borrowck-borrow-overloaded-deref.stderr @@ -4,7 +4,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | let __isize = &mut *x; | ^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:16:19 @@ -12,7 +12,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | let __isize = &mut *x; | ^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:24:5 @@ -20,7 +20,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | &mut **x | ^^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0596]: cannot borrow data in an `Rc` as mutable --> $DIR/borrowck-borrow-overloaded-deref.rs:28:5 @@ -28,7 +28,7 @@ error[E0596]: cannot borrow data in an `Rc` as mutable LL | &mut **x | ^^^^^^^^ cannot borrow as mutable | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0594]: cannot assign to data in an `Rc` --> $DIR/borrowck-borrow-overloaded-deref.rs:32:5 @@ -36,7 +36,7 @@ error[E0594]: cannot assign to data in an `Rc` LL | *x = 3; | ^^^^^^ cannot assign | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0594]: cannot assign to data in an `Rc` --> $DIR/borrowck-borrow-overloaded-deref.rs:36:5 @@ -44,7 +44,7 @@ error[E0594]: cannot assign to data in an `Rc` LL | **x = 3; | ^^^^^^^ cannot assign | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error[E0594]: cannot assign to data in an `Rc` --> $DIR/borrowck-borrow-overloaded-deref.rs:40:5 @@ -52,7 +52,7 @@ error[E0594]: cannot assign to data in an `Rc` LL | **x = 3; | ^^^^^^^ cannot assign | - = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `std::rc::Rc` + = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `Rc` error: aborting due to 7 previous errors diff --git a/src/test/ui/borrowck/borrowck-closures-slice-patterns.stderr b/src/test/ui/borrowck/borrowck-closures-slice-patterns.stderr index 483975e5778..7f6c764ec22 100644 --- a/src/test/ui/borrowck/borrowck-closures-slice-patterns.stderr +++ b/src/test/ui/borrowck/borrowck-closures-slice-patterns.stderr @@ -30,7 +30,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/borrowck-closures-slice-patterns.rs:25:5 | LL | fn arr_by_move(x: [String; 3]) { - | - move occurs because `x` has type `[std::string::String; 3]`, which does not implement the `Copy` trait + | - move occurs because `x` has type `[String; 3]`, which does not implement the `Copy` trait LL | let f = || { | -- value moved into closure here LL | let [y, z @ ..] = x; @@ -71,7 +71,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/borrowck-closures-slice-patterns.rs:51:5 | LL | fn arr_box_by_move(x: Box<[String; 3]>) { - | - move occurs because `x` has type `std::boxed::Box<[std::string::String; 3]>`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box<[String; 3]>`, which does not implement the `Copy` trait LL | let f = || { | -- value moved into closure here LL | let [y, z @ ..] = *x; diff --git a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr index c69237fa95f..17b93106615 100644 --- a/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr +++ b/src/test/ui/borrowck/borrowck-consume-unsize-vec.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `b` --> $DIR/borrowck-consume-unsize-vec.rs:8:13 | LL | fn foo(b: Box<[i32;5]>) { - | - move occurs because `b` has type `std::boxed::Box<[i32; 5]>`, which does not implement the `Copy` trait + | - move occurs because `b` has type `Box<[i32; 5]>`, which does not implement the `Copy` trait LL | consume(b); | - value moved here LL | consume(b); diff --git a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr index 356cda01e29..4e20bbf1757 100644 --- a/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr +++ b/src/test/ui/borrowck/borrowck-consume-upcast-box.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `b` --> $DIR/borrowck-consume-upcast-box.rs:10:13 | LL | fn foo(b: Box) { - | - move occurs because `b` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `b` has type `Box`, which does not implement the `Copy` trait LL | consume(b); | - value moved here LL | consume(b); diff --git a/src/test/ui/borrowck/borrowck-describe-lvalue.stderr b/src/test/ui/borrowck/borrowck-describe-lvalue.stderr index 4144d70cc16..e386aa1f1f4 100644 --- a/src/test/ui/borrowck/borrowck-describe-lvalue.stderr +++ b/src/test/ui/borrowck/borrowck-describe-lvalue.stderr @@ -361,7 +361,7 @@ LL | drop(x); LL | drop(x); | ^ value used here after move | - = note: move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because `x` has type `Vec`, which does not implement the `Copy` trait error: aborting due to 32 previous errors diff --git a/src/test/ui/borrowck/borrowck-drop-from-guard.stderr b/src/test/ui/borrowck/borrowck-drop-from-guard.stderr index a2b42fa495e..77dda0a32b3 100644 --- a/src/test/ui/borrowck/borrowck-drop-from-guard.stderr +++ b/src/test/ui/borrowck/borrowck-drop-from-guard.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `my_str` --> $DIR/borrowck-drop-from-guard.rs:11:23 | LL | let my_str = "hello".to_owned(); - | ------ move occurs because `my_str` has type `std::string::String`, which does not implement the `Copy` trait + | ------ move occurs because `my_str` has type `String`, which does not implement the `Copy` trait LL | match Some(42) { LL | Some(_) if { drop(my_str); false } => {} | ------ value moved here diff --git a/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.edition.stderr b/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.edition.stderr index ebdacee7f65..e2c80732414 100644 --- a/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.edition.stderr +++ b/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.edition.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `foo` in pattern guard LL | (|| { let bar = foo; bar.take() })(); | ^^ --- | | | - | | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait + | | move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait | | move occurs due to use in closure | move out of `foo` occurs here | diff --git a/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.zflag.stderr b/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.zflag.stderr index ebdacee7f65..e2c80732414 100644 --- a/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.zflag.stderr +++ b/src/test/ui/borrowck/borrowck-feature-nll-overrides-migrate.zflag.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `foo` in pattern guard LL | (|| { let bar = foo; bar.take() })(); | ^^ --- | | | - | | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait + | | move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait | | move occurs due to use in closure | move out of `foo` occurs here | diff --git a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr index 158b2e42f2d..f1601336fca 100644 --- a/src/test/ui/borrowck/borrowck-field-sensitivity.stderr +++ b/src/test/ui/borrowck/borrowck-field-sensitivity.stderr @@ -6,7 +6,7 @@ LL | drop(x.b); LL | drop(*x.b); | ^^^^ value used here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:14:10 @@ -16,7 +16,7 @@ LL | let y = A { a: 3, .. x }; LL | drop(*x.b); | ^^^^ value used here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:20:13 @@ -26,7 +26,7 @@ LL | drop(x.b); LL | let p = &x.b; | ^^^^ value borrowed here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:27:13 @@ -36,7 +36,7 @@ LL | let _y = A { a: 3, .. x }; LL | let p = &x.b; | ^^^^ value borrowed here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0505]: cannot move out of `x.b` because it is borrowed --> $DIR/borrowck-field-sensitivity.rs:34:10 @@ -76,7 +76,7 @@ LL | drop(x.b); LL | drop(x.b); | ^^^ value used here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:62:10 @@ -86,7 +86,7 @@ LL | let _y = A { a: 3, .. x }; LL | drop(x.b); | ^^^ value used here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:68:14 @@ -96,7 +96,7 @@ LL | drop(x.b); LL | let _z = A { a: 3, .. x }; | ^^^^^^^^^^^^^^^^ value used here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.b` --> $DIR/borrowck-field-sensitivity.rs:74:14 @@ -106,7 +106,7 @@ LL | let _y = A { a: 3, .. x }; LL | let _z = A { a: 4, .. x }; | ^^^^^^^^^^^^^^^^ value used here after move | - = note: move occurs because `x.b` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.b` has type `Box`, which does not implement the `Copy` trait error[E0381]: assign to part of possibly-uninitialized variable: `x` --> $DIR/borrowck-field-sensitivity.rs:81:5 diff --git a/src/test/ui/borrowck/borrowck-fn-in-const-a.stderr b/src/test/ui/borrowck/borrowck-fn-in-const-a.stderr index 4c9cfa60ad4..e7491afdad1 100644 --- a/src/test/ui/borrowck/borrowck-fn-in-const-a.stderr +++ b/src/test/ui/borrowck/borrowck-fn-in-const-a.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of `*x` which is behind a shared reference --> $DIR/borrowck-fn-in-const-a.rs:6:16 | LL | return *x - | ^^ move occurs because `*x` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ move occurs because `*x` has type `String`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr index 38e41f315fc..2eabc1f1d9d 100644 --- a/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr +++ b/src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr @@ -15,7 +15,7 @@ LL | for &a in &f.a { | -- ^^^^ | || | |data moved here - | |move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait + | |move occurs because `a` has type `Box`, which does not implement the `Copy` trait | help: consider removing the `&`: `a` error[E0507]: cannot move out of a shared reference @@ -25,7 +25,7 @@ LL | for &a in x.iter() { | -- ^^^^^^^^ | || | |data moved here - | |move occurs because `a` has type `std::boxed::Box`, which does not implement the `Copy` trait + | |move occurs because `a` has type `Box`, which does not implement the `Copy` trait | help: consider removing the `&`: `a` error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-in-static.stderr b/src/test/ui/borrowck/borrowck-in-static.stderr index 77d6d7c231d..f73c787346d 100644 --- a/src/test/ui/borrowck/borrowck-in-static.stderr +++ b/src/test/ui/borrowck/borrowck-in-static.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `x`, a captured variable in an `Fn` closure LL | let x = Box::new(0); | - captured outer variable LL | Box::new(|| x) - | ^ move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `x` has type `Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-issue-2657-2.stderr b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr index 5880a1abb81..f9ba2ca416b 100644 --- a/src/test/ui/borrowck/borrowck-issue-2657-2.stderr +++ b/src/test/ui/borrowck/borrowck-issue-2657-2.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `*y` which is behind a shared reference LL | let _b = *y; | ^^ | | - | move occurs because `*y` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `*y` has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&*y` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-by-capture.stderr b/src/test/ui/borrowck/borrowck-move-by-capture.stderr index 0eceaf561b4..837bd08253b 100644 --- a/src/test/ui/borrowck/borrowck-move-by-capture.stderr +++ b/src/test/ui/borrowck/borrowck-move-by-capture.stderr @@ -7,7 +7,7 @@ LL | let _g = to_fn_mut(|| { LL | let _h = to_fn_once(move || -> isize { *bar }); | ^^^^^^^^^^^^^^^^ --- | | | - | | move occurs because `bar` has type `std::boxed::Box`, which does not implement the `Copy` trait + | | move occurs because `bar` has type `Box`, which does not implement the `Copy` trait | | move occurs due to use in closure | move out of `bar` occurs 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 26de39101f2..ead02414a62 100644 --- a/src/test/ui/borrowck/borrowck-move-error-with-note.stderr +++ b/src/test/ui/borrowck/borrowck-move-error-with-note.stderr @@ -34,7 +34,7 @@ LL | n => { | - | | | data moved here - | move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `n` has type `Box`, which does not implement the `Copy` trait error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr index 7dfae33920e..7ac095e808a 100644 --- a/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr +++ b/src/test/ui/borrowck/borrowck-move-from-unsafe-ptr.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `*x` which is behind a raw pointer LL | let y = *x; | ^^ | | - | move occurs because `*x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `*x` has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&*x` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr index f0a490d359d..6b19f9d977e 100644 --- a/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr +++ b/src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr @@ -5,7 +5,7 @@ LL | fn arg_item(&_x: &String) {} | ^-- | || | |data moved here - | |move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait + | |move occurs because `_x` has type `String`, which does not implement the `Copy` trait | help: consider removing the `&`: `_x` error[E0507]: cannot move out of a shared reference @@ -15,7 +15,7 @@ LL | with(|&_x| ()) | ^-- | || | |data moved here - | |move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait + | |move occurs because `_x` has type `String`, which does not implement the `Copy` trait | help: consider removing the `&`: `_x` error[E0507]: cannot move out of a shared reference @@ -25,7 +25,7 @@ LL | let &_x = &"hi".to_string(); | --- ^^^^^^^^^^^^^^^^^ | || | |data moved here - | |move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait + | |move occurs because `_x` has type `String`, which does not implement the `Copy` trait | help: consider removing the `&`: `_x` error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr index 557e27aae50..44f423c2bd9 100644 --- a/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr +++ b/src/test/ui/borrowck/borrowck-move-moved-value-into-closure.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `t` --> $DIR/borrowck-move-moved-value-into-closure.rs:11:12 | LL | let t: Box<_> = box 3; - | - move occurs because `t` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `t` has type `Box`, which does not implement the `Copy` trait LL | LL | call_f(move|| { *t + 1 }); | ------ - variable moved due to use in closure diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array-match.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array-match.stderr index d63f03a71db..3249aae8f44 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array-match.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array-match.stderr @@ -7,7 +7,7 @@ LL | [_, _, _x] => {} LL | [.., _y] => {} | ^^ value used here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-match.rs:23:14 @@ -18,7 +18,7 @@ LL | [_, _, (_x, _)] => {} LL | [.., _y] => {} | ^^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array-match.rs:33:15 @@ -29,7 +29,7 @@ LL | [_, _, (_x, _)] => {} LL | [.., (_y, _)] => {} | ^^ value used here after move | - = note: move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-match.rs:44:11 @@ -40,7 +40,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-match.rs:55:11 @@ -51,7 +51,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-match.rs:66:11 @@ -62,7 +62,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-match.rs:77:11 @@ -73,7 +73,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array-match.rs:89:11 @@ -84,7 +84,7 @@ LL | [_y @ .., _, _] => {} LL | [(_x, _), _, _] => {} | ^^ value used here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array-match.rs:99:15 @@ -95,7 +95,7 @@ LL | [_, _, _y @ ..] => {} LL | [.., (_x, _)] => {} | ^^ value used here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-match.rs:110:11 @@ -106,7 +106,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error: aborting due to 10 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr index 7c675149894..c198002265b 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr @@ -7,7 +7,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:28:11 @@ -18,7 +18,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:41:11 @@ -29,7 +29,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:52:11 @@ -40,7 +40,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:63:11 @@ -51,7 +51,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:74:11 @@ -62,7 +62,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:85:11 @@ -73,7 +73,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:96:11 @@ -84,7 +84,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:109:11 @@ -95,7 +95,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error: aborting due to 9 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array-use-match.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array-use-match.stderr index 806354b0116..8f2da9d203b 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array-use-match.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array-use-match.stderr @@ -7,7 +7,7 @@ LL | [_, _, _x] => {} LL | [.., ref _y] => {} | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-use-match.rs:23:14 @@ -18,7 +18,7 @@ LL | [_, _, (_x, _)] => {} LL | [.., ref _y] => {} | ^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array-use-match.rs:33:15 @@ -29,7 +29,7 @@ LL | [_, _, (_x, _)] => {} LL | [.., (ref _y, _)] => {} | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:44:11 @@ -40,7 +40,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:55:11 @@ -51,7 +51,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:66:11 @@ -62,7 +62,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:77:11 @@ -73,7 +73,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-use-match.rs:89:11 @@ -84,7 +84,7 @@ LL | [_y @ .., _, _] => {} LL | [(ref _x, _), _, _] => {} | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-use-match.rs:99:15 @@ -95,7 +95,7 @@ LL | [_, _, _y @ ..] => {} LL | [.., (ref _x, _)] => {} | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:110:11 @@ -106,7 +106,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:123:5 @@ -117,7 +117,7 @@ LL | } LL | a[2] = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:131:5 @@ -128,7 +128,7 @@ LL | } LL | a[2].1 = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:139:5 @@ -139,7 +139,7 @@ LL | } LL | a[0] = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-match.rs:147:5 @@ -150,7 +150,7 @@ LL | } LL | a[0].1 = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error: aborting due to 14 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr index 53f815db140..4b27f03dc45 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr @@ -7,7 +7,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:28:11 @@ -18,7 +18,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:41:11 @@ -29,7 +29,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:52:11 @@ -40,7 +40,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:63:11 @@ -51,7 +51,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:74:11 @@ -62,7 +62,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:85:11 @@ -73,7 +73,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:96:11 @@ -84,7 +84,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:109:11 @@ -95,7 +95,7 @@ LL | } LL | match a { | ^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error: aborting due to 9 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array-use.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array-use.stderr index 004cc433b34..b0bad6e9978 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array-use.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array-use.stderr @@ -6,7 +6,7 @@ LL | let [_, _, _x] = a; LL | let [.., ref _y] = a; | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-use.rs:16:14 @@ -16,7 +16,7 @@ LL | let [_, _, (_x, _)] = a; LL | let [.., ref _y] = a; | ^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array-use.rs:22:15 @@ -26,7 +26,7 @@ LL | let [_, _, (_x, _)] = a; LL | let [.., (ref _y, _)] = a; | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:30:10 @@ -36,7 +36,7 @@ LL | let [_x, _, _] = a; LL | let [ref _y @ .., _, _] = a; | ^^^^^^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:36:16 @@ -46,7 +46,7 @@ LL | let [.., _x] = a; LL | let [_, _, ref _y @ ..] = a; | ^^^^^^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:42:10 @@ -56,7 +56,7 @@ LL | let [(_x, _), _, _] = a; LL | let [ref _y @ .., _, _] = a; | ^^^^^^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:48:16 @@ -66,7 +66,7 @@ LL | let [.., (_x, _)] = a; LL | let [_, _, ref _y @ ..] = a; | ^^^^^^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-use.rs:54:11 @@ -76,7 +76,7 @@ LL | let [_y @ .., _, _] = a; LL | let [(ref _x, _), _, _] = a; | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `a[..]` --> $DIR/borrowck-move-out-from-array-use.rs:60:15 @@ -86,7 +86,7 @@ LL | let [_, _, _y @ ..] = a; LL | let [.., (ref _x, _)] = a; | ^^^^^^ value borrowed here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: borrow of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:68:13 @@ -96,7 +96,7 @@ LL | let [x @ .., _] = a; LL | let [_, ref _y @ ..] = a; | ^^^^^^^^^^^ value borrowed here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:76:5 @@ -106,7 +106,7 @@ LL | let [_, _, _x] = a; LL | a[2] = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:82:5 @@ -116,7 +116,7 @@ LL | let [_, _, (_x, _)] = a; LL | a[2].1 = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:88:5 @@ -126,7 +126,7 @@ LL | let [_, _, _x @ ..] = a; LL | a[0] = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array-use.rs:94:5 @@ -136,7 +136,7 @@ LL | let [_, _, _x @ ..] = a; LL | a[0].1 = Default::default(); | ^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error: aborting due to 14 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-from-array.stderr b/src/test/ui/borrowck/borrowck-move-out-from-array.stderr index d3eb3e9f761..1fc2b292b84 100644 --- a/src/test/ui/borrowck/borrowck-move-out-from-array.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-from-array.stderr @@ -6,7 +6,7 @@ LL | let [_, _, _x] = a; LL | let [.., _y] = a; | ^^ value used here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a[..]` --> $DIR/borrowck-move-out-from-array.rs:16:14 @@ -16,7 +16,7 @@ LL | let [_, _, (_x, _)] = a; LL | let [.., _y] = a; | ^^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array.rs:22:15 @@ -26,7 +26,7 @@ LL | let [_, _, (_x, _)] = a; LL | let [.., (_y, _)] = a; | ^^ value used here after move | - = note: move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array.rs:30:10 @@ -36,7 +36,7 @@ LL | let [_x, _, _] = a; LL | let [_y @ .., _, _] = a; | ^^^^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array.rs:36:16 @@ -46,7 +46,7 @@ LL | let [.., _x] = a; LL | let [_, _, _y @ ..] = a; | ^^^^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array.rs:42:10 @@ -56,7 +56,7 @@ LL | let [(_x, _), _, _] = a; LL | let [_y @ .., _, _] = a; | ^^^^^^^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array.rs:48:16 @@ -66,7 +66,7 @@ LL | let [.., (_x, _)] = a; LL | let [_, _, _y @ ..] = a; | ^^^^^^^ value used here after partial move | - = note: partial move occurs because `a[..].0` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array.rs:54:11 @@ -76,7 +76,7 @@ LL | let [_y @ .., _, _] = a; LL | let [(_x, _), _, _] = a; | ^^ value used here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of moved value: `a[..].0` --> $DIR/borrowck-move-out-from-array.rs:60:15 @@ -86,7 +86,7 @@ LL | let [_, _, _y @ ..] = a; LL | let [.., (_x, _)] = a; | ^^ value used here after move | - = note: move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error[E0382]: use of partially moved value: `a` --> $DIR/borrowck-move-out-from-array.rs:68:13 @@ -96,7 +96,7 @@ LL | let [x @ .., _] = a; LL | let [_, _y @ ..] = a; | ^^^^^^^ value used here after partial move | - = note: partial move occurs because `a[..]` has type `(std::string::String, std::string::String)`, which does not implement the `Copy` trait + = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait error: aborting due to 10 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr index 8a94c85ef27..0a29d2bb1d5 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of an `Rc` --> $DIR/borrowck-move-out-of-overloaded-auto-deref.rs:4:14 | LL | let _x = Rc::new(vec![1, 2]).into_iter(); - | ^^^^^^^^^^^^^^^^^^^ move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^^^^^^^^^^^^^^^^^^ move occurs because value has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr index 1501644fac7..68994c2071b 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-overloaded-deref.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of an `Rc` LL | let _x = *Rc::new("hi".to_string()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | move occurs because value has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because value has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*Rc::new("hi".to_string())` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr index a2f66f3ec46..7b00ac9f1c3 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-struct-with-dtor.stderr @@ -8,7 +8,7 @@ LL | S {f:_s} => {} | -- | | | data moved here - | move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `_s` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:14:20 @@ -17,7 +17,7 @@ LL | let S {f:_s} = S {f:"foo".to_string()}; | -- ^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here | | | data moved here - | move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `_s` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-out-of-struct-with-dtor.rs:18:19 @@ -26,7 +26,7 @@ LL | fn move_in_fn_arg(S {f:_s}: S) { | ^^^^^--^ | | | | | data moved here - | | move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + | | move occurs because `_s` has type `String`, which does not implement the `Copy` trait | cannot move out of here error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr index f9a539c1c9f..f00181b7468 100644 --- a/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr +++ b/src/test/ui/borrowck/borrowck-move-out-of-tuple-struct-with-dtor.stderr @@ -8,7 +8,7 @@ LL | S(_s) => {} | -- | | | data moved here - | move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `_s` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:14:17 @@ -17,7 +17,7 @@ LL | let S(_s) = S("foo".to_string()); | -- ^^^^^^^^^^^^^^^^^^^^ cannot move out of here | | | data moved here - | move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `_s` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `S`, which implements the `Drop` trait --> $DIR/borrowck-move-out-of-tuple-struct-with-dtor.rs:18:19 @@ -26,7 +26,7 @@ LL | fn move_in_fn_arg(S(_s): S) { | ^^--^ | | | | | data moved here - | | move occurs because `_s` has type `std::string::String`, which does not implement the `Copy` trait + | | move occurs because `_s` has type `String`, which does not implement the `Copy` trait | cannot move out of here error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/borrowck-multiple-captures.stderr b/src/test/ui/borrowck/borrowck-multiple-captures.stderr index 298482b3c58..e159878619a 100644 --- a/src/test/ui/borrowck/borrowck-multiple-captures.stderr +++ b/src/test/ui/borrowck/borrowck-multiple-captures.stderr @@ -31,7 +31,7 @@ error[E0382]: use of moved value: `x1` --> $DIR/borrowck-multiple-captures.rs:27:19 | LL | let x1: Box<_> = box 1; - | -- move occurs because `x1` has type `std::boxed::Box`, which does not implement the `Copy` trait + | -- move occurs because `x1` has type `Box`, which does not implement the `Copy` trait LL | drop(x1); | -- value moved here ... @@ -45,7 +45,7 @@ error[E0382]: use of moved value: `x2` --> $DIR/borrowck-multiple-captures.rs:27:19 | LL | let x2: Box<_> = box 2; - | -- move occurs because `x2` has type `std::boxed::Box`, which does not implement the `Copy` trait + | -- move occurs because `x2` has type `Box`, which does not implement the `Copy` trait LL | drop(x2); | -- value moved here LL | thread::spawn(move|| { @@ -62,7 +62,7 @@ LL | drop(x); LL | drop(x); | ^ value used here after move | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x` has type `Box`, which does not implement the `Copy` trait error[E0505]: cannot move out of `x` because it is borrowed --> $DIR/borrowck-multiple-captures.rs:38:19 @@ -86,13 +86,13 @@ LL | drop(x); LL | drop(x); | ^ value used here after move | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x` has type `Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x` --> $DIR/borrowck-multiple-captures.rs:49:19 | LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | drop(x); | - value moved here LL | thread::spawn(move|| { diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs index ddc210f9aa2..ddf6354c973 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs +++ b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.rs @@ -18,5 +18,5 @@ fn main() { let v = MyVec::> { data: vec![box 1, box 2, box 3] }; let good = &v[0]; // Shouldn't fail here let bad = v[0]; - //~^ ERROR cannot move out of index of `MyVec>` + //~^ ERROR cannot move out of index of `MyVec>` } diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr index 57f42ede21c..2b4293b433e 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr @@ -1,10 +1,10 @@ -error[E0507]: cannot move out of index of `MyVec>` +error[E0507]: cannot move out of index of `MyVec>` --> $DIR/borrowck-overloaded-index-move-from-vec.rs:20:15 | LL | let bad = v[0]; | ^^^^ | | - | move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because value has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&v[0]` error: aborting due to previous error diff --git a/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr b/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr index 5414b01cb0d..bacad399ebe 100644 --- a/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr +++ b/src/test/ui/borrowck/borrowck-overloaded-index-move-index.stderr @@ -26,7 +26,7 @@ error[E0382]: use of moved value: `s` --> $DIR/borrowck-overloaded-index-move-index.rs:53:7 | LL | let mut s = "hello".to_string(); - | ----- move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | ----- move occurs because `s` has type `String`, which does not implement the `Copy` trait ... LL | println!("{}", f[s]); | - value moved here diff --git a/src/test/ui/borrowck/borrowck-reinit.stderr b/src/test/ui/borrowck/borrowck-reinit.stderr index f8f14b6435f..22253cd96f1 100644 --- a/src/test/ui/borrowck/borrowck-reinit.stderr +++ b/src/test/ui/borrowck/borrowck-reinit.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/borrowck-reinit.rs:6:16 | LL | let mut x = Box::new(0); - | ----- move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ----- move occurs because `x` has type `Box`, which does not implement the `Copy` trait ... LL | drop(x); | - value moved here diff --git a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr index c92c65ba736..af32f279100 100644 --- a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr +++ b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.stderr @@ -14,7 +14,7 @@ LL | let _s2 = T{a: 2, ..s0}; | ^^^^^^^^^^^^^ | | | cannot move out of here - | move occurs because `s0.mv` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `s0.mv` has type `Box`, which does not implement the `Copy` trait error: aborting due to 2 previous errors diff --git a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr index e2c0852dd83..b4b3bc1ba2b 100644 --- a/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr +++ b/src/test/ui/borrowck/borrowck-vec-pattern-nesting.stderr @@ -22,7 +22,7 @@ LL | LL | _b.use_ref(); | -- borrow later used here -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice +error[E0508]: cannot move out of type `[Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:34:11 | LL | match vec { @@ -32,7 +32,7 @@ LL | &mut [_a, | -- | | | data moved here - | move occurs because `_a` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `_a` has type `Box`, which does not implement the `Copy` trait | help: consider removing the `&mut` | @@ -44,17 +44,17 @@ LL | .. LL | ] => { | -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice +error[E0508]: cannot move out of type `[Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:46:13 | LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here - | move occurs because `vec[_]` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `vec[_]` has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&vec[0]` -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice +error[E0508]: cannot move out of type `[Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:55:11 | LL | match vec { @@ -64,7 +64,7 @@ LL | _b] => {} | -- | | | data moved here - | move occurs because `_b` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `_b` has type `Box`, which does not implement the `Copy` trait | help: consider removing the `&mut` | @@ -73,17 +73,17 @@ LL | LL | _b] => {} | -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice +error[E0508]: cannot move out of type `[Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:65:13 | LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here - | move occurs because `vec[_]` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `vec[_]` has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&vec[0]` -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice +error[E0508]: cannot move out of type `[Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:74:11 | LL | match vec { @@ -99,14 +99,14 @@ LL | &mut [_a, _b, _c] => {} | = note: move occurs because these variables have types that don't implement the `Copy` trait -error[E0508]: cannot move out of type `[std::boxed::Box]`, a non-copy slice +error[E0508]: cannot move out of type `[Box]`, a non-copy slice --> $DIR/borrowck-vec-pattern-nesting.rs:85:13 | LL | let a = vec[0]; | ^^^^^^ | | | cannot move out of here - | move occurs because `vec[_]` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `vec[_]` has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&vec[0]` error: aborting due to 8 previous errors diff --git a/src/test/ui/borrowck/index-mut-help.stderr b/src/test/ui/borrowck/index-mut-help.stderr index baf649f9127..52b9ad496e5 100644 --- a/src/test/ui/borrowck/index-mut-help.stderr +++ b/src/test/ui/borrowck/index-mut-help.stderr @@ -1,26 +1,26 @@ -error[E0596]: cannot borrow data in an index of `std::collections::HashMap<&str, std::string::String>` as mutable +error[E0596]: cannot borrow data in an index of `HashMap<&str, String>` as mutable --> $DIR/index-mut-help.rs:11:5 | LL | map["peter"].clear(); | ^^^^^^^^^^^^ cannot borrow as mutable | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` + = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<&str, String>` -error[E0594]: cannot assign to data in an index of `std::collections::HashMap<&str, std::string::String>` +error[E0594]: cannot assign to data in an index of `HashMap<&str, String>` --> $DIR/index-mut-help.rs:12:5 | LL | map["peter"] = "0".to_string(); | ^^^^^^^^^^^^ cannot assign | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` + = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<&str, String>` -error[E0596]: cannot borrow data in an index of `std::collections::HashMap<&str, std::string::String>` as mutable +error[E0596]: cannot borrow data in an index of `HashMap<&str, String>` as mutable --> $DIR/index-mut-help.rs:13:13 | LL | let _ = &mut map["peter"]; | ^^^^^^^^^^^^^^^^^ cannot borrow as mutable | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap<&str, std::string::String>` + = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap<&str, String>` error: aborting due to 3 previous errors diff --git a/src/test/ui/borrowck/issue-27282-mutation-in-guard.stderr b/src/test/ui/borrowck/issue-27282-mutation-in-guard.stderr index ea7df7d5a7b..540f7f8a484 100644 --- a/src/test/ui/borrowck/issue-27282-mutation-in-guard.stderr +++ b/src/test/ui/borrowck/issue-27282-mutation-in-guard.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `foo` in pattern guard LL | (|| { let bar = foo; bar.take() })(); | ^^ --- | | | - | | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait + | | move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait | | move occurs due to use in closure | move out of `foo` occurs here | diff --git a/src/test/ui/borrowck/issue-31287-drop-in-guard.stderr b/src/test/ui/borrowck/issue-31287-drop-in-guard.stderr index 85c83ec4d70..d33115988a9 100644 --- a/src/test/ui/borrowck/issue-31287-drop-in-guard.stderr +++ b/src/test/ui/borrowck/issue-31287-drop-in-guard.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `a` --> $DIR/issue-31287-drop-in-guard.rs:5:9 | LL | let a = Some("...".to_owned()); - | - move occurs because `a` has type `std::option::Option`, which does not implement the `Copy` trait + | - move occurs because `a` has type `Option`, which does not implement the `Copy` trait LL | let b = match a { LL | Some(_) if { drop(a); false } => None, | - value moved here diff --git a/src/test/ui/borrowck/issue-41962.stderr b/src/test/ui/borrowck/issue-41962.stderr index 604143b4e7e..dd3090b30f0 100644 --- a/src/test/ui/borrowck/issue-41962.stderr +++ b/src/test/ui/borrowck/issue-41962.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value LL | if let Some(thing) = maybe { | ^^^^^ value moved here, in previous iteration of loop | - = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because value has type `Vec`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving `maybe.0` | LL | if let Some(ref thing) = maybe { diff --git a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr index 249a05192b2..eb41af1cea8 100644 --- a/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr +++ b/src/test/ui/borrowck/issue-47215-ice-from-drop-elab.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of static item `X` LL | let mut x = X; | ^ | | - | move occurs because `X` has type `std::sync::atomic::AtomicUsize`, which does not implement the `Copy` trait + | move occurs because `X` has type `AtomicUsize`, which does not implement the `Copy` trait | help: consider borrowing here: `&X` error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-51415.stderr b/src/test/ui/borrowck/issue-51415.stderr index 96175b14960..a88819efcf7 100644 --- a/src/test/ui/borrowck/issue-51415.stderr +++ b/src/test/ui/borrowck/issue-51415.stderr @@ -5,7 +5,7 @@ LL | let opt = a.iter().enumerate().find(|(_, &s)| { | ^^^^^-^ | | | data moved here - | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `s` has type `String`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr index 78d44f32061..1f9cbdb7342 100644 --- a/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr +++ b/src/test/ui/borrowck/issue-54597-reject-move-out-of-borrow-via-pat.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `*array` which is behind a shared reference LL | *array | ^^^^^^ | | - | move occurs because `*array` has type `std::vec::Vec`, which does not implement the `Copy` trait + | move occurs because `*array` has type `Vec`, which does not implement the `Copy` trait | help: consider borrowing here: `&*array` error: aborting due to previous error diff --git a/src/test/ui/borrowck/issue-64453.stderr b/src/test/ui/borrowck/issue-64453.stderr index 081ccd37861..fba801983cf 100644 --- a/src/test/ui/borrowck/issue-64453.stderr +++ b/src/test/ui/borrowck/issue-64453.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of static item `settings_dir` --> $DIR/issue-64453.rs:14:37 | LL | let settings_data = from_string(settings_dir); - | ^^^^^^^^^^^^ move occurs because `settings_dir` has type `std::string::String`, which does not implement the `Copy` trait + | ^^^^^^^^^^^^ move occurs because `settings_dir` has type `String`, which does not implement the `Copy` trait error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants --> $DIR/issue-64453.rs:4:31 diff --git a/src/test/ui/borrowck/move-from-union-field-issue-66500.stderr b/src/test/ui/borrowck/move-from-union-field-issue-66500.stderr index a7cb1c9e221..82c3fe3b12d 100644 --- a/src/test/ui/borrowck/move-from-union-field-issue-66500.stderr +++ b/src/test/ui/borrowck/move-from-union-field-issue-66500.stderr @@ -2,25 +2,25 @@ error[E0507]: cannot move out of `*u.a` which is behind a shared reference --> $DIR/move-from-union-field-issue-66500.rs:14:5 | LL | *u.a - | ^^^^ move occurs because `*u.a` has type `std::string::String`, which does not implement the `Copy` trait + | ^^^^ move occurs because `*u.a` has type `String`, which does not implement the `Copy` trait error[E0507]: cannot move out of `*u.b` which is behind a mutable reference --> $DIR/move-from-union-field-issue-66500.rs:18:5 | LL | *u.b - | ^^^^ move occurs because `*u.b` has type `std::string::String`, which does not implement the `Copy` trait + | ^^^^ move occurs because `*u.b` has type `String`, which does not implement the `Copy` trait error[E0507]: cannot move out of `*u.c` which is behind a raw pointer --> $DIR/move-from-union-field-issue-66500.rs:22:5 | LL | *u.c - | ^^^^ move occurs because `*u.c` has type `std::string::String`, which does not implement the `Copy` trait + | ^^^^ move occurs because `*u.c` has type `String`, which does not implement the `Copy` trait error[E0507]: cannot move out of `*u.d` which is behind a raw pointer --> $DIR/move-from-union-field-issue-66500.rs:26:5 | LL | *u.d - | ^^^^ move occurs because `*u.d` has type `std::string::String`, which does not implement the `Copy` trait + | ^^^^ move occurs because `*u.d` has type `String`, which does not implement the `Copy` trait error: aborting due to 4 previous errors diff --git a/src/test/ui/borrowck/or-patterns.stderr b/src/test/ui/borrowck/or-patterns.stderr index d3f3544426a..9593b94537a 100644 --- a/src/test/ui/borrowck/or-patterns.stderr +++ b/src/test/ui/borrowck/or-patterns.stderr @@ -7,7 +7,7 @@ LL | } LL | &x.0 .0; | ^^^^^^^ value borrowed here after move | - = note: move occurs because `x.0.0` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `x.0.0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `x.0.1` --> $DIR/or-patterns.rs:12:5 @@ -18,7 +18,7 @@ LL | ((y, _) | (_, y),) => (), LL | &x.0 .1; | ^^^^^^^ value borrowed here after move | - = note: move occurs because `x.0.1` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `x.0.1` has type `String`, which does not implement the `Copy` trait error[E0502]: cannot borrow `x.0.0` as mutable because it is also borrowed as immutable --> $DIR/or-patterns.rs:20:5 @@ -76,7 +76,7 @@ LL | let ((y, _) | (_, y),) = x; LL | &x.0 .0; | ^^^^^^^ value borrowed here after move | - = note: move occurs because `x.0.0` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `x.0.0` has type `String`, which does not implement the `Copy` trait error[E0382]: borrow of moved value: `x.0.1` --> $DIR/or-patterns.rs:42:5 @@ -87,7 +87,7 @@ LL | let ((y, _) | (_, y),) = x; LL | &x.0 .1; | ^^^^^^^ value borrowed here after move | - = note: move occurs because `x.0.1` has type `std::string::String`, which does not implement the `Copy` trait + = note: move occurs because `x.0.1` has type `String`, which does not implement the `Copy` trait error[E0502]: cannot borrow `x.0.0` as mutable because it is also borrowed as immutable --> $DIR/or-patterns.rs:48:5 diff --git a/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr b/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr index 21ae25c16bb..50d277a12f7 100644 --- a/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr +++ b/src/test/ui/borrowck/two-phase-nonrecv-autoref.nll.stderr @@ -11,7 +11,7 @@ error[E0382]: use of moved value: `f` --> $DIR/two-phase-nonrecv-autoref.rs:59:11 | LL | fn twice_ten_so i32>(f: Box) { - | - move occurs because `f` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `f` has type `Box`, which does not implement the `Copy` trait LL | f(f(10)); | - ^ value used here after move | | @@ -30,7 +30,7 @@ error[E0382]: use of moved value: `f` --> $DIR/two-phase-nonrecv-autoref.rs:73:11 | LL | fn twice_ten_oo(f: Box i32>) { - | - move occurs because `f` has type `std::boxed::Box i32>`, which does not implement the `Copy` trait + | - move occurs because `f` has type `Box i32>`, which does not implement the `Copy` trait LL | f(f(10)); | - ^ value used here after move | | 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 73cea6fc361..dbba33f0183 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 @@ -5,7 +5,7 @@ LL | let y = vec![format!("World")]; | - captured outer variable LL | call(|| { LL | y.into_iter(); - | ^ move occurs because `y` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^ move occurs because `y` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/bound-suggestions.fixed b/src/test/ui/bound-suggestions.fixed index 9c98200db51..a3fe67a9595 100644 --- a/src/test/ui/bound-suggestions.fixed +++ b/src/test/ui/bound-suggestions.fixed @@ -1,37 +1,41 @@ // run-rustfix +#[allow(unused)] +use std::fmt::Debug; +// Rustfix should add this, or use `std::fmt::Debug` instead. + #[allow(dead_code)] -fn test_impl(t: impl Sized + std::fmt::Debug) { +fn test_impl(t: impl Sized + Debug) { println!("{:?}", t); //~^ ERROR doesn't implement } #[allow(dead_code)] -fn test_no_bounds(t: T) { +fn test_no_bounds(t: T) { println!("{:?}", t); //~^ ERROR doesn't implement } #[allow(dead_code)] -fn test_one_bound(t: T) { +fn test_one_bound(t: T) { println!("{:?}", t); //~^ ERROR doesn't implement } #[allow(dead_code)] -fn test_no_bounds_where(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug { +fn test_no_bounds_where(x: X, y: Y) where X: std::fmt::Debug, Y: Debug { println!("{:?} {:?}", x, y); //~^ ERROR doesn't implement } #[allow(dead_code)] -fn test_one_bound_where(x: X) where X: Sized + std::fmt::Debug { +fn test_one_bound_where(x: X) where X: Sized + Debug { println!("{:?}", x); //~^ ERROR doesn't implement } #[allow(dead_code)] -fn test_many_bounds_where(x: X) where X: Sized, X: Sized, X: std::fmt::Debug { +fn test_many_bounds_where(x: X) where X: Sized, X: Sized, X: Debug { println!("{:?}", x); //~^ ERROR doesn't implement } diff --git a/src/test/ui/bound-suggestions.rs b/src/test/ui/bound-suggestions.rs index 562dec9f080..de6133d7f59 100644 --- a/src/test/ui/bound-suggestions.rs +++ b/src/test/ui/bound-suggestions.rs @@ -1,5 +1,9 @@ // run-rustfix +#[allow(unused)] +use std::fmt::Debug; +// Rustfix should add this, or use `std::fmt::Debug` instead. + #[allow(dead_code)] fn test_impl(t: impl Sized) { println!("{:?}", t); diff --git a/src/test/ui/bound-suggestions.stderr b/src/test/ui/bound-suggestions.stderr index 623252a8c11..010f95d8ad6 100644 --- a/src/test/ui/bound-suggestions.stderr +++ b/src/test/ui/bound-suggestions.stderr @@ -1,80 +1,80 @@ -error[E0277]: `impl Sized` doesn't implement `std::fmt::Debug` - --> $DIR/bound-suggestions.rs:5:22 +error[E0277]: `impl Sized` doesn't implement `Debug` + --> $DIR/bound-suggestions.rs:9:22 | LL | println!("{:?}", t); - | ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound | -LL | fn test_impl(t: impl Sized + std::fmt::Debug) { - | ^^^^^^^^^^^^^^^^^ +LL | fn test_impl(t: impl Sized + Debug) { + | ^^^^^^^ -error[E0277]: `T` doesn't implement `std::fmt::Debug` - --> $DIR/bound-suggestions.rs:11:22 +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/bound-suggestions.rs:15:22 | LL | println!("{:?}", t); - | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T` | -LL | fn test_no_bounds(t: T) { - | ^^^^^^^^^^^^^^^^^ +LL | fn test_no_bounds(t: T) { + | ^^^^^^^ -error[E0277]: `T` doesn't implement `std::fmt::Debug` - --> $DIR/bound-suggestions.rs:17:22 +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/bound-suggestions.rs:21:22 | LL | println!("{:?}", t); - | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound | -LL | fn test_one_bound(t: T) { - | ^^^^^^^^^^^^^^^^^ +LL | fn test_one_bound(t: T) { + | ^^^^^^^ -error[E0277]: `Y` doesn't implement `std::fmt::Debug` - --> $DIR/bound-suggestions.rs:23:30 +error[E0277]: `Y` doesn't implement `Debug` + --> $DIR/bound-suggestions.rs:27:30 | LL | println!("{:?} {:?}", x, y); - | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `Y` | -LL | fn test_no_bounds_where(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^^^^ +LL | fn test_no_bounds_where(x: X, y: Y) where X: std::fmt::Debug, Y: Debug { + | ^^^^^^^^^^ -error[E0277]: `X` doesn't implement `std::fmt::Debug` - --> $DIR/bound-suggestions.rs:29:22 +error[E0277]: `X` doesn't implement `Debug` + --> $DIR/bound-suggestions.rs:33:22 | LL | println!("{:?}", x); - | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound | -LL | fn test_one_bound_where(x: X) where X: Sized + std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^ +LL | fn test_one_bound_where(x: X) where X: Sized + Debug { + | ^^^^^^^ -error[E0277]: `X` doesn't implement `std::fmt::Debug` - --> $DIR/bound-suggestions.rs:35:22 +error[E0277]: `X` doesn't implement `Debug` + --> $DIR/bound-suggestions.rs:39:22 | LL | println!("{:?}", x); - | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug` | = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `X` | -LL | fn test_many_bounds_where(x: X) where X: Sized, X: Sized, X: std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^^^^ +LL | fn test_many_bounds_where(x: X) where X: Sized, X: Sized, X: Debug { + | ^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/box-into-boxed-slice-fail.rs b/src/test/ui/box-into-boxed-slice-fail.rs index 5f8a3fd9d6a..49dbb170f8e 100644 --- a/src/test/ui/box-into-boxed-slice-fail.rs +++ b/src/test/ui/box-into-boxed-slice-fail.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(box_into_boxed_slice)] use std::boxed::Box; @@ -10,6 +9,6 @@ fn main() { //~^^ ERROR the size for values of type `[u8]` cannot be known at compilation time let boxed_trait: Box = Box::new(5u8); let _ = Box::into_boxed_slice(boxed_trait); - //~^ ERROR the size for values of type `dyn std::fmt::Debug` cannot be known at compilation time - //~^^ ERROR the size for values of type `dyn std::fmt::Debug` cannot be known at compilation time + //~^ ERROR the size for values of type `dyn Debug` cannot be known at compilation time + //~^^ ERROR the size for values of type `dyn Debug` cannot be known at compilation time } diff --git a/src/test/ui/box-into-boxed-slice-fail.stderr b/src/test/ui/box-into-boxed-slice-fail.stderr index b3e7b5b4fee..8cfa3668d92 100644 --- a/src/test/ui/box-into-boxed-slice-fail.stderr +++ b/src/test/ui/box-into-boxed-slice-fail.stderr @@ -1,37 +1,37 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time - --> $DIR/box-into-boxed-slice-fail.rs:8:35 + --> $DIR/box-into-boxed-slice-fail.rs:7:35 | LL | let _ = Box::into_boxed_slice(boxed_slice); | ^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` - = note: required by `std::boxed::Box::::into_boxed_slice` + = help: the trait `Sized` is not implemented for `[u8]` + = note: required by `Box::::into_boxed_slice` error[E0277]: the size for values of type `[u8]` cannot be known at compilation time - --> $DIR/box-into-boxed-slice-fail.rs:8:13 + --> $DIR/box-into-boxed-slice-fail.rs:7:13 | LL | let _ = Box::into_boxed_slice(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: slice and array elements must have `Sized` type -error[E0277]: the size for values of type `dyn std::fmt::Debug` cannot be known at compilation time - --> $DIR/box-into-boxed-slice-fail.rs:12:35 +error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time + --> $DIR/box-into-boxed-slice-fail.rs:11:35 | LL | let _ = Box::into_boxed_slice(boxed_trait); | ^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn std::fmt::Debug` - = note: required by `std::boxed::Box::::into_boxed_slice` + = help: the trait `Sized` is not implemented for `dyn Debug` + = note: required by `Box::::into_boxed_slice` -error[E0277]: the size for values of type `dyn std::fmt::Debug` cannot be known at compilation time - --> $DIR/box-into-boxed-slice-fail.rs:12:13 +error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time + --> $DIR/box-into-boxed-slice-fail.rs:11:13 | LL | let _ = Box::into_boxed_slice(boxed_trait); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn std::fmt::Debug` + = help: the trait `Sized` is not implemented for `dyn Debug` = note: slice and array elements must have `Sized` type error: aborting due to 4 previous errors diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr index 7ff986ec381..7e8ac113b48 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -10,8 +10,8 @@ LL | impl Foo for (T,) { } = note: required because it appears within the type `(T,)` help: consider further restricting this bound | -LL | impl Foo for (T,) { } - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo for (T,) { } + | ^^^^^^ error[E0277]: `T` cannot be shared between threads safely --> $DIR/builtin-superkinds-double-superkind.rs:9:16 @@ -25,8 +25,8 @@ LL | impl Foo for (T,T) { } = note: required because it appears within the type `(T, T)` help: consider further restricting this bound | -LL | impl Foo for (T,T) { } - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo for (T,T) { } + | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index 9ee045edfe5..2b4b6e548b8 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -7,13 +7,13 @@ LL | impl RequiresRequiresShareAndSend for X { } ::: $DIR/auxiliary/trait_superkinds_in_metadata.rs:7:58 | LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { } - | ---- required by this bound in `trait_superkinds_in_metadata::RequiresRequiresShareAndSend` + | ---- required by this bound in `RequiresRequiresShareAndSend` | = note: required because it appears within the type `X` help: consider further restricting this bound | -LL | impl RequiresRequiresShareAndSend for X { } - | ^^^^^^^^^^^^^^^^^^^ +LL | impl RequiresRequiresShareAndSend for X { } + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-simple.rs b/src/test/ui/builtin-superkinds/builtin-superkinds-simple.rs index afafc094383..1620f8d5cf1 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-simple.rs +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-simple.rs @@ -4,6 +4,6 @@ trait Foo : Send { } impl Foo for std::rc::Rc { } -//~^ ERROR `std::rc::Rc` cannot be sent between threads safely +//~^ ERROR `Rc` cannot be sent between threads safely fn main() { } diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr index 592cc3b1c4e..0abe2052b21 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr @@ -1,13 +1,13 @@ -error[E0277]: `std::rc::Rc` cannot be sent between threads safely +error[E0277]: `Rc` cannot be sent between threads safely --> $DIR/builtin-superkinds-simple.rs:6:6 | LL | trait Foo : Send { } | ---- required by this bound in `Foo` LL | LL | impl Foo for std::rc::Rc { } - | ^^^ `std::rc::Rc` cannot be sent between threads safely + | ^^^ `Rc` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc` + = help: the trait `Send` is not implemented for `Rc` error: aborting due to previous error diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr index ad80b3fa8d1..ff2cd1c4c8c 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr @@ -9,8 +9,8 @@ LL | impl Foo for T { } | help: consider further restricting this bound | -LL | impl Foo for T { } - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo for T { } + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/by-move-pattern-binding.stderr b/src/test/ui/by-move-pattern-binding.stderr index 1db4e2a66db..0012f67cfa1 100644 --- a/src/test/ui/by-move-pattern-binding.stderr +++ b/src/test/ui/by-move-pattern-binding.stderr @@ -8,7 +8,7 @@ LL | &E::Bar(identifier) => f(identifier.clone()) | ------------------- | | | | | data moved here - | | move occurs because `identifier` has type `std::string::String`, which does not implement the `Copy` trait + | | move occurs because `identifier` has type `String`, which does not implement the `Copy` trait | help: consider removing the `&`: `E::Bar(identifier)` error: aborting due to previous error diff --git a/src/test/ui/c-variadic/variadic-ffi-4.stderr b/src/test/ui/c-variadic/variadic-ffi-4.stderr index 65623501569..dd67514d02a 100644 --- a/src/test/ui/c-variadic/variadic-ffi-4.stderr +++ b/src/test/ui/c-variadic/variadic-ffi-4.stderr @@ -2,7 +2,7 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:8:5 | LL | pub unsafe extern "C" fn no_escape0<'f>(_: usize, ap: ...) -> VaListImpl<'f> { - | -- -- has type `core::ffi::VaListImpl<'1>` + | -- -- has type `VaListImpl<'1>` | | | lifetime `'f` defined here LL | ap @@ -12,7 +12,7 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:8:5 | LL | pub unsafe extern "C" fn no_escape0<'f>(_: usize, ap: ...) -> VaListImpl<'f> { - | -- -- has type `core::ffi::VaListImpl<'1>` + | -- -- has type `VaListImpl<'1>` | | | lifetime `'f` defined here LL | ap @@ -22,7 +22,7 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:14:5 | LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaListImpl<'static> { - | -- has type `core::ffi::VaListImpl<'1>` + | -- has type `VaListImpl<'1>` LL | ap | ^^ returning this value requires that `'1` must outlive `'static` @@ -32,16 +32,16 @@ error: lifetime may not live long enough LL | let _ = ap.with_copy(|ap| ap); | --- ^^ returning this value requires that `'1` must outlive `'2` | | | - | | return type of closure is core::ffi::VaList<'2, '_> - | has type `core::ffi::VaList<'1, '_>` + | | return type of closure is VaList<'2, '_> + | has type `VaList<'1, '_>` error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:22:5 | LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaListImpl<'2>` + | ------- ------- has type `VaListImpl<'2>` | | - | has type `&mut core::ffi::VaListImpl<'1>` + | has type `&mut VaListImpl<'1>` LL | *ap0 = ap1; | ^^^^ assignment requires that `'1` must outlive `'2` @@ -49,9 +49,9 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:22:5 | LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaListImpl<'2>` + | ------- ------- has type `VaListImpl<'2>` | | - | has type `&mut core::ffi::VaListImpl<'1>` + | has type `&mut VaListImpl<'1>` LL | *ap0 = ap1; | ^^^^ assignment requires that `'2` must outlive `'1` @@ -59,9 +59,9 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:28:5 | LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaListImpl<'2>` + | ------- ------- has type `VaListImpl<'2>` | | - | has type `&mut core::ffi::VaListImpl<'1>` + | has type `&mut VaListImpl<'1>` LL | ap0 = &mut ap1; | ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` @@ -69,9 +69,9 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:28:5 | LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaListImpl<'2>` + | ------- ------- has type `VaListImpl<'2>` | | - | has type `&mut core::ffi::VaListImpl<'1>` + | has type `&mut VaListImpl<'1>` LL | ap0 = &mut ap1; | ^^^^^^^^^^^^^^ assignment requires that `'2` must outlive `'1` @@ -93,9 +93,9 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:35:12 | LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaListImpl<'2>` + | ------- ------- has type `VaListImpl<'2>` | | - | has type `&mut core::ffi::VaListImpl<'1>` + | has type `&mut VaListImpl<'1>` LL | *ap0 = ap1.clone(); | ^^^^^^^^^^^ argument requires that `'1` must outlive `'2` @@ -103,9 +103,9 @@ error: lifetime may not live long enough --> $DIR/variadic-ffi-4.rs:35:12 | LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { - | ------- ------- has type `core::ffi::VaListImpl<'2>` + | ------- ------- has type `VaListImpl<'2>` | | - | has type `&mut core::ffi::VaListImpl<'1>` + | has type `&mut VaListImpl<'1>` LL | *ap0 = ap1.clone(); | ^^^^^^^^^^^ argument requires that `'2` must outlive `'1` diff --git a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr index 9b86f8d4def..3b5b8ea69c1 100644 --- a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr +++ b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr @@ -1,4 +1,4 @@ -error[E0620]: cast to unsized type: `&{integer}` as `dyn std::marker::Send` +error[E0620]: cast to unsized type: `&{integer}` as `dyn Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:2:5 | LL | &1 as dyn Send; @@ -6,7 +6,7 @@ LL | &1 as dyn Send; | | | help: try casting to a reference instead: `&dyn Send` -error[E0620]: cast to unsized type: `std::boxed::Box<{integer}>` as `dyn std::marker::Send` +error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5 | LL | Box::new(1) as dyn Send; diff --git a/src/test/ui/casts-differing-anon.stderr b/src/test/ui/casts-differing-anon.stderr index fbbb8e3bb33..a30e9b35f5c 100644 --- a/src/test/ui/casts-differing-anon.stderr +++ b/src/test/ui/casts-differing-anon.stderr @@ -1,4 +1,4 @@ -error[E0606]: casting `*mut impl std::fmt::Debug+?Sized` as `*mut impl std::fmt::Debug+?Sized` is invalid +error[E0606]: casting `*mut impl Debug+?Sized` as `*mut impl Debug+?Sized` is invalid --> $DIR/casts-differing-anon.rs:21:13 | LL | b_raw = f_raw as *mut _; diff --git a/src/test/ui/chalkify/generic_impls.stderr b/src/test/ui/chalkify/generic_impls.stderr index 4ac57a2f13f..a6f5d1a6085 100644 --- a/src/test/ui/chalkify/generic_impls.stderr +++ b/src/test/ui/chalkify/generic_impls.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `(std::option::Option, f32): Foo` is not satisfied +error[E0277]: the trait bound `(Option, f32): Foo` is not satisfied --> $DIR/generic_impls.rs:12:13 | LL | fn gimme() { } | --- required by this bound in `gimme` ... LL | gimme::<(Option, f32)>(); - | ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `(std::option::Option, f32)` + | ^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `(Option, f32)` | = help: the following implementations were found: <(T, u32) as Foo> diff --git a/src/test/ui/chalkify/impl_wf.stderr b/src/test/ui/chalkify/impl_wf.stderr index fb2e0fc1a61..4ca5ae472f2 100644 --- a/src/test/ui/chalkify/impl_wf.stderr +++ b/src/test/ui/chalkify/impl_wf.stderr @@ -7,7 +7,7 @@ LL | trait Foo: Sized { } LL | impl Foo for str { } | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:27:17 diff --git a/src/test/ui/check-static-values-constraints.stderr b/src/test/ui/check-static-values-constraints.stderr index b00affdca85..50c1b5088e7 100644 --- a/src/test/ui/check-static-values-constraints.stderr +++ b/src/test/ui/check-static-values-constraints.stderr @@ -105,7 +105,7 @@ error[E0507]: cannot move out of static item `x` LL | let y = { static x: Box = box 3; x }; | ^ | | - | move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `x` has type `Box`, which does not implement the `Copy` trait | help: consider borrowing here: `&x` error[E0010]: allocations are not allowed in statics diff --git a/src/test/ui/class-cast-to-trait.stderr b/src/test/ui/class-cast-to-trait.stderr index 0f932cda07f..56d10d88d8b 100644 --- a/src/test/ui/class-cast-to-trait.stderr +++ b/src/test/ui/class-cast-to-trait.stderr @@ -1,8 +1,8 @@ -error[E0599]: no method named `eat` found for struct `std::boxed::Box` in the current scope +error[E0599]: no method named `eat` found for struct `Box` in the current scope --> $DIR/class-cast-to-trait.rs:53:8 | LL | nyan.eat(); - | ^^^ method not found in `std::boxed::Box` + | ^^^ method not found in `Box` error: aborting due to previous error diff --git a/src/test/ui/closure-expected.rs b/src/test/ui/closure-expected.rs index 9b15a63da28..68cac3dd85e 100644 --- a/src/test/ui/closure-expected.rs +++ b/src/test/ui/closure-expected.rs @@ -1,5 +1,5 @@ fn main() { let x = Some(1); let y = x.or_else(4); - //~^ ERROR expected a `std::ops::FnOnce<()>` closure, found `{integer}` + //~^ ERROR expected a `FnOnce<()>` closure, found `{integer}` } diff --git a/src/test/ui/closure-expected.stderr b/src/test/ui/closure-expected.stderr index 687dd97ca6c..6c77d080967 100644 --- a/src/test/ui/closure-expected.stderr +++ b/src/test/ui/closure-expected.stderr @@ -1,10 +1,10 @@ -error[E0277]: expected a `std::ops::FnOnce<()>` closure, found `{integer}` +error[E0277]: expected a `FnOnce<()>` closure, found `{integer}` --> $DIR/closure-expected.rs:3:23 | LL | let y = x.or_else(4); | ^ expected an `FnOnce<()>` closure, found `{integer}` | - = help: the trait `std::ops::FnOnce<()>` is not implemented for `{integer}` + = help: the trait `FnOnce<()>` is not implemented for `{integer}` = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }` error: aborting due to previous error diff --git a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr index 273eae99553..48f18b1ebe9 100644 --- a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr +++ b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr @@ -9,8 +9,8 @@ LL | fn foo(blk: F) -> X where F: FnOnce() + 'static { | help: consider further restricting this bound | -LL | fn foo(blk: F) -> X where F: FnOnce() + 'static + std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn foo(blk: F) -> X where F: FnOnce() + 'static + Send { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/closures/closure-bounds-subtype.stderr b/src/test/ui/closures/closure-bounds-subtype.stderr index 7df29d5a098..d649eeccb8c 100644 --- a/src/test/ui/closures/closure-bounds-subtype.stderr +++ b/src/test/ui/closures/closure-bounds-subtype.stderr @@ -9,8 +9,8 @@ LL | take_const_owned(f); | help: consider further restricting this bound | -LL | fn give_owned(f: F) where F: FnOnce() + Send + std::marker::Sync { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn give_owned(f: F) where F: FnOnce() + Send + Sync { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/closures/closure-move-sync.rs b/src/test/ui/closures/closure-move-sync.rs index 580cd1af4f3..ea2d1434c4a 100644 --- a/src/test/ui/closures/closure-move-sync.rs +++ b/src/test/ui/closures/closure-move-sync.rs @@ -16,7 +16,7 @@ fn bar() { fn foo() { let (tx, _rx) = channel(); thread::spawn(|| tx.send(()).unwrap()); - //~^ ERROR `std::sync::mpsc::Sender<()>` cannot be shared between threads safely + //~^ ERROR `Sender<()>` cannot be shared between threads safely } fn main() {} diff --git a/src/test/ui/closures/closure-move-sync.stderr b/src/test/ui/closures/closure-move-sync.stderr index f4d08ea5b89..505cae981b0 100644 --- a/src/test/ui/closures/closure-move-sync.stderr +++ b/src/test/ui/closures/closure-move-sync.stderr @@ -7,26 +7,26 @@ LL | let t = thread::spawn(|| { ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL | LL | F: Send + 'static, - | ---- required by this bound in `std::thread::spawn` + | ---- required by this bound in `spawn` | - = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>` - = note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>` + = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>` + = note: required because of the requirements on the impl of `Send` for `&std::sync::mpsc::Receiver<()>` = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6:27: 9:6 recv:&std::sync::mpsc::Receiver<()>]` -error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely +error[E0277]: `Sender<()>` cannot be shared between threads safely --> $DIR/closure-move-sync.rs:18:5 | LL | thread::spawn(|| tx.send(()).unwrap()); - | ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely + | ^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely | ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL | LL | F: Send + 'static, - | ---- required by this bound in `std::thread::spawn` + | ---- required by this bound in `spawn` | - = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<()>` - = note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Sender<()>` - = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18:19: 18:42 tx:&std::sync::mpsc::Sender<()>]` + = help: the trait `Sync` is not implemented for `Sender<()>` + = note: required because of the requirements on the impl of `Send` for `&Sender<()>` + = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18:19: 18:42 tx:&Sender<()>]` error: aborting due to 2 previous errors diff --git a/src/test/ui/closures/issue-41366.stderr b/src/test/ui/closures/issue-41366.stderr index 9c4b7d529ef..df0495cdc46 100644 --- a/src/test/ui/closures/issue-41366.stderr +++ b/src/test/ui/closures/issue-41366.stderr @@ -7,7 +7,7 @@ LL | (&|_| ()) as &dyn for<'x> Fn(>::V); | | found signature of `fn(u16) -> _` | expected signature of `fn(>::V) -> _` | - = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(>::V)` + = note: required for the cast to the object type `dyn for<'x> Fn(>::V)` error: aborting due to previous error diff --git a/src/test/ui/codemap_tests/empty_span.stderr b/src/test/ui/codemap_tests/empty_span.stderr index 1dd99cfd64f..e36f59ee546 100644 --- a/src/test/ui/codemap_tests/empty_span.stderr +++ b/src/test/ui/codemap_tests/empty_span.stderr @@ -1,4 +1,4 @@ -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` +error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `&'static Foo` --> $DIR/empty_span.rs:7:5 | LL | unsafe impl Send for &'static Foo { } diff --git a/src/test/ui/codemap_tests/tab_3.stderr b/src/test/ui/codemap_tests/tab_3.stderr index f07959cdd87..958d54bbb15 100644 --- a/src/test/ui/codemap_tests/tab_3.stderr +++ b/src/test/ui/codemap_tests/tab_3.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `some_vec` --> $DIR/tab_3.rs:7:20 | LL | let some_vec = vec!["hi"]; - | -------- move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait + | -------- move occurs because `some_vec` has type `Vec<&str>`, which does not implement the `Copy` trait LL | some_vec.into_iter(); | ----------- `some_vec` moved due to this method call LL | { diff --git a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr index 93e16bac13b..f0109f22a2b 100644 --- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr +++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _ = box { [1, 2, 3] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]` | - = note: expected struct `std::boxed::Box<[i32]>` - found struct `std::boxed::Box<[i32; 3]>` + = note: expected struct `Box<[i32]>` + found struct `Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:10:13 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]` | - = note: expected struct `std::boxed::Box<[i32]>` - found struct `std::boxed::Box<[i32; 3]>` + = note: expected struct `Box<[i32]>` + found struct `Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:11:13 @@ -22,35 +22,35 @@ error[E0308]: mismatched types LL | let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]` | - = note: expected struct `std::boxed::Box<[i32]>` - found struct `std::boxed::Box<[i32; 3]>` + = note: expected struct `Box<[i32]>` + found struct `Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:13:13 | LL | let _ = box { |x| (x as u8) }: Box _>; - | ^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::ops::Fn`, found closure + | ^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn Fn`, found closure | - = note: expected struct `std::boxed::Box u8>` - found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>` + = note: expected struct `Box u8>` + found struct `Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:14:13 | LL | let _ = box if true { false } else { true }: Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::fmt::Debug`, found `bool` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn Debug`, found `bool` | - = note: expected struct `std::boxed::Box` - found struct `std::boxed::Box` + = note: expected struct `Box` + found struct `Box` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:15:13 | LL | let _ = box match true { true => 'a', false => 'b' }: Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::fmt::Debug`, found `char` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn Debug`, found `char` | - = note: expected struct `std::boxed::Box` - found struct `std::boxed::Box` + = note: expected struct `Box` + found struct `Box` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:17:13 @@ -83,27 +83,27 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:21:13 | LL | let _ = &{ |x| (x as u8) }: &dyn Fn(i32) -> _; - | ^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::ops::Fn`, found closure + | ^^^^^^^^^^^^^^^^^^ expected trait object `dyn Fn`, found closure | - = note: expected reference `&dyn std::ops::Fn(i32) -> u8` + = note: expected reference `&dyn Fn(i32) -> u8` found reference `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:22:13 | LL | let _ = &if true { false } else { true }: &dyn Debug; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::fmt::Debug`, found `bool` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn Debug`, found `bool` | - = note: expected reference `&dyn std::fmt::Debug` + = note: expected reference `&dyn Debug` found reference `&bool` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:23:13 | LL | let _ = &match true { true => 'a', false => 'b' }: &dyn Debug; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::fmt::Debug`, found `char` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn Debug`, found `char` | - = note: expected reference `&dyn std::fmt::Debug` + = note: expected reference `&dyn Debug` found reference `&char` error[E0308]: mismatched types @@ -112,17 +112,17 @@ error[E0308]: mismatched types LL | let _ = Box::new([1, 2, 3]): Box<[i32]>; | ^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]` | - = note: expected struct `std::boxed::Box<[i32]>` - found struct `std::boxed::Box<[i32; 3]>` + = note: expected struct `Box<[i32]>` + found struct `Box<[i32; 3]>` error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:26:13 | LL | let _ = Box::new(|x| (x as u8)): Box _>; - | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn std::ops::Fn`, found closure + | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait object `dyn Fn`, found closure | - = note: expected struct `std::boxed::Box u8>` - found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>` + = note: expected struct `Box u8>` + found struct `Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>` error: aborting due to 14 previous errors diff --git a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr index 91cf925e680..ca2b3d6d023 100644 --- a/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr +++ b/src/test/ui/coherence/coherence-blanket-conflicts-with-specific-cross-crate.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `go_trait::GoMut` for type `MyThingy`: +error[E0119]: conflicting implementations of trait `GoMut` for type `MyThingy`: --> $DIR/coherence-blanket-conflicts-with-specific-cross-crate.rs:15:1 | LL | impl GoMut for MyThingy { | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `go_trait`: - - impl go_trait::GoMut for G - where G: go_trait::Go; + - impl GoMut for G + where G: Go; error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr index 4d9f815c795..137acd70815 100644 --- a/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr +++ b/src/test/ui/coherence/coherence-conflicting-negative-trait-impl.stderr @@ -1,4 +1,4 @@ -error[E0751]: found both positive and negative implementation of trait `std::marker::Send` for type `TestType<_>`: +error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`: --> $DIR/coherence-conflicting-negative-trait-impl.rs:11:1 | LL | unsafe impl Send for TestType {} @@ -7,7 +7,7 @@ LL | LL | impl !Send for TestType {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here -error[E0119]: conflicting implementations of trait `std::marker::Send` for type `TestType<_>`: +error[E0119]: conflicting implementations of trait `Send` for type `TestType<_>`: --> $DIR/coherence-conflicting-negative-trait-impl.rs:13:1 | LL | unsafe impl Send for TestType {} diff --git a/src/test/ui/coherence/coherence-cow.re_a.stderr b/src/test/ui/coherence/coherence-cow.re_a.stderr index 06e77b2797d..0cf2a406da4 100644 --- a/src/test/ui/coherence/coherence-cow.re_a.stderr +++ b/src/test/ui/coherence/coherence-cow.re_a.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair> { } | ^^^^^^^^^^^^^^^^^^^---------------- | | | - | | `lib::Pair` is not defined in the current crate + | | `Pair` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-cow.re_b.stderr b/src/test/ui/coherence/coherence-cow.re_b.stderr index 39f211eff36..b523db4da23 100644 --- a/src/test/ui/coherence/coherence-cow.re_b.stderr +++ b/src/test/ui/coherence/coherence-cow.re_b.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair,T> { } | ^^^^^^^^^^^^^^^^^^^---------------- | | | - | | `lib::Pair` is not defined in the current crate + | | `Pair` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-cow.re_c.stderr b/src/test/ui/coherence/coherence-cow.re_c.stderr index 94bb0d2166c..bd635fc2e8c 100644 --- a/src/test/ui/coherence/coherence-cow.re_c.stderr +++ b/src/test/ui/coherence/coherence-cow.re_c.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair,U> { } | ^^^^^^^^^^^^^^^^^^^^^---------------- | | | - | | `lib::Pair` is not defined in the current crate + | | `Pair` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr index c00751a0f23..fb4190ea613 100644 --- a/src/test/ui/coherence/coherence-cross-crate-conflict.stderr +++ b/src/test/ui/coherence/coherence-cross-crate-conflict.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `trait_impl_conflict::Foo` for type `isize`: +error[E0119]: conflicting implementations of trait `Foo` for type `isize`: --> $DIR/coherence-cross-crate-conflict.rs:9:1 | LL | impl Foo for A { | ^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `trait_impl_conflict`: - - impl trait_impl_conflict::Foo for isize; + - impl Foo for isize; error[E0210]: type parameter `A` must be used as the type parameter for some local type (e.g., `MyStruct`) --> $DIR/coherence-cross-crate-conflict.rs:9:6 diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.stderr b/src/test/ui/coherence/coherence-fundamental-trait-objects.stderr index 06cfdeb3907..a35a95ef4bf 100644 --- a/src/test/ui/coherence/coherence-fundamental-trait-objects.stderr +++ b/src/test/ui/coherence/coherence-fundamental-trait-objects.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Misc for dyn Fundamental {} | ^^^^^^^^^^^^^^---------------------- | | | - | | `dyn coherence_fundamental_trait_lib::Fundamental` is not defined in the current crate + | | `dyn Fundamental` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr index 23db5328a72..c364c707ff9 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-negative.stderr @@ -21,13 +21,13 @@ LL | impl !Send for dyn Marker2 {} | = note: define and implement a trait or new type instead -error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` +error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:27:1 | LL | impl !Send for dyn Object {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type -error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` +error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-negative.rs:28:1 | LL | impl !Send for dyn Object + Marker2 {} diff --git a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr index 141ab7771f3..b80429794f9 100644 --- a/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr +++ b/src/test/ui/coherence/coherence-impl-trait-for-marker-trait-positive.stderr @@ -21,13 +21,13 @@ LL | unsafe impl Send for dyn Marker2 {} | = note: define and implement a trait or new type instead -error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` +error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:27:1 | LL | unsafe impl Send for dyn Object {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type -error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` +error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `(dyn Object + Marker2 + 'static)` --> $DIR/coherence-impl-trait-for-marker-trait-positive.rs:28:1 | LL | unsafe impl Send for dyn Object + Marker2 {} diff --git a/src/test/ui/coherence/coherence-impls-copy.stderr b/src/test/ui/coherence/coherence-impls-copy.stderr index be040b38d6b..6a8c70b746f 100644 --- a/src/test/ui/coherence/coherence-impls-copy.stderr +++ b/src/test/ui/coherence/coherence-impls-copy.stderr @@ -1,30 +1,30 @@ -error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`: +error[E0119]: conflicting implementations of trait `Copy` for type `i32`: --> $DIR/coherence-impls-copy.rs:5:1 | LL | impl Copy for i32 {} | ^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::marker::Copy for i32; + - impl Copy for i32; -error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`: +error[E0119]: conflicting implementations of trait `Copy` for type `&NotSync`: --> $DIR/coherence-impls-copy.rs:29:1 | LL | impl Copy for &'static NotSync {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::marker::Copy for &T + - impl Copy for &T where T: ?Sized; -error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`: +error[E0119]: conflicting implementations of trait `Copy` for type `&[NotSync]`: --> $DIR/coherence-impls-copy.rs:34:1 | LL | impl Copy for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::marker::Copy for &T + - impl Copy for &T where T: ?Sized; error[E0206]: the trait `Copy` may not be implemented for this type diff --git a/src/test/ui/coherence/coherence-impls-send.stderr b/src/test/ui/coherence/coherence-impls-send.stderr index dbfc968332c..efc41693676 100644 --- a/src/test/ui/coherence/coherence-impls-send.stderr +++ b/src/test/ui/coherence/coherence-impls-send.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `std::marker::Send` for type `&[NotSync]`: +error[E0119]: conflicting implementations of trait `Send` for type `&[NotSync]`: --> $DIR/coherence-impls-send.rs:25:1 | LL | unsafe impl Send for &'static [NotSync] {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::marker::Send for &T - where T: std::marker::Sync, T: ?Sized; + - impl Send for &T + where T: Sync, T: ?Sized; = note: upstream crates may add a new impl of trait `std::marker::Sync` for type `[NotSync]` in future versions error[E0117]: only traits defined in the current crate can be implemented for arbitrary types @@ -20,7 +20,7 @@ LL | unsafe impl Send for (MyType, MyType) {} | = note: define and implement a trait or new type instead -error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync` +error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `&'static NotSync` --> $DIR/coherence-impls-send.rs:19:1 | LL | unsafe impl Send for &'static NotSync {} diff --git a/src/test/ui/coherence/coherence-orphan.stderr b/src/test/ui/coherence/coherence-orphan.stderr index fb518f8ecba..52d2cc88cbe 100644 --- a/src/test/ui/coherence/coherence-orphan.stderr +++ b/src/test/ui/coherence/coherence-orphan.stderr @@ -16,7 +16,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl !Send for Vec { } | ^^^^^^^^^^^^^^^---------- | | | - | | `std::vec::Vec` is not defined in the current crate + | | `Vec` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-overlap-issue-23516.stderr b/src/test/ui/coherence/coherence-overlap-issue-23516.stderr index fe4c5cf3490..75678b11e79 100644 --- a/src/test/ui/coherence/coherence-overlap-issue-23516.stderr +++ b/src/test/ui/coherence/coherence-overlap-issue-23516.stderr @@ -1,10 +1,10 @@ -error[E0119]: conflicting implementations of trait `Sweet` for type `std::boxed::Box<_>`: +error[E0119]: conflicting implementations of trait `Sweet` for type `Box<_>`: --> $DIR/coherence-overlap-issue-23516.rs:8:1 | LL | impl Sweet for T { } | ------------------------- first implementation here LL | impl Sweet for Box { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::boxed::Box<_>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Box<_>` | = note: downstream crates may implement trait `Sugar` for type `std::boxed::Box<_>` diff --git a/src/test/ui/coherence/coherence-overlapping-pairs.stderr b/src/test/ui/coherence/coherence-overlapping-pairs.stderr index 69a4627a7b8..c1a02681c13 100644 --- a/src/test/ui/coherence/coherence-overlapping-pairs.stderr +++ b/src/test/ui/coherence/coherence-overlapping-pairs.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for lib::Pair { } | ^^^^^^^^^^^^^^^^^^^---------------- | | | - | | `lib::Pair` is not defined in the current crate + | | `Pair` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr index f6b9869e177..b18bf44dbdf 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered-1.stderr @@ -5,7 +5,7 @@ LL | impl Remote1>> for i32 { } | ^^^^^^^^^^^--------------------------^^^^^--- | | | | | | | `i32` is not defined in the current crate - | | `lib::Pair` is not defined in the current crate + | | `Pair` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr b/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr index d1a4993e0f2..34fdf64ea10 100644 --- a/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr +++ b/src/test/ui/coherence/coherence-pair-covered-uncovered.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Pair> { } | ^^^^^^^^^^^^^^^^^^^^^---------------- | | | - | | `lib::Pair` is not defined in the current crate + | | `Pair` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr b/src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr index c5c9b0ac33c..75c59a33000 100644 --- a/src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr +++ b/src/test/ui/coherence/coherence-projection-conflict-ty-param.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `Foo<_>` for type `std::option::Option<_>`: +error[E0119]: conflicting implementations of trait `Foo<_>` for type `Option<_>`: --> $DIR/coherence-projection-conflict-ty-param.rs:10:1 | LL | impl > Foo

for Option {} | ---------------------------------------- first implementation here LL | LL | impl Foo for Option { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::option::Option<_>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Option<_>` error: aborting due to previous error diff --git a/src/test/ui/coherence/coherence-vec-local-2.stderr b/src/test/ui/coherence/coherence-vec-local-2.stderr index 198314d5ce5..567b6a6c17f 100644 --- a/src/test/ui/coherence/coherence-vec-local-2.stderr +++ b/src/test/ui/coherence/coherence-vec-local-2.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Vec> { } | ^^^^^^^^^^^^^^^^^^^------------- | | | - | | `std::vec::Vec` is not defined in the current crate + | | `Vec` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-vec-local.stderr b/src/test/ui/coherence/coherence-vec-local.stderr index dc5a0a68959..38464f12a21 100644 --- a/src/test/ui/coherence/coherence-vec-local.stderr +++ b/src/test/ui/coherence/coherence-vec-local.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Vec { } | ^^^^^^^^^^^^^^^^---------- | | | - | | `std::vec::Vec` is not defined in the current crate + | | `Vec` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/coherence-wasm-bindgen.stderr b/src/test/ui/coherence/coherence-wasm-bindgen.stderr index c77483bb847..a0d745a7141 100644 --- a/src/test/ui/coherence/coherence-wasm-bindgen.stderr +++ b/src/test/ui/coherence/coherence-wasm-bindgen.stderr @@ -1,4 +1,4 @@ -error: conflicting implementations of trait `IntoWasmAbi` for type `&dyn std::ops::Fn(&_) -> _`: +error: conflicting implementations of trait `IntoWasmAbi` for type `&dyn Fn(&_) -> _`: --> $DIR/coherence-wasm-bindgen.rs:28:1 | LL | / impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(A) -> R + 'b) @@ -16,7 +16,7 @@ LL | | R: ReturnWasmAbi, ... | LL | | LL | | } - | |_^ conflicting implementation for `&dyn std::ops::Fn(&_) -> _` + | |_^ conflicting implementation for `&dyn Fn(&_) -> _` | note: the lint level is defined here --> $DIR/coherence-wasm-bindgen.rs:10:9 diff --git a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr index cf6c6fb8c7a..b6d08e498d1 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyFundamentalStruct<(MyType,)>`: +error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFundamentalStruct<(MyType,)>`: --> $DIR/coherence_copy_like_err_fundamental_struct_tuple.rs:16:1 | LL | impl MyTrait for T { } | ---------------------------------- first implementation here ... LL | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyFundamentalStruct<(MyType,)>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFundamentalStruct<(MyType,)>` | = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyFundamentalStruct<(MyType,)>` in future versions diff --git a/src/test/ui/coherence/coherence_copy_like_err_struct.stderr b/src/test/ui/coherence/coherence_copy_like_err_struct.stderr index cf79e851bf4..b624de05a81 100644 --- a/src/test/ui/coherence/coherence_copy_like_err_struct.stderr +++ b/src/test/ui/coherence/coherence_copy_like_err_struct.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `lib::MyStruct`: +error[E0119]: conflicting implementations of trait `MyTrait` for type `MyStruct`: --> $DIR/coherence_copy_like_err_struct.rs:19:1 | LL | impl MyTrait for T { } | ---------------------------------- first implementation here ... LL | impl MyTrait for lib::MyStruct { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `lib::MyStruct` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyStruct` | = note: upstream crates may add a new impl of trait `lib::MyCopy` for type `lib::MyStruct` in future versions diff --git a/src/test/ui/coherence/coherence_inherent.stderr b/src/test/ui/coherence/coherence_inherent.stderr index 3d37d8af31d..6f36f2a7510 100644 --- a/src/test/ui/coherence/coherence_inherent.stderr +++ b/src/test/ui/coherence/coherence_inherent.stderr @@ -1,8 +1,8 @@ -error[E0599]: no method named `the_fn` found for reference `&Lib::TheStruct` in the current scope +error[E0599]: no method named `the_fn` found for reference `&TheStruct` in the current scope --> $DIR/coherence_inherent.rs:31:11 | LL | s.the_fn(); - | ^^^^^^ method not found in `&Lib::TheStruct` + | ^^^^^^ method not found in `&TheStruct` | = help: items from traits can only be used if the trait is in scope = note: the following trait is implemented but not in scope; perhaps add a `use` for it: diff --git a/src/test/ui/coherence/coherence_inherent_cc.stderr b/src/test/ui/coherence/coherence_inherent_cc.stderr index d968c8b4680..edfe6348d17 100644 --- a/src/test/ui/coherence/coherence_inherent_cc.stderr +++ b/src/test/ui/coherence/coherence_inherent_cc.stderr @@ -1,8 +1,8 @@ -error[E0599]: no method named `the_fn` found for reference `&coherence_inherent_cc_lib::TheStruct` in the current scope +error[E0599]: no method named `the_fn` found for reference `&TheStruct` in the current scope --> $DIR/coherence_inherent_cc.rs:23:11 | LL | s.the_fn(); - | ^^^^^^ method not found in `&coherence_inherent_cc_lib::TheStruct` + | ^^^^^^ method not found in `&TheStruct` | = help: items from traits can only be used if the trait is in scope = note: the following trait is implemented but not in scope; perhaps add a `use` for it: diff --git a/src/test/ui/coherence/coherence_local_err_struct.stderr b/src/test/ui/coherence/coherence_local_err_struct.stderr index 0a1aee9b5c1..8c310b318a7 100644 --- a/src/test/ui/coherence/coherence_local_err_struct.stderr +++ b/src/test/ui/coherence/coherence_local_err_struct.stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl lib::MyCopy for lib::MyStruct { } | ^^^^^^^^^^^^^^^^^^^^^--------------------- | | | - | | `lib::MyStruct` is not defined in the current crate + | | `MyStruct` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr b/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr index a33cff2a4d4..bdf19cf00a7 100644 --- a/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr +++ b/src/test/ui/coherence/impl-foreign-for-foreign[foreign].stderr @@ -5,7 +5,7 @@ LL | impl Remote1> for i32 { | ^^^^^----------------^^^^^--- | | | | | | | `i32` is not defined in the current crate - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead @@ -17,7 +17,7 @@ LL | impl Remote1> for f64 { | ^^^^^------------------^^^^^--- | | | | | | | `f64` is not defined in the current crate - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead @@ -29,7 +29,7 @@ LL | impl Remote1> for f32 { | ^^^^^^^^--------------^^^^^--- | | | | | | | `f32` is not defined in the current crate - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr b/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr index bd1a933b766..0959e155c57 100644 --- a/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr +++ b/src/test/ui/coherence/impl-foreign-for-fundamental[foreign].stderr @@ -15,7 +15,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Box> { | ^^^^^^^^^^^^^^^^^^^---------- | | | - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr b/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr index 3ca40e00729..b4d559eb1f2 100644 --- a/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr +++ b/src/test/ui/coherence/impl-foreign[fundemental[foreign]]-for-foreign.stderr @@ -5,7 +5,7 @@ LL | impl Remote1> for i32 { | ^^^^^--------------------^^^^^--- | | | | | | | `i32` is not defined in the current crate - | | `std::string::String` is not defined in the current crate + | | `String` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead @@ -17,7 +17,7 @@ LL | impl Remote1>> for f64 { | ^^^^^---------------------^^^^^--- | | | | | | | `f64` is not defined in the current crate - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead @@ -29,7 +29,7 @@ LL | impl Remote1>> for f32 { | ^^^^^^^^-------------------^^^^^--- | | | | | | | `f32` is not defined in the current crate - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr b/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr index 95889022bd7..7f8ec83b24a 100644 --- a/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr +++ b/src/test/ui/coherence/impl[t]-foreign-for-foreign[t].stderr @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Rc { | ^^^^^^^^^^^^^^^^--------- | | | - | | `std::rc::Rc` is not defined in the current crate + | | `Rc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead @@ -15,7 +15,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl Remote for Arc { | ^^^^^^^^^^^^^^^^^^^------ | | | - | | `std::sync::Arc` is not defined in the current crate + | | `Arc` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr index 5d09038076f..83a2ae60681 100644 --- a/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr +++ b/src/test/ui/compare-method/trait-bound-on-type-parameter.stderr @@ -5,7 +5,7 @@ LL | fn b(&self, x: C) -> C; | ---------------------------- definition of `b` from trait ... LL | fn b(&self, _x: F) -> F { panic!() } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `F: std::marker::Sync` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `F: Sync` error: aborting due to previous error diff --git a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr index 717c0d2315e..da94fc65841 100644 --- a/src/test/ui/compare-method/traits-misc-mismatch-1.stderr +++ b/src/test/ui/compare-method/traits-misc-mismatch-1.stderr @@ -5,7 +5,7 @@ LL | fn test_error1_fn(&self); | -------------------------------- definition of `test_error1_fn` from trait ... LL | fn test_error1_fn(&self) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::cmp::Ord` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Ord` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:31:5 @@ -41,7 +41,7 @@ LL | fn test_error7_fn(&self); | ------------------------------- definition of `test_error7_fn` from trait ... LL | fn test_error7_fn(&self) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::cmp::Eq` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Eq` error[E0276]: impl has stricter requirements than trait --> $DIR/traits-misc-mismatch-1.rs:54:5 diff --git a/src/test/ui/confuse-field-and-method/issue-2392.stderr b/src/test/ui/confuse-field-and-method/issue-2392.stderr index f9dfdddad9d..051940bbe96 100644 --- a/src/test/ui/confuse-field-and-method/issue-2392.stderr +++ b/src/test/ui/confuse-field-and-method/issue-2392.stderr @@ -90,7 +90,7 @@ LL | w.wrap.not_closure(); | | | field, not a method -error[E0599]: no method named `closure` found for struct `Obj u32 + 'static)>>` in the current scope +error[E0599]: no method named `closure` found for struct `Obj u32 + 'static)>>` in the current scope --> $DIR/issue-2392.rs:58:24 | LL | struct Obj where F: FnOnce() -> u32 { diff --git a/src/test/ui/confuse-field-and-method/private-field.stderr b/src/test/ui/confuse-field-and-method/private-field.stderr index 82cb235d47a..fd98a864742 100644 --- a/src/test/ui/confuse-field-and-method/private-field.stderr +++ b/src/test/ui/confuse-field-and-method/private-field.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `dog_age` found for struct `animal::Dog` in the current scope +error[E0599]: no method named `dog_age` found for struct `Dog` in the current scope --> $DIR/private-field.rs:16:23 | LL | pub struct Dog { diff --git a/src/test/ui/conservative_impl_trait.stderr b/src/test/ui/conservative_impl_trait.stderr index 58223d9d3bf..87058c3c29c 100644 --- a/src/test/ui/conservative_impl_trait.stderr +++ b/src/test/ui/conservative_impl_trait.stderr @@ -4,7 +4,7 @@ error[E0277]: `()` is not an iterator LL | fn will_ice(something: &u32) -> impl Iterator { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` = note: the return type of a function must have a statically known size error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr index ba99c87722c..f860788e778 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr @@ -10,7 +10,7 @@ error[E0392]: parameter `T` is never used LL | pub struct Dependent([(); X]); | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr index ba99c87722c..f860788e778 100644 --- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr +++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.min.stderr @@ -10,7 +10,7 @@ error[E0392]: parameter `T` is never used LL | pub struct Dependent([(); X]); | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/const-generics/issues/issue-61336-2.full.stderr b/src/test/ui/const-generics/issues/issue-61336-2.full.stderr index d21cd9df054..ef6e60084a5 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-2.full.stderr @@ -7,17 +7,17 @@ LL | #![cfg_attr(full, feature(const_generics))] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-61336-2.rs:10:5 | LL | [x; { N }] - | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^ the trait `Copy` is not implemented for `T` | = note: the `Copy` trait is required because the repeated element will be copied help: consider restricting type parameter `T` | -LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(x: T) -> [T; N] { + | ^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61336-2.min.stderr b/src/test/ui/const-generics/issues/issue-61336-2.min.stderr index 29ab7b1305e..40863a4f718 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61336-2.min.stderr @@ -1,14 +1,14 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-61336-2.rs:10:5 | LL | [x; { N }] - | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^ the trait `Copy` is not implemented for `T` | = note: the `Copy` trait is required because the repeated element will be copied help: consider restricting type parameter `T` | -LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(x: T) -> [T; N] { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-generics/issues/issue-61336-2.rs b/src/test/ui/const-generics/issues/issue-61336-2.rs index 25b9271105e..44995157cc9 100644 --- a/src/test/ui/const-generics/issues/issue-61336-2.rs +++ b/src/test/ui/const-generics/issues/issue-61336-2.rs @@ -8,7 +8,7 @@ fn f(x: T) -> [T; N] { fn g(x: T) -> [T; N] { [x; { N }] - //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `T: Copy` is not satisfied } fn main() { diff --git a/src/test/ui/const-generics/issues/issue-61336.full.stderr b/src/test/ui/const-generics/issues/issue-61336.full.stderr index d1b5d5eb941..bdfdffd941d 100644 --- a/src/test/ui/const-generics/issues/issue-61336.full.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.full.stderr @@ -7,17 +7,17 @@ LL | #![cfg_attr(full, feature(const_generics))] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-61336.rs:10:5 | LL | [x; N] - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^ the trait `Copy` is not implemented for `T` | = note: the `Copy` trait is required because the repeated element will be copied help: consider restricting type parameter `T` | -LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(x: T) -> [T; N] { + | ^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/const-generics/issues/issue-61336.min.stderr b/src/test/ui/const-generics/issues/issue-61336.min.stderr index bced8bbd82f..6c57f9ccbf5 100644 --- a/src/test/ui/const-generics/issues/issue-61336.min.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.min.stderr @@ -1,14 +1,14 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-61336.rs:10:5 | LL | [x; N] - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^ the trait `Copy` is not implemented for `T` | = note: the `Copy` trait is required because the repeated element will be copied help: consider restricting type parameter `T` | -LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(x: T) -> [T; N] { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/const-generics/issues/issue-61336.rs b/src/test/ui/const-generics/issues/issue-61336.rs index fb55542a1c9..7c34250e6b2 100644 --- a/src/test/ui/const-generics/issues/issue-61336.rs +++ b/src/test/ui/const-generics/issues/issue-61336.rs @@ -8,7 +8,7 @@ fn f(x: T) -> [T; N] { fn g(x: T) -> [T; N] { [x; N] - //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `T: Copy` is not satisfied } fn main() { diff --git a/src/test/ui/const-generics/issues/issue-61336.stderr b/src/test/ui/const-generics/issues/issue-61336.stderr index 0eee37df3dd..1be907b98ac 100644 --- a/src/test/ui/const-generics/issues/issue-61336.stderr +++ b/src/test/ui/const-generics/issues/issue-61336.stderr @@ -7,17 +7,17 @@ LL | #![feature(const_generics)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-61336.rs:9:5 | LL | [x; N] - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^ the trait `Copy` is not implemented for `T` | = note: the `Copy` trait is required because the repeated element will be copied help: consider restricting type parameter `T` | -LL | fn g(x: T) -> [T; N] { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(x: T) -> [T; N] { + | ^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/const-generics/std/const-generics-range.min.stderr b/src/test/ui/const-generics/std/const-generics-range.min.stderr index a71e7442021..97be6ee6445 100644 --- a/src/test/ui/const-generics/std/const-generics-range.min.stderr +++ b/src/test/ui/const-generics/std/const-generics-range.min.stderr @@ -7,7 +7,7 @@ LL | struct _Range>; = note: the only supported types are integers, `bool` and `char` = note: more complex types are supported with `#[feature(const_generics)]` -error: `std::ops::RangeFrom` is forbidden as the type of a const generic parameter +error: `RangeFrom` is forbidden as the type of a const generic parameter --> $DIR/const-generics-range.rs:13:28 | LL | struct _RangeFrom>; @@ -16,7 +16,7 @@ LL | struct _RangeFrom>; = note: the only supported types are integers, `bool` and `char` = note: more complex types are supported with `#[feature(const_generics)]` -error: `std::ops::RangeFull` is forbidden as the type of a const generic parameter +error: `RangeFull` is forbidden as the type of a const generic parameter --> $DIR/const-generics-range.rs:18:28 | LL | struct _RangeFull; @@ -25,7 +25,7 @@ LL | struct _RangeFull; = note: the only supported types are integers, `bool` and `char` = note: more complex types are supported with `#[feature(const_generics)]` -error: `std::ops::RangeInclusive` is forbidden as the type of a const generic parameter +error: `RangeInclusive` is forbidden as the type of a const generic parameter --> $DIR/const-generics-range.rs:24:33 | LL | struct _RangeInclusive>; @@ -34,7 +34,7 @@ LL | struct _RangeInclusive>; = note: the only supported types are integers, `bool` and `char` = note: more complex types are supported with `#[feature(const_generics)]` -error: `std::ops::RangeTo` is forbidden as the type of a const generic parameter +error: `RangeTo` is forbidden as the type of a const generic parameter --> $DIR/const-generics-range.rs:29:26 | LL | struct _RangeTo>; @@ -43,7 +43,7 @@ LL | struct _RangeTo>; = note: the only supported types are integers, `bool` and `char` = note: more complex types are supported with `#[feature(const_generics)]` -error: `std::ops::RangeToInclusive` is forbidden as the type of a const generic parameter +error: `RangeToInclusive` is forbidden as the type of a const generic parameter --> $DIR/const-generics-range.rs:34:35 | LL | struct _RangeToInclusive>; diff --git a/src/test/ui/const-generics/std/const-generics-range.rs b/src/test/ui/const-generics/std/const-generics-range.rs index c04f4a3acfb..136ac352890 100644 --- a/src/test/ui/const-generics/std/const-generics-range.rs +++ b/src/test/ui/const-generics/std/const-generics-range.rs @@ -11,28 +11,28 @@ const RANGE : _Range<{ 0 .. 1000 }> = _Range; // `RangeFrom` should be usable within const generics: struct _RangeFrom>; -//[min]~^ ERROR `std::ops::RangeFrom` is forbidden +//[min]~^ ERROR `RangeFrom` is forbidden const RANGE_FROM : _RangeFrom<{ 0 .. }> = _RangeFrom; // `RangeFull` should be usable within const generics: struct _RangeFull; -//[min]~^ ERROR `std::ops::RangeFull` is forbidden +//[min]~^ ERROR `RangeFull` is forbidden const RANGE_FULL : _RangeFull<{ .. }> = _RangeFull; // Regression test for #70155 // `RangeInclusive` should be usable within const generics: struct _RangeInclusive>; -//[min]~^ ERROR `std::ops::RangeInclusive` is forbidden +//[min]~^ ERROR `RangeInclusive` is forbidden const RANGE_INCLUSIVE : _RangeInclusive<{ 0 ..= 999 }> = _RangeInclusive; // `RangeTo` should be usable within const generics: struct _RangeTo>; -//[min]~^ ERROR `std::ops::RangeTo` is forbidden +//[min]~^ ERROR `RangeTo` is forbidden const RANGE_TO : _RangeTo<{ .. 1000 }> = _RangeTo; // `RangeToInclusive` should be usable within const generics: struct _RangeToInclusive>; -//[min]~^ ERROR `std::ops::RangeToInclusive` is forbidden +//[min]~^ ERROR `RangeToInclusive` is forbidden const RANGE_TO_INCLUSIVE : _RangeToInclusive<{ ..= 999 }> = _RangeToInclusive; pub fn main() {} diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr index 3da34fe9af7..2696d5a0b32 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr @@ -10,7 +10,7 @@ error[E0277]: cannot add `u8` to `i8` LL | = [0; (i8::MAX + 1u8) as usize]; | ^ no implementation for `i8 + u8` | - = help: the trait `std::ops::Add` is not implemented for `i8` + = help: the trait `Add` is not implemented for `i8` error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr index e4d256c0ad1..e695e9f75fe 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr @@ -10,7 +10,7 @@ error[E0277]: cannot add `u8` to `i8` LL | : [u32; (i8::MAX as i8 + 1u8) as usize] | ^ no implementation for `i8 + u8` | - = help: the trait `std::ops::Add` is not implemented for `i8` + = help: the trait `Add` is not implemented for `i8` error[E0604]: only `u8` can be cast as `char`, not `i8` --> $DIR/const-eval-overflow-4b.rs:25:13 diff --git a/src/test/ui/consts/const-unsized.stderr b/src/test/ui/consts/const-unsized.stderr index bf2844cfb70..27b200648eb 100644 --- a/src/test/ui/consts/const-unsized.stderr +++ b/src/test/ui/consts/const-unsized.stderr @@ -1,10 +1,10 @@ -error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time --> $DIR/const-unsized.rs:3:16 | LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync)); | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/const-unsized.rs:6:18 @@ -12,15 +12,15 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | const CONST_FOO: str = *"foo"; | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` -error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time --> $DIR/const-unsized.rs:9:18 | LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync)); | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/const-unsized.rs:12:20 @@ -28,7 +28,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | static STATIC_BAR: str = *"bar"; | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` error: aborting due to 4 previous errors diff --git a/src/test/ui/consts/const-unwrap.stderr b/src/test/ui/consts/const-unwrap.stderr index 7f2c1f41510..6500baab077 100644 --- a/src/test/ui/consts/const-unwrap.stderr +++ b/src/test/ui/consts/const-unwrap.stderr @@ -5,7 +5,7 @@ LL | None => panic!("called `Option::unwrap()` on a `None` value"), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | the evaluated program panicked at 'called `Option::unwrap()` on a `None` value', $DIR/const-unwrap.rs:9:38 - | inside `std::option::Option::::unwrap` at $SRC_DIR/core/src/macros/mod.rs:LL:COL + | inside `Option::::unwrap` at $SRC_DIR/core/src/macros/mod.rs:LL:COL | inside `BAR` at $DIR/const-unwrap.rs:9:18 | ::: $DIR/const-unwrap.rs:9:1 diff --git a/src/test/ui/consts/const_in_pattern/cross-crate-fail.stderr b/src/test/ui/consts/const_in_pattern/cross-crate-fail.stderr index 5d147e32f5a..95db19e342a 100644 --- a/src/test/ui/consts/const_in_pattern/cross-crate-fail.stderr +++ b/src/test/ui/consts/const_in_pattern/cross-crate-fail.stderr @@ -1,22 +1,22 @@ -error: to use a constant of type `consts::CustomEq` in a pattern, `consts::CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` +error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/cross-crate-fail.rs:13:9 | LL | consts::SOME => panic!(), | ^^^^^^^^^^^^ -error: to use a constant of type `consts::CustomEq` in a pattern, `consts::CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` +error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/cross-crate-fail.rs:21:9 | LL | ::SOME => panic!(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: to use a constant of type `consts::CustomEq` in a pattern, `consts::CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` +error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/cross-crate-fail.rs:13:9 | LL | consts::SOME => panic!(), | ^^^^^^^^^^^^ -error: to use a constant of type `consts::CustomEq` in a pattern, `consts::CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` +error: to use a constant of type `CustomEq` in a pattern, `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/cross-crate-fail.rs:21:9 | LL | ::SOME => panic!(), diff --git a/src/test/ui/consts/const_unsafe_unreachable_ub.stderr b/src/test/ui/consts/const_unsafe_unreachable_ub.stderr index 85b38f41c5c..31090be0908 100644 --- a/src/test/ui/consts/const_unsafe_unreachable_ub.stderr +++ b/src/test/ui/consts/const_unsafe_unreachable_ub.stderr @@ -5,7 +5,7 @@ LL | unsafe { intrinsics::unreachable() } | ^^^^^^^^^^^^^^^^^^^^^^^^^ | | | entering unreachable code - | inside `std::hint::unreachable_unchecked` at $SRC_DIR/core/src/hint.rs:LL:COL + | inside `unreachable_unchecked` at $SRC_DIR/core/src/hint.rs:LL:COL | inside `foo` at $DIR/const_unsafe_unreachable_ub.rs:9:18 | inside `BAR` at $DIR/const_unsafe_unreachable_ub.rs:14:28 | diff --git a/src/test/ui/consts/miri_unleashed/drop.rs b/src/test/ui/consts/miri_unleashed/drop.rs index 9bd56e81cbf..4afa954d901 100644 --- a/src/test/ui/consts/miri_unleashed/drop.rs +++ b/src/test/ui/consts/miri_unleashed/drop.rs @@ -1,5 +1,5 @@ // compile-flags: -Zunleash-the-miri-inside-of-you -// error-pattern: calling non-const function ` as std::ops::Drop>::drop` +// error-pattern: calling non-const function ` as Drop>::drop` #![allow(const_err)] use std::mem::ManuallyDrop; diff --git a/src/test/ui/consts/miri_unleashed/drop.stderr b/src/test/ui/consts/miri_unleashed/drop.stderr index c1ab52435e5..8236250392f 100644 --- a/src/test/ui/consts/miri_unleashed/drop.stderr +++ b/src/test/ui/consts/miri_unleashed/drop.stderr @@ -10,8 +10,8 @@ LL | | unsafe { drop_in_place(to_drop) } LL | | } | | ^ | | | - | |_calling non-const function ` as std::ops::Drop>::drop` - | inside `std::intrinsics::drop_in_place::> - shim(Some(std::vec::Vec))` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL + | |_calling non-const function ` as Drop>::drop` + | inside `drop_in_place::> - shim(Some(Vec))` at $SRC_DIR/core/src/ptr/mod.rs:LL:COL | ::: $DIR/drop.rs:18:1 | diff --git a/src/test/ui/consts/offset_from_ub.stderr b/src/test/ui/consts/offset_from_ub.stderr index a89dcefd839..ebe17e87304 100644 --- a/src/test/ui/consts/offset_from_ub.stderr +++ b/src/test/ui/consts/offset_from_ub.stderr @@ -5,7 +5,7 @@ LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | ptr_offset_from cannot compute offset of pointers into different allocations. - | inside `std::ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `DIFFERENT_ALLOC` at $DIR/offset_from_ub.rs:16:27 | ::: $DIR/offset_from_ub.rs:10:1 @@ -28,7 +28,7 @@ LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unable to turn bytes into a pointer - | inside `std::ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `NOT_PTR` at $DIR/offset_from_ub.rs:22:14 | ::: $DIR/offset_from_ub.rs:20:1 @@ -46,7 +46,7 @@ LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | exact_div: 1_isize cannot be divided by 2_isize without remainder - | inside `std::ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `NOT_MULTIPLE_OF_SIZE` at $DIR/offset_from_ub.rs:30:14 | ::: $DIR/offset_from_ub.rs:25:1 @@ -67,7 +67,7 @@ LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | inbounds test failed: 0x0 is not a valid pointer - | inside `std::ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `OFFSET_FROM_NULL` at $DIR/offset_from_ub.rs:36:14 | ::: $DIR/offset_from_ub.rs:33:1 @@ -86,7 +86,7 @@ LL | unsafe { intrinsics::ptr_offset_from(self, origin) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unable to turn bytes into a pointer - | inside `std::ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset_from` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `DIFFERENT_INT` at $DIR/offset_from_ub.rs:43:14 | ::: $DIR/offset_from_ub.rs:39:1 diff --git a/src/test/ui/consts/offset_ub.stderr b/src/test/ui/consts/offset_ub.stderr index 6245354590a..e58db1efaf0 100644 --- a/src/test/ui/consts/offset_ub.stderr +++ b/src/test/ui/consts/offset_ub.stderr @@ -5,7 +5,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | overflowing in-bounds pointer arithmetic - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `BEFORE_START` at $DIR/offset_ub.rs:7:46 | ::: $DIR/offset_ub.rs:7:1 @@ -22,7 +22,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | inbounds test failed: pointer must be in-bounds at offset 2, but is outside bounds of allocN which has size 1 - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `AFTER_END` at $DIR/offset_ub.rs:8:43 | ::: $DIR/offset_ub.rs:8:1 @@ -37,7 +37,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | inbounds test failed: pointer must be in-bounds at offset 101, but is outside bounds of allocN which has size 100 - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `AFTER_ARRAY` at $DIR/offset_ub.rs:9:45 | ::: $DIR/offset_ub.rs:9:1 @@ -52,7 +52,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | overflowing in-bounds pointer arithmetic - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `OVERFLOW` at $DIR/offset_ub.rs:11:43 | ::: $DIR/offset_ub.rs:11:1 @@ -67,7 +67,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | overflowing in-bounds pointer arithmetic - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `UNDERFLOW` at $DIR/offset_ub.rs:12:44 | ::: $DIR/offset_ub.rs:12:1 @@ -82,7 +82,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | overflowing in-bounds pointer arithmetic - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `OVERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:13:56 | ::: $DIR/offset_ub.rs:13:1 @@ -97,7 +97,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | overflowing in-bounds pointer arithmetic - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `UNDERFLOW_ADDRESS_SPACE` at $DIR/offset_ub.rs:14:57 | ::: $DIR/offset_ub.rs:14:1 @@ -112,7 +112,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | inbounds test failed: pointer must be in-bounds at offset 1, but is outside bounds of allocN which has size 0 - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `ZERO_SIZED_ALLOC` at $DIR/offset_ub.rs:16:50 | ::: $DIR/offset_ub.rs:16:1 @@ -127,7 +127,7 @@ LL | unsafe { intrinsics::offset(self, count) as *mut T } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unable to turn bytes into a pointer - | inside `std::ptr::mut_ptr::::offset` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL + | inside `ptr::mut_ptr::::offset` at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL | inside `DANGLING` at $DIR/offset_ub.rs:17:42 | ::: $DIR/offset_ub.rs:17:1 @@ -142,7 +142,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | inbounds test failed: 0x0 is not a valid pointer - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `NULL_OFFSET_ZERO` at $DIR/offset_ub.rs:20:50 | ::: $DIR/offset_ub.rs:20:1 @@ -157,7 +157,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | unable to turn bytes into a pointer - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `UNDERFLOW_ABS` at $DIR/offset_ub.rs:23:47 | ::: $DIR/offset_ub.rs:23:1 diff --git a/src/test/ui/consts/ptr_comparisons.stderr b/src/test/ui/consts/ptr_comparisons.stderr index 493d9be8f71..63faae275df 100644 --- a/src/test/ui/consts/ptr_comparisons.stderr +++ b/src/test/ui/consts/ptr_comparisons.stderr @@ -5,7 +5,7 @@ LL | unsafe { intrinsics::offset(self, count) } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | inbounds test failed: pointer must be in-bounds at offset $TWO_WORDS, but is outside bounds of alloc2 which has size $WORD - | inside `std::ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL + | inside `ptr::const_ptr::::offset` at $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL | inside `_` at $DIR/ptr_comparisons.rs:62:34 | ::: $DIR/ptr_comparisons.rs:62:1 diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.rs b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.rs index 38f744e99aa..d40facf232a 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.rs +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.rs @@ -14,5 +14,5 @@ const fn copy() -> u32 { fn main() { let _: [u32; 2] = [copy(); 2]; let _: [Option; 2] = [no_copy(); 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `Option: Copy` is not satisfied } diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.stderr b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.stderr index 8219d836a20..48092432bb1 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.stderr +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/fn-call-in-non-const.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Option: Copy` is not satisfied --> $DIR/fn-call-in-non-const.rs:16:31 | LL | let _: [Option; 2] = [no_copy(); 2]; - | ^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied error: aborting due to previous error diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.rs b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.rs index 3b7d7e5b51a..d04b0b7e168 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.rs +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // ignore-compare-mode-nll // compile-flags: -Z borrowck=migrate #![feature(const_in_array_repeat_expressions)] @@ -13,13 +12,13 @@ mod non_constants { fn no_impl_copy_empty_value_multiple_elements() { let x = None; let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Option: Copy` is not satisfied [E0277] } fn no_impl_copy_value_multiple_elements() { let x = Some(Bar); let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Option: Copy` is not satisfied [E0277] } } diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.stderr b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.stderr index aad6763f150..476d48fd496 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.stderr +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/migrate-fail.stderr @@ -1,21 +1,21 @@ -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied - --> $DIR/migrate-fail.rs:15:37 +error[E0277]: the trait bound `Option: Copy` is not satisfied + --> $DIR/migrate-fail.rs:14:37 | LL | let arr: [Option; 2] = [x; 2]; - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied - --> $DIR/migrate-fail.rs:21:37 +error[E0277]: the trait bound `Option: Copy` is not satisfied + --> $DIR/migrate-fail.rs:20:37 | LL | let arr: [Option; 2] = [x; 2]; - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.rs b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.rs index dc1193a2fe8..2d5c59d112e 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.rs +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength // ignore-compare-mode-nll #![feature(const_in_array_repeat_expressions, nll)] #![allow(warnings)] @@ -12,13 +11,13 @@ mod non_constants { fn no_impl_copy_empty_value_multiple_elements() { let x = None; let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Option: Copy` is not satisfied [E0277] } fn no_impl_copy_value_multiple_elements() { let x = Some(Bar); let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Option: Copy` is not satisfied [E0277] } } diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.stderr b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.stderr index fd32484ff92..3aa69996ff7 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.stderr +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/nll-fail.stderr @@ -1,21 +1,21 @@ -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied - --> $DIR/nll-fail.rs:14:37 +error[E0277]: the trait bound `Option: Copy` is not satisfied + --> $DIR/nll-fail.rs:13:37 | LL | let arr: [Option; 2] = [x; 2]; - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied - --> $DIR/nll-fail.rs:20:37 +error[E0277]: the trait bound `Option: Copy` is not satisfied + --> $DIR/nll-fail.rs:19:37 | LL | let arr: [Option; 2] = [x; 2]; - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied error: aborting due to 2 previous errors diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.rs b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.rs index 35484d265bb..f8df7aafa60 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.rs +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![feature(const_in_array_repeat_expressions)] #[derive(Copy, Clone)] @@ -6,5 +5,5 @@ struct Foo(T); fn main() { [Foo(String::new()); 4]; - //~^ ERROR the trait bound `Foo: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Foo: Copy` is not satisfied [E0277] } diff --git a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.stderr b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.stderr index 186909e469e..26de67e50fa 100644 --- a/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.stderr +++ b/src/test/ui/consts/rfc-2203-const-array-repeat-exprs/trait-error.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `Foo: std::marker::Copy` is not satisfied - --> $DIR/trait-error.rs:8:5 +error[E0277]: the trait bound `Foo: Copy` is not satisfied + --> $DIR/trait-error.rs:7:5 | LL | [Foo(String::new()); 4]; - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `Foo` + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Foo` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied error: aborting due to previous error diff --git a/src/test/ui/consts/too_generic_eval_ice.stderr b/src/test/ui/consts/too_generic_eval_ice.stderr index d5816fbb8e4..ac104ed4a5a 100644 --- a/src/test/ui/consts/too_generic_eval_ice.stderr +++ b/src/test/ui/consts/too_generic_eval_ice.stderr @@ -20,7 +20,7 @@ error[E0277]: can't compare `[{integer}; _]` with `[{integer}; 0]` LL | [5; Self::HOST_SIZE] == [6; 0] | ^^ no implementation for `[{integer}; _] == [{integer}; 0]` | - = help: the trait `std::cmp::PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; _]` + = help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; _]` error: aborting due to 3 previous errors diff --git a/src/test/ui/conversion-methods.stderr b/src/test/ui/conversion-methods.stderr index b3621a27acb..4f47e1fd0ff 100644 --- a/src/test/ui/conversion-methods.stderr +++ b/src/test/ui/conversion-methods.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; | ------ ^^^^^^^^^^^^^^^^^^^^^ | | | - | | expected struct `std::string::String`, found `&str` + | | expected struct `String`, found `&str` | | help: try using a conversion method: `"'Tis a fond Ambush—".to_string()` | expected due to this @@ -14,7 +14,7 @@ error[E0308]: mismatched types LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); | ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | - | | expected struct `std::path::PathBuf`, found `&std::path::Path` + | | expected struct `PathBuf`, found `&Path` | | help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()` | expected due to this @@ -24,7 +24,7 @@ error[E0308]: mismatched types LL | let _but_should_the_play: String = 2; // Perhaps surprisingly, we suggest .to_string() here | ------ ^ | | | - | | expected struct `std::string::String`, found integer + | | expected struct `String`, found integer | | help: try using a conversion method: `2.to_string()` | expected due to this @@ -34,11 +34,11 @@ error[E0308]: mismatched types LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; | ---------- ^^^^^^^^^^ | | | - | | expected struct `std::vec::Vec`, found `&[{integer}; 3]` + | | expected struct `Vec`, found `&[{integer}; 3]` | | help: try using a conversion method: `(&[1, 2, 3]).to_vec()` | expected due to this | - = note: expected struct `std::vec::Vec` + = note: expected struct `Vec` found reference `&[{integer}; 3]` error: aborting due to 4 previous errors diff --git a/src/test/ui/copy-a-resource.stderr b/src/test/ui/copy-a-resource.stderr index 477a383690b..36cf57bd3c5 100644 --- a/src/test/ui/copy-a-resource.stderr +++ b/src/test/ui/copy-a-resource.stderr @@ -12,12 +12,12 @@ LL | let _y = x.clone(); LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc` here - | the method is available for `std::rc::Rc` here + | the method is available for `Arc` here + | the method is available for `Rc` here | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `clone`, perhaps you need to implement it: - candidate #1: `std::clone::Clone` + candidate #1: `Clone` error: aborting due to previous error diff --git a/src/test/ui/cross/cross-borrow-trait.rs b/src/test/ui/cross/cross-borrow-trait.rs index ce42b696ddf..180a75e3dfc 100644 --- a/src/test/ui/cross/cross-borrow-trait.rs +++ b/src/test/ui/cross/cross-borrow-trait.rs @@ -9,5 +9,5 @@ pub fn main() { let x: Box = Box::new(Foo); let _y: &dyn Trait = x; //~ ERROR E0308 //~| expected reference `&dyn Trait` - //~| found struct `std::boxed::Box` + //~| found struct `Box` } diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr index 618f6595d41..f693a3149b2 100644 --- a/src/test/ui/cross/cross-borrow-trait.stderr +++ b/src/test/ui/cross/cross-borrow-trait.stderr @@ -4,12 +4,12 @@ error[E0308]: mismatched types LL | let _y: &dyn Trait = x; | ---------- ^ | | | - | | expected `&dyn Trait`, found struct `std::boxed::Box` + | | expected `&dyn Trait`, found struct `Box` | | help: consider borrowing here: `&x` | expected due to this | = note: expected reference `&dyn Trait` - found struct `std::boxed::Box` + found struct `Box` error: aborting due to previous error diff --git a/src/test/ui/custom_test_frameworks/mismatch.rs b/src/test/ui/custom_test_frameworks/mismatch.rs index e6848e2f3bd..ac850552b5b 100644 --- a/src/test/ui/custom_test_frameworks/mismatch.rs +++ b/src/test/ui/custom_test_frameworks/mismatch.rs @@ -7,4 +7,4 @@ extern crate example_runner; #[test] fn wrong_kind(){} -//~^ ERROR trait bound `test::TestDescAndFn: example_runner::Testable` is not satisfied +//~^ ERROR trait bound `TestDescAndFn: Testable` is not satisfied diff --git a/src/test/ui/custom_test_frameworks/mismatch.stderr b/src/test/ui/custom_test_frameworks/mismatch.stderr index 420ddbc3def..ea4445deb4a 100644 --- a/src/test/ui/custom_test_frameworks/mismatch.stderr +++ b/src/test/ui/custom_test_frameworks/mismatch.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `test::TestDescAndFn: example_runner::Testable` is not satisfied +error[E0277]: the trait bound `TestDescAndFn: Testable` is not satisfied --> $DIR/mismatch.rs:9:1 | LL | fn wrong_kind(){} - | ^^^^^^^^^^^^^^^^^ the trait `example_runner::Testable` is not implemented for `test::TestDescAndFn` + | ^^^^^^^^^^^^^^^^^ the trait `Testable` is not implemented for `TestDescAndFn` | - = note: required for the cast to the object type `dyn example_runner::Testable` + = note: required for the cast to the object type `dyn Testable` = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/dep-graph/dep-graph-caller-callee.stderr b/src/test/ui/dep-graph/dep-graph-caller-callee.stderr index 164c474183a..3d968aa3ea6 100644 --- a/src/test/ui/dep-graph/dep-graph-caller-callee.stderr +++ b/src/test/ui/dep-graph/dep-graph-caller-callee.stderr @@ -4,7 +4,7 @@ error: OK LL | #[rustc_then_this_would_need(typeck)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: no path from `x::x` to `typeck` +error: no path from `x` to `typeck` --> $DIR/dep-graph-caller-callee.rs:31:5 | LL | #[rustc_then_this_would_need(typeck)] diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 89fd7aae3be..f59f05db9c0 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | foo(s); | ^ | | - | expected struct `std::string::String`, found `&std::string::String` + | expected struct `String`, found `&String` | help: try using a conversion method: `s.to_string()` error[E0308]: mismatched types @@ -22,7 +22,7 @@ error[E0308]: mismatched types LL | foo(&"aaa".to_owned()); | ^^^^^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found `&std::string::String` + | expected struct `String`, found `&String` | help: consider removing the borrow: `"aaa".to_owned()` error[E0308]: mismatched types @@ -31,7 +31,7 @@ error[E0308]: mismatched types LL | foo(&mut "aaa".to_owned()); | ^^^^^^^^^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found `&mut std::string::String` + | expected struct `String`, found `&mut String` | help: consider removing the borrow: `"aaa".to_owned()` error[E0308]: mismatched types diff --git a/src/test/ui/derives/derive-assoc-type-not-impl.stderr b/src/test/ui/derives/derive-assoc-type-not-impl.stderr index e4d6794bbff..92ba4f0704f 100644 --- a/src/test/ui/derives/derive-assoc-type-not-impl.stderr +++ b/src/test/ui/derives/derive-assoc-type-not-impl.stderr @@ -5,10 +5,10 @@ LL | struct Bar { | ------------------ | | | method `clone` not found for this - | doesn't satisfy `Bar: std::clone::Clone` + | doesn't satisfy `Bar: Clone` ... LL | struct NotClone; - | ---------------- doesn't satisfy `NotClone: std::clone::Clone` + | ---------------- doesn't satisfy `NotClone: Clone` ... LL | Bar:: { x: 1 }.clone(); | ^^^^^ method not found in `Bar` @@ -18,15 +18,15 @@ LL | Bar:: { x: 1 }.clone(); LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc>` here - | the method is available for `std::rc::Rc>` here + | the method is available for `Arc>` here + | the method is available for `Rc>` here | = note: the method `clone` exists but the following trait bounds were not satisfied: - `NotClone: std::clone::Clone` - which is required by `Bar: std::clone::Clone` + `NotClone: Clone` + which is required by `Bar: Clone` = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `clone`, perhaps you need to implement it: - candidate #1: `std::clone::Clone` + candidate #1: `Clone` error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr index bbb8776f4fd..aa33faf5991 100644 --- a/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Clone-enum-struct-variant.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Error: Clone` is not satisfied --> $DIR/derives-span-Clone-enum-struct-variant.rs:9:6 | LL | x: Error - | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error` + | ^^^^^^^^ the trait `Clone` is not implemented for `Error` | - = note: required by `std::clone::Clone::clone` + = note: required by `clone` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-enum.stderr b/src/test/ui/derives/derives-span-Clone-enum.stderr index 0e410e795e0..e3bc2d6a9a0 100644 --- a/src/test/ui/derives/derives-span-Clone-enum.stderr +++ b/src/test/ui/derives/derives-span-Clone-enum.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Error: Clone` is not satisfied --> $DIR/derives-span-Clone-enum.rs:9:6 | LL | Error - | ^^^^^ the trait `std::clone::Clone` is not implemented for `Error` + | ^^^^^ the trait `Clone` is not implemented for `Error` | - = note: required by `std::clone::Clone::clone` + = note: required by `clone` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-struct.stderr b/src/test/ui/derives/derives-span-Clone-struct.stderr index 889128a6623..99c0cdecb6e 100644 --- a/src/test/ui/derives/derives-span-Clone-struct.stderr +++ b/src/test/ui/derives/derives-span-Clone-struct.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Error: Clone` is not satisfied --> $DIR/derives-span-Clone-struct.rs:8:5 | LL | x: Error - | ^^^^^^^^ the trait `std::clone::Clone` is not implemented for `Error` + | ^^^^^^^^ the trait `Clone` is not implemented for `Error` | - = note: required by `std::clone::Clone::clone` + = note: required by `clone` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr index 0024199ca59..e6d734bfcc7 100644 --- a/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Clone-tuple-struct.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `Error: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Error: Clone` is not satisfied --> $DIR/derives-span-Clone-tuple-struct.rs:8:5 | LL | Error - | ^^^^^ the trait `std::clone::Clone` is not implemented for `Error` + | ^^^^^ the trait `Clone` is not implemented for `Error` | - = note: required by `std::clone::Clone::clone` + = note: required by `clone` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr index 77779a55b68..64caba8e80d 100644 --- a/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Debug-enum-struct-variant.stderr @@ -1,13 +1,13 @@ -error[E0277]: `Error` doesn't implement `std::fmt::Debug` +error[E0277]: `Error` doesn't implement `Debug` --> $DIR/derives-span-Debug-enum-struct-variant.rs:9:6 | LL | x: Error | ^^^^^^^^ `Error` cannot be formatted using `{:?}` | - = help: the trait `std::fmt::Debug` is not implemented for `Error` - = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` - = note: required for the cast to the object type `dyn std::fmt::Debug` + = help: the trait `Debug` is not implemented for `Error` + = note: add `#[derive(Debug)]` or manually implement `Debug` + = note: required because of the requirements on the impl of `Debug` for `&Error` + = note: required for the cast to the object type `dyn Debug` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-enum.stderr b/src/test/ui/derives/derives-span-Debug-enum.stderr index f64c33c2bcc..88b61f3fccf 100644 --- a/src/test/ui/derives/derives-span-Debug-enum.stderr +++ b/src/test/ui/derives/derives-span-Debug-enum.stderr @@ -1,13 +1,13 @@ -error[E0277]: `Error` doesn't implement `std::fmt::Debug` +error[E0277]: `Error` doesn't implement `Debug` --> $DIR/derives-span-Debug-enum.rs:9:6 | LL | Error | ^^^^^ `Error` cannot be formatted using `{:?}` | - = help: the trait `std::fmt::Debug` is not implemented for `Error` - = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` - = note: required for the cast to the object type `dyn std::fmt::Debug` + = help: the trait `Debug` is not implemented for `Error` + = note: add `#[derive(Debug)]` or manually implement `Debug` + = note: required because of the requirements on the impl of `Debug` for `&Error` + = note: required for the cast to the object type `dyn Debug` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-struct.stderr b/src/test/ui/derives/derives-span-Debug-struct.stderr index 0013bcf8325..558a5796d22 100644 --- a/src/test/ui/derives/derives-span-Debug-struct.stderr +++ b/src/test/ui/derives/derives-span-Debug-struct.stderr @@ -1,13 +1,13 @@ -error[E0277]: `Error` doesn't implement `std::fmt::Debug` +error[E0277]: `Error` doesn't implement `Debug` --> $DIR/derives-span-Debug-struct.rs:8:5 | LL | x: Error | ^^^^^^^^ `Error` cannot be formatted using `{:?}` | - = help: the trait `std::fmt::Debug` is not implemented for `Error` - = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` - = note: required for the cast to the object type `dyn std::fmt::Debug` + = help: the trait `Debug` is not implemented for `Error` + = note: add `#[derive(Debug)]` or manually implement `Debug` + = note: required because of the requirements on the impl of `Debug` for `&Error` + = note: required for the cast to the object type `dyn Debug` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr index 7e0039e8a79..73a88a653f4 100644 --- a/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Debug-tuple-struct.stderr @@ -1,13 +1,13 @@ -error[E0277]: `Error` doesn't implement `std::fmt::Debug` +error[E0277]: `Error` doesn't implement `Debug` --> $DIR/derives-span-Debug-tuple-struct.rs:8:5 | LL | Error | ^^^^^ `Error` cannot be formatted using `{:?}` | - = help: the trait `std::fmt::Debug` is not implemented for `Error` - = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&Error` - = note: required for the cast to the object type `dyn std::fmt::Debug` + = help: the trait `Debug` is not implemented for `Error` + = note: add `#[derive(Debug)]` or manually implement `Debug` + = note: required because of the requirements on the impl of `Debug` for `&Error` + = note: required for the cast to the object type `dyn Debug` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/derives/derives-span-Default-struct.stderr b/src/test/ui/derives/derives-span-Default-struct.stderr index 492847fc022..d2a5280ac6f 100644 --- a/src/test/ui/derives/derives-span-Default-struct.stderr +++ b/src/test/ui/derives/derives-span-Default-struct.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::default::Default` is not satisfied +error[E0277]: the trait bound `Error: Default` is not satisfied --> $DIR/derives-span-Default-struct.rs:8:5 | LL | x: Error - | ^^^^^^^^ the trait `std::default::Default` is not implemented for `Error` + | ^^^^^^^^ the trait `Default` is not implemented for `Error` | = note: required by `std::default::Default::default` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr index fa7b27e770f..96ff7adc72c 100644 --- a/src/test/ui/derives/derives-span-Default-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Default-tuple-struct.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::default::Default` is not satisfied +error[E0277]: the trait bound `Error: Default` is not satisfied --> $DIR/derives-span-Default-tuple-struct.rs:8:5 | LL | Error - | ^^^^^ the trait `std::default::Default` is not implemented for `Error` + | ^^^^^ the trait `Default` is not implemented for `Error` | = note: required by `std::default::Default::default` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr index 698eb8375e6..4ad7b94e414 100644 --- a/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum-struct-variant.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Error: Eq` is not satisfied --> $DIR/derives-span-Eq-enum-struct-variant.rs:9:6 | LL | x: Error - | ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` + | ^^^^^^^^ the trait `Eq` is not implemented for `Error` | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { - | -- required by this bound in `std::cmp::AssertParamIsEq` + | -- required by this bound in `AssertParamIsEq` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Eq-enum.stderr b/src/test/ui/derives/derives-span-Eq-enum.stderr index 7009fcf439a..8ee72749331 100644 --- a/src/test/ui/derives/derives-span-Eq-enum.stderr +++ b/src/test/ui/derives/derives-span-Eq-enum.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Error: Eq` is not satisfied --> $DIR/derives-span-Eq-enum.rs:9:6 | LL | Error - | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` + | ^^^^^ the trait `Eq` is not implemented for `Error` | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { - | -- required by this bound in `std::cmp::AssertParamIsEq` + | -- required by this bound in `AssertParamIsEq` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Eq-struct.stderr b/src/test/ui/derives/derives-span-Eq-struct.stderr index 7ee0bc59ee2..1b751365a3a 100644 --- a/src/test/ui/derives/derives-span-Eq-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-struct.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Error: Eq` is not satisfied --> $DIR/derives-span-Eq-struct.rs:8:5 | LL | x: Error - | ^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` + | ^^^^^^^^ the trait `Eq` is not implemented for `Error` | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { - | -- required by this bound in `std::cmp::AssertParamIsEq` + | -- required by this bound in `AssertParamIsEq` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr index a23b2fbd1c4..44b1d2cc026 100644 --- a/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Eq-tuple-struct.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `Error: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Error: Eq` is not satisfied --> $DIR/derives-span-Eq-tuple-struct.rs:8:5 | LL | Error - | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Error` + | ^^^^^ the trait `Eq` is not implemented for `Error` | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { - | -- required by this bound in `std::cmp::AssertParamIsEq` + | -- required by this bound in `AssertParamIsEq` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr index 3f419184932..9a031537975 100644 --- a/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum-struct-variant.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied +error[E0277]: the trait bound `Error: Hash` is not satisfied --> $DIR/derives-span-Hash-enum-struct-variant.rs:9:6 | LL | x: Error - | ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | ^^^^^^^^ the trait `Hash` is not implemented for `Error` | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | diff --git a/src/test/ui/derives/derives-span-Hash-enum.stderr b/src/test/ui/derives/derives-span-Hash-enum.stderr index 7f64070ddb2..08ddc66dd0f 100644 --- a/src/test/ui/derives/derives-span-Hash-enum.stderr +++ b/src/test/ui/derives/derives-span-Hash-enum.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied +error[E0277]: the trait bound `Error: Hash` is not satisfied --> $DIR/derives-span-Hash-enum.rs:8:6 | LL | Error - | ^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | ^^^^^ the trait `Hash` is not implemented for `Error` | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | diff --git a/src/test/ui/derives/derives-span-Hash-struct.stderr b/src/test/ui/derives/derives-span-Hash-struct.stderr index 4082c6cbd39..a2be46dc779 100644 --- a/src/test/ui/derives/derives-span-Hash-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-struct.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied +error[E0277]: the trait bound `Error: Hash` is not satisfied --> $DIR/derives-span-Hash-struct.rs:8:5 | LL | x: Error - | ^^^^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | ^^^^^^^^ the trait `Hash` is not implemented for `Error` | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | diff --git a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr index 7cac216bc1b..30cc6dc27ab 100644 --- a/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Hash-tuple-struct.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::hash::Hash` is not satisfied +error[E0277]: the trait bound `Error: Hash` is not satisfied --> $DIR/derives-span-Hash-tuple-struct.rs:8:5 | LL | Error - | ^^^^^ the trait `std::hash::Hash` is not implemented for `Error` + | ^^^^^ the trait `Hash` is not implemented for `Error` | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | diff --git a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr index d0286ad17e4..b0b23217535 100644 --- a/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-Ord-enum-struct-variant.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `Error: Ord` is not satisfied --> $DIR/derives-span-Ord-enum-struct-variant.rs:9:6 | LL | x: Error - | ^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` + | ^^^^^^^^ the trait `Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Ord-enum.stderr b/src/test/ui/derives/derives-span-Ord-enum.stderr index aabbd0a1d1b..bc957692949 100644 --- a/src/test/ui/derives/derives-span-Ord-enum.stderr +++ b/src/test/ui/derives/derives-span-Ord-enum.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `Error: Ord` is not satisfied --> $DIR/derives-span-Ord-enum.rs:9:6 | LL | Error - | ^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` + | ^^^^^ the trait `Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Ord-struct.stderr b/src/test/ui/derives/derives-span-Ord-struct.stderr index eaac3dafd08..5f324c131c9 100644 --- a/src/test/ui/derives/derives-span-Ord-struct.stderr +++ b/src/test/ui/derives/derives-span-Ord-struct.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `Error: Ord` is not satisfied --> $DIR/derives-span-Ord-struct.rs:8:5 | LL | x: Error - | ^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` + | ^^^^^^^^ the trait `Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr index 0ae36bcb8bf..1c277e34ff2 100644 --- a/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-Ord-tuple-struct.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Error: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `Error: Ord` is not satisfied --> $DIR/derives-span-Ord-tuple-struct.rs:8:5 | LL | Error - | ^^^^^ the trait `std::cmp::Ord` is not implemented for `Error` + | ^^^^^ the trait `Ord` is not implemented for `Error` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr index 0be75972e8c..0736e71460b 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-enum-struct-variant.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr index 64290023c6d..d88321b9797 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-enum.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-enum.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr index dcd81589e92..30235177528 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-struct.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0277]: can't compare `Error` with `Error` LL | x: Error | ^^^^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr index 8dbf103d2da..3abf1ded8df 100644 --- a/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr +++ b/src/test/ui/derives/derives-span-PartialOrd-tuple-struct.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0277]: can't compare `Error` with `Error` LL | Error | ^^^^^ no implementation for `Error < Error` and `Error > Error` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Error` + = help: the trait `PartialOrd` is not implemented for `Error` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/derives/deriving-copyclone.stderr b/src/test/ui/derives/deriving-copyclone.stderr index 5fa2710cbad..4919bac5263 100644 --- a/src/test/ui/derives/deriving-copyclone.stderr +++ b/src/test/ui/derives/deriving-copyclone.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `C: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `C: Copy` is not satisfied --> $DIR/deriving-copyclone.rs:31:13 | LL | fn is_copy(_: T) {} @@ -7,12 +7,12 @@ LL | fn is_copy(_: T) {} LL | is_copy(B { a: 1, b: C }); | ^^^^^^^^^^^^^^^^ | | - | expected an implementor of trait `std::marker::Copy` + | expected an implementor of trait `Copy` | help: consider borrowing here: `&B { a: 1, b: C }` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `B` + = note: required because of the requirements on the impl of `Copy` for `B` -error[E0277]: the trait bound `C: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `C: Clone` is not satisfied --> $DIR/deriving-copyclone.rs:32:14 | LL | fn is_clone(_: T) {} @@ -21,12 +21,12 @@ LL | fn is_clone(_: T) {} LL | is_clone(B { a: 1, b: C }); | ^^^^^^^^^^^^^^^^ | | - | expected an implementor of trait `std::clone::Clone` + | expected an implementor of trait `Clone` | help: consider borrowing here: `&B { a: 1, b: C }` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `B` + = note: required because of the requirements on the impl of `Clone` for `B` -error[E0277]: the trait bound `D: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `D: Copy` is not satisfied --> $DIR/deriving-copyclone.rs:35:13 | LL | fn is_copy(_: T) {} @@ -35,10 +35,10 @@ LL | fn is_copy(_: T) {} LL | is_copy(B { a: 1, b: D }); | ^^^^^^^^^^^^^^^^ | | - | expected an implementor of trait `std::marker::Copy` + | expected an implementor of trait `Copy` | help: consider borrowing here: `&B { a: 1, b: D }` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `B` + = note: required because of the requirements on the impl of `Copy` for `B` error: aborting due to 3 previous errors diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.rs b/src/test/ui/derives/deriving-no-inner-impl-error-message.rs index d3ac5d2fe2f..39e41a59ef4 100644 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.rs +++ b/src/test/ui/derives/deriving-no-inner-impl-error-message.rs @@ -8,7 +8,7 @@ struct E { #[derive(Clone)] struct C { x: NoCloneOrEq - //~^ ERROR `NoCloneOrEq: std::clone::Clone` is not satisfied + //~^ ERROR `NoCloneOrEq: Clone` is not satisfied } diff --git a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr index d4995c1d50c..1842a88bb23 100644 --- a/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr +++ b/src/test/ui/derives/deriving-no-inner-impl-error-message.stderr @@ -16,13 +16,13 @@ LL | x: NoCloneOrEq = note: an implementation of `std::cmp::PartialEq` might be missing for `NoCloneOrEq` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `NoCloneOrEq: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `NoCloneOrEq: Clone` is not satisfied --> $DIR/deriving-no-inner-impl-error-message.rs:10:5 | LL | x: NoCloneOrEq - | ^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `NoCloneOrEq` + | ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NoCloneOrEq` | - = note: required by `std::clone::Clone::clone` + = note: required by `clone` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 3 previous errors diff --git a/src/test/ui/destructure-trait-ref.rs b/src/test/ui/destructure-trait-ref.rs index 34e7cad935a..fdc9bbab730 100644 --- a/src/test/ui/destructure-trait-ref.rs +++ b/src/test/ui/destructure-trait-ref.rs @@ -26,7 +26,7 @@ fn main() { let &x = &1isize as &dyn T; //~ ERROR type `&dyn T` cannot be dereferenced let &&x = &(&1isize as &dyn T); //~ ERROR type `&dyn T` cannot be dereferenced let box x = box 1isize as Box; - //~^ ERROR type `std::boxed::Box` cannot be dereferenced + //~^ ERROR type `Box` cannot be dereferenced // n > m let &&x = &1isize as &dyn T; @@ -40,5 +40,5 @@ fn main() { let box box x = box 1isize as Box; //~^ ERROR mismatched types //~| expected trait object `dyn T` - //~| found struct `std::boxed::Box<_>` + //~| found struct `Box<_>` } diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr index 1382cf643a1..fb43ca760b8 100644 --- a/src/test/ui/destructure-trait-ref.stderr +++ b/src/test/ui/destructure-trait-ref.stderr @@ -10,11 +10,11 @@ error[E0033]: type `&dyn T` cannot be dereferenced LL | let &&x = &(&1isize as &dyn T); | ^^ type `&dyn T` cannot be dereferenced -error[E0033]: type `std::boxed::Box` cannot be dereferenced +error[E0033]: type `Box` cannot be dereferenced --> $DIR/destructure-trait-ref.rs:28:9 | LL | let box x = box 1isize as Box; - | ^^^^^ type `std::boxed::Box` cannot be dereferenced + | ^^^^^ type `Box` cannot be dereferenced error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:32:10 @@ -44,12 +44,12 @@ error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:40:13 | LL | let box box x = box 1isize as Box; - | ^^^^^ ------------------------ this expression has type `std::boxed::Box` + | ^^^^^ ------------------------ this expression has type `Box` | | - | expected trait object `dyn T`, found struct `std::boxed::Box` + | expected trait object `dyn T`, found struct `Box` | = note: expected trait object `dyn T` - found struct `std::boxed::Box<_>` + found struct `Box<_>` error: aborting due to 6 previous errors diff --git a/src/test/ui/did_you_mean/bad-assoc-ty.stderr b/src/test/ui/did_you_mean/bad-assoc-ty.stderr index c409ea9c657..4835d9ab107 100644 --- a/src/test/ui/did_you_mean/bad-assoc-ty.stderr +++ b/src/test/ui/did_you_mean/bad-assoc-ty.stderr @@ -110,13 +110,13 @@ error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:27:10 | LL | type G = dyn 'static + (Send)::AssocTy; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn std::marker::Send + 'static) as Trait>::AssocTy` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Send + 'static) as Trait>::AssocTy` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:33:10 | LL | type H = Fn(u8) -> (u8)::Output; - | ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn std::ops::Fn(u8) -> u8 + 'static) as Trait>::Output` + | ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as Trait>::Output` error[E0223]: ambiguous associated type --> $DIR/bad-assoc-ty.rs:37:19 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 143d7f695c9..dbd9dc1bc40 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,24 +1,24 @@ -error[E0560]: struct `submodule::Demo` has no field named `inocently_mispellable` +error[E0560]: struct `Demo` has no field named `inocently_mispellable` --> $DIR/issue-42599_available_fields_note.rs:16:39 | LL | Self { secret_integer: 2, inocently_mispellable: () } | ^^^^^^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `innocently_misspellable` -error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexistent_field` +error[E0560]: struct `Demo` has no field named `egregiously_nonexistent_field` --> $DIR/issue-42599_available_fields_note.rs:21:39 | LL | Self { secret_integer: 3, egregiously_nonexistent_field: () } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `submodule::Demo` does not have this field + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Demo` does not have this 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` +error[E0609]: no field `inocently_mispellable` on type `Demo` --> $DIR/issue-42599_available_fields_note.rs:32:41 | LL | let innocent_field_misaccess = demo.inocently_mispellable; | ^^^^^^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `innocently_misspellable` -error[E0609]: no field `egregiously_nonexistent_field` on type `submodule::Demo` +error[E0609]: no field `egregiously_nonexistent_field` on type `Demo` --> $DIR/issue-42599_available_fields_note.rs:35:42 | LL | let egregious_field_misaccess = demo.egregiously_nonexistent_field; diff --git a/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr b/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr index f194b335fde..0ccccb53aac 100644 --- a/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr +++ b/src/test/ui/did_you_mean/issue-49746-unicode-confusable-in-float-literal-expt.stderr @@ -21,7 +21,7 @@ error[E0277]: cannot subtract `{integer}` from `{float}` LL | const UNIVERSAL_GRAVITATIONAL_CONSTANT: f64 = 6.674e−11; // m³⋅kg⁻¹⋅s⁻² | ^ no implementation for `{float} - {integer}` | - = help: the trait `std::ops::Sub<{integer}>` is not implemented for `{float}` + = help: the trait `Sub<{integer}>` is not implemented for `{float}` error: aborting due to 3 previous errors diff --git a/src/test/ui/did_you_mean/recursion_limit.stderr b/src/test/ui/did_you_mean/recursion_limit.stderr index c9a6d42b5cc..c5b42416eac 100644 --- a/src/test/ui/did_you_mean/recursion_limit.stderr +++ b/src/test/ui/did_you_mean/recursion_limit.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `K: std::marker::Send` +error[E0275]: overflow evaluating the requirement `K: Send` --> $DIR/recursion_limit.rs:34:5 | LL | fn is_send() { } 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 333754891c1..a8b160bbb2c 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 @@ -10,11 +10,11 @@ error[E0178]: expected a path on the left-hand side of `+`, not `&'static Copy` LL | let _: &'static Copy + 'static; | ^^^^^^^^^^^^^^^^^^^^^^^ help: try adding parentheses: `&'static (Copy + 'static)` -error[E0038]: the trait `std::marker::Copy` cannot be made into an object +error[E0038]: the trait `Copy` cannot be made into an object --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12 | LL | let _: &Copy + 'static; - | ^^^^^ the trait `std::marker::Copy` cannot be made into an object + | ^^^^^ the trait `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr index 8c64149a0ff..cda81d13669 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-let.stderr @@ -5,7 +5,7 @@ LL | let X { x: y } = x; | - ^ cannot move out of here | | | data moved here - | move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `y` has type `String`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr index afc5170e1b8..70cdd6446c8 100644 --- a/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr +++ b/src/test/ui/disallowed-deconstructing/disallowed-deconstructing-destructing-struct-match.stderr @@ -8,7 +8,7 @@ LL | X { x: y } => println!("contents: {}", y) | - | | | data moved here - | move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `y` has type `String`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/disambiguate-identical-names.rs b/src/test/ui/disambiguate-identical-names.rs new file mode 100644 index 00000000000..708d2cd76a1 --- /dev/null +++ b/src/test/ui/disambiguate-identical-names.rs @@ -0,0 +1,15 @@ +pub mod submod { + // Create ambiguity with the std::vec::Vec item: + pub struct Vec; +} + +fn test(_v: &Vec>) { +} + +fn main() { + let v = std::collections::HashMap::new(); + v.insert(3u8, 1u8); + + test(&v); + //~^ ERROR mismatched types +} diff --git a/src/test/ui/disambiguate-identical-names.stderr b/src/test/ui/disambiguate-identical-names.stderr new file mode 100644 index 00000000000..0c6bd9379f7 --- /dev/null +++ b/src/test/ui/disambiguate-identical-names.stderr @@ -0,0 +1,12 @@ +error[E0308]: mismatched types + --> $DIR/disambiguate-identical-names.rs:13:10 + | +LL | test(&v); + | ^^ expected struct `std::vec::Vec`, found struct `HashMap` + | + = note: expected reference `&std::vec::Vec>` + found reference `&HashMap` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr index c10232107e8..5d53405579d 100644 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.stderr @@ -8,7 +8,7 @@ LL | } | - | | | `c_shortest` dropped here while still borrowed - | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `other::Dt` + | borrow might be used here, when `dt` is dropped and runs the `Drop` code for type `Dt` | = note: values in a scope are dropped in the opposite order they are defined @@ -22,7 +22,7 @@ LL | } | - | | | `c_shortest` dropped here while still borrowed - | borrow might be used here, when `pt` is dropped and runs the `Drop` code for type `other::Pt` + | borrow might be used here, when `pt` is dropped and runs the `Drop` code for type `Pt` | = note: values in a scope are dropped in the opposite order they are defined diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.rs b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.rs index e2e600b17f2..558b4342da7 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.rs +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.rs @@ -29,8 +29,8 @@ enum Wrapper { } fn main() { - let w = //~ ERROR overflow while adding drop-check rules for std::option + let w = //~ ERROR overflow while adding drop-check rules for Option Some(Wrapper::Simple::); - //~^ ERROR overflow while adding drop-check rules for std::option::Option + //~^ ERROR overflow while adding drop-check rules for Option //~| ERROR overflow while adding drop-check rules for Wrapper } diff --git a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr index 1c810df2423..b24e1d1bf79 100644 --- a/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr +++ b/src/test/ui/dropck/dropck_no_diverge_on_nonregular_3.stderr @@ -1,4 +1,4 @@ -error[E0320]: overflow while adding drop-check rules for std::option::Option> +error[E0320]: overflow while adding drop-check rules for Option> --> $DIR/dropck_no_diverge_on_nonregular_3.rs:32:9 | LL | let w = @@ -6,7 +6,7 @@ LL | let w = | = note: overflowed on FingerTree>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -error[E0320]: overflow while adding drop-check rules for std::option::Option> +error[E0320]: overflow while adding drop-check rules for Option> --> $DIR/dropck_no_diverge_on_nonregular_3.rs:33:9 | LL | Some(Wrapper::Simple::); diff --git a/src/test/ui/dst/dst-bad-assign-2.stderr b/src/test/ui/dst/dst-bad-assign-2.stderr index a5374aedab8..6c9e2971c6d 100644 --- a/src/test/ui/dst/dst-bad-assign-2.stderr +++ b/src/test/ui/dst/dst-bad-assign-2.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `dyn ToBar` cannot be known at compila LL | f5.ptr = *z; | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn ToBar` + = help: the trait `Sized` is not implemented for `dyn ToBar` = note: the left-hand-side of an assignment must have a statically known size error: aborting due to previous error diff --git a/src/test/ui/dst/dst-bad-assign-3.stderr b/src/test/ui/dst/dst-bad-assign-3.stderr index f8d9300f11a..04e46233532 100644 --- a/src/test/ui/dst/dst-bad-assign-3.stderr +++ b/src/test/ui/dst/dst-bad-assign-3.stderr @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `dyn ToBar` cannot be known at compila LL | f5.2 = Bar1 {f: 36}; | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn ToBar` + = help: the trait `Sized` is not implemented for `dyn ToBar` = note: the left-hand-side of an assignment must have a statically known size error: aborting due to 2 previous errors diff --git a/src/test/ui/dst/dst-bad-assign.stderr b/src/test/ui/dst/dst-bad-assign.stderr index 8e3eeefb9ea..f87a34c6d37 100644 --- a/src/test/ui/dst/dst-bad-assign.stderr +++ b/src/test/ui/dst/dst-bad-assign.stderr @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `dyn ToBar` cannot be known at compila LL | f5.ptr = Bar1 {f: 36}; | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn ToBar` + = help: the trait `Sized` is not implemented for `dyn ToBar` = note: the left-hand-side of an assignment must have a statically known size error: aborting due to 2 previous errors diff --git a/src/test/ui/dst/dst-bad-deep-2.stderr b/src/test/ui/dst/dst-bad-deep-2.stderr index d9d6ca32923..b2285081410 100644 --- a/src/test/ui/dst/dst-bad-deep-2.stderr +++ b/src/test/ui/dst/dst-bad-deep-2.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[isize]` cannot be known at compilati LL | let h: &(([isize],),) = &(*g,); | ^^^^^ doesn't have a size known at compile-time | - = help: within `(([isize],),)`, the trait `std::marker::Sized` is not implemented for `[isize]` + = help: within `(([isize],),)`, the trait `Sized` is not implemented for `[isize]` = note: required because it appears within the type `([isize],)` = note: required because it appears within the type `(([isize],),)` = note: tuples must have a statically known size to be initialized diff --git a/src/test/ui/dst/dst-bad-deep.stderr b/src/test/ui/dst/dst-bad-deep.stderr index 1304f04f820..ea6b2390478 100644 --- a/src/test/ui/dst/dst-bad-deep.stderr +++ b/src/test/ui/dst/dst-bad-deep.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[isize]` cannot be known at compilati LL | let h: &Fat> = &Fat { ptr: *g }; | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `Fat>`, the trait `std::marker::Sized` is not implemented for `[isize]` + = help: within `Fat>`, the trait `Sized` is not implemented for `[isize]` = note: required because it appears within the type `Fat<[isize]>` = note: required because it appears within the type `Fat>` = note: structs must have a statically known size to be initialized diff --git a/src/test/ui/dst/dst-index.stderr b/src/test/ui/dst/dst-index.stderr index 6cdb0e76e90..6bcd70cbaad 100644 --- a/src/test/ui/dst/dst-index.stderr +++ b/src/test/ui/dst/dst-index.stderr @@ -4,7 +4,7 @@ error[E0161]: cannot move a value of type str: the size of str cannot be statica LL | S[0]; | ^^^^ -error[E0161]: cannot move a value of type dyn std::fmt::Debug: the size of dyn std::fmt::Debug cannot be statically determined +error[E0161]: cannot move a value of type dyn Debug: the size of dyn Debug cannot be statically determined --> $DIR/dst-index.rs:34:5 | LL | T[0]; @@ -20,7 +20,7 @@ error[E0507]: cannot move out of index of `T` --> $DIR/dst-index.rs:34:5 | LL | T[0]; - | ^^^^ move occurs because value has type `dyn std::fmt::Debug`, which does not implement the `Copy` trait + | ^^^^ move occurs because value has type `dyn Debug`, which does not implement the `Copy` trait error: aborting due to 4 previous errors diff --git a/src/test/ui/dst/dst-object-from-unsized-type.stderr b/src/test/ui/dst/dst-object-from-unsized-type.stderr index da8ead885c8..49940112a9f 100644 --- a/src/test/ui/dst/dst-object-from-unsized-type.stderr +++ b/src/test/ui/dst/dst-object-from-unsized-type.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/dst-object-from-unsized-type.rs:8:23 | LL | fn test1(t: &T) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let u: &dyn Foo = t; | ^ doesn't have a size known at compile-time | @@ -12,7 +12,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/dst-object-from-unsized-type.rs:13:23 | LL | fn test2(t: &T) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let v: &dyn Foo = t as &dyn Foo; | ^ doesn't have a size known at compile-time | @@ -24,7 +24,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | let _: &[&dyn Foo] = &["hi"]; | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: required for the cast to the object type `dyn Foo` error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -33,7 +33,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | let _: &dyn Foo = x as &dyn Foo; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: required for the cast to the object type `dyn Foo` error: aborting due to 4 previous errors diff --git a/src/test/ui/dst/dst-sized-trait-param.stderr b/src/test/ui/dst/dst-sized-trait-param.stderr index 7e90e9ce179..481c01a75e5 100644 --- a/src/test/ui/dst/dst-sized-trait-param.stderr +++ b/src/test/ui/dst/dst-sized-trait-param.stderr @@ -7,7 +7,7 @@ LL | LL | impl Foo<[isize]> for usize { } | ^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[isize]` + = help: the trait `Sized` is not implemented for `[isize]` help: consider relaxing the implicit `Sized` restriction | LL | trait Foo : Sized { fn take(self, x: &T) { } } // Note: T is sized @@ -22,7 +22,7 @@ LL | trait Foo : Sized { fn take(self, x: &T) { } } // Note: T is sized LL | impl Foo for [usize] { } | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[usize]` + = help: the trait `Sized` is not implemented for `[usize]` error: aborting due to 2 previous errors diff --git a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr index 52e58aa4c6d..0dc5432d28c 100644 --- a/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr +++ b/src/test/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr @@ -12,7 +12,7 @@ error[E0392]: parameter `T` is never used LL | enum MyWeirdOption { | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0004-2.stderr b/src/test/ui/error-codes/E0004-2.stderr index bb155aaf4b8..7b3deb1579a 100644 --- a/src/test/ui/error-codes/E0004-2.stderr +++ b/src/test/ui/error-codes/E0004-2.stderr @@ -13,7 +13,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ---- not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `std::option::Option` + = note: the matched value is of type `Option` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0005.stderr b/src/test/ui/error-codes/E0005.stderr index e15189413b5..b9f2702e888 100644 --- a/src/test/ui/error-codes/E0005.stderr +++ b/src/test/ui/error-codes/E0005.stderr @@ -11,7 +11,7 @@ LL | None, | = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html - = note: the matched value is of type `std::option::Option` + = note: the matched value is of type `Option` help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let Some(y) = x { /* */ } diff --git a/src/test/ui/error-codes/E0007.stderr b/src/test/ui/error-codes/E0007.stderr index 31af9171725..89c10516194 100644 --- a/src/test/ui/error-codes/E0007.stderr +++ b/src/test/ui/error-codes/E0007.stderr @@ -8,7 +8,7 @@ error[E0382]: use of moved value --> $DIR/E0007.rs:6:26 | LL | let x = Some("s".to_string()); - | - move occurs because `x` has type `std::option::Option`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Option`, which does not implement the `Copy` trait LL | match x { LL | op_string @ Some(s) => {}, | -----------------^- diff --git a/src/test/ui/error-codes/E0067.stderr b/src/test/ui/error-codes/E0067.stderr index fad8270fd5a..ec0358cb7df 100644 --- a/src/test/ui/error-codes/E0067.stderr +++ b/src/test/ui/error-codes/E0067.stderr @@ -1,10 +1,10 @@ -error[E0368]: binary assignment operation `+=` cannot be applied to type `std::collections::LinkedList<_>` +error[E0368]: binary assignment operation `+=` cannot be applied to type `LinkedList<_>` --> $DIR/E0067.rs:4:5 | LL | LinkedList::new() += 1; | -----------------^^^^^ | | - | cannot use `+=` on type `std::collections::LinkedList<_>` + | cannot use `+=` on type `LinkedList<_>` error[E0067]: invalid left-hand side of assignment --> $DIR/E0067.rs:4:23 diff --git a/src/test/ui/error-codes/E0221.stderr b/src/test/ui/error-codes/E0221.stderr index 0b4819143ce..085f80f44f3 100644 --- a/src/test/ui/error-codes/E0221.stderr +++ b/src/test/ui/error-codes/E0221.stderr @@ -31,7 +31,7 @@ LL | let _: Self::Err; | ambiguous associated type `Err` | help: use fully qualified syntax to disambiguate: `::Err` | - = note: associated type `Self` could derive from `std::str::FromStr` + = note: associated type `Self` could derive from `FromStr` error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0276.stderr b/src/test/ui/error-codes/E0276.stderr index a8b016ebf52..8857e1646ee 100644 --- a/src/test/ui/error-codes/E0276.stderr +++ b/src/test/ui/error-codes/E0276.stderr @@ -5,7 +5,7 @@ LL | fn foo(x: T); | ---------------- definition of `foo` from trait ... LL | fn foo(x: T) where T: Copy {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::marker::Copy` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Copy` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0277-2.stderr b/src/test/ui/error-codes/E0277-2.stderr index f5ba46ca01e..a0ab1641ca7 100644 --- a/src/test/ui/error-codes/E0277-2.stderr +++ b/src/test/ui/error-codes/E0277-2.stderr @@ -7,7 +7,7 @@ LL | fn is_send() { } LL | is_send::(); | ^^^^^^^^^^^^^^ `*const u8` cannot be sent between threads safely | - = help: within `Foo`, the trait `std::marker::Send` is not implemented for `*const u8` + = help: within `Foo`, the trait `Send` is not implemented for `*const u8` = note: required because it appears within the type `Baz` = note: required because it appears within the type `Bar` = note: required because it appears within the type `Foo` diff --git a/src/test/ui/error-codes/E0277.stderr b/src/test/ui/error-codes/E0277.stderr index 203fc189156..c2e15007cf9 100644 --- a/src/test/ui/error-codes/E0277.stderr +++ b/src/test/ui/error-codes/E0277.stderr @@ -4,8 +4,8 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | fn f(p: Path) { } | ^ doesn't have a size known at compile-time | - = help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]` - = note: required because it appears within the type `std::path::Path` + = help: within `Path`, the trait `Sized` is not implemented for `[u8]` + = note: required because it appears within the type `Path` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/error-codes/E0297.stderr b/src/test/ui/error-codes/E0297.stderr index 9134e90557f..ec3452b1ddf 100644 --- a/src/test/ui/error-codes/E0297.stderr +++ b/src/test/ui/error-codes/E0297.stderr @@ -9,7 +9,7 @@ LL | for Some(x) in xs {} LL | None, | ---- not covered | - = note: the matched value is of type `std::option::Option` + = note: the matched value is of type `Option` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0308-2.stderr b/src/test/ui/error-codes/E0308-2.stderr index e7c5e4b4240..47fea5a23a7 100644 --- a/src/test/ui/error-codes/E0308-2.stderr +++ b/src/test/ui/error-codes/E0308-2.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | impl Eq for &dyn DynEq {} | ^^ lifetime mismatch | - = note: expected trait `std::cmp::PartialEq` - found trait `std::cmp::PartialEq` + = note: expected trait `PartialEq` + found trait `PartialEq` note: the lifetime `'_` as defined on the impl at 9:13... --> $DIR/E0308-2.rs:9:13 | diff --git a/src/test/ui/error-codes/E0392.stderr b/src/test/ui/error-codes/E0392.stderr index 7b0bfe37275..860bf68f018 100644 --- a/src/test/ui/error-codes/E0392.stderr +++ b/src/test/ui/error-codes/E0392.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | enum Foo { Bar } | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0446.stderr b/src/test/ui/error-codes/E0446.stderr index bb009260979..c538bae2e5e 100644 --- a/src/test/ui/error-codes/E0446.stderr +++ b/src/test/ui/error-codes/E0446.stderr @@ -1,8 +1,8 @@ -error[E0446]: private type `foo::Bar` in public interface +error[E0446]: private type `Bar` in public interface --> $DIR/E0446.rs:4:5 | LL | struct Bar(u32); - | - `foo::Bar` declared as private + | - `Bar` declared as private LL | LL | pub fn bar() -> Bar { | ^^^^^^^^^^^^^^^^^^^ can't leak private type diff --git a/src/test/ui/error-codes/E0451.stderr b/src/test/ui/error-codes/E0451.stderr index bb92c23e0f6..419cf117efe 100644 --- a/src/test/ui/error-codes/E0451.stderr +++ b/src/test/ui/error-codes/E0451.stderr @@ -1,10 +1,10 @@ -error[E0451]: field `b` of struct `bar::Foo` is private +error[E0451]: field `b` of struct `Foo` is private --> $DIR/E0451.rs:14:21 | LL | let bar::Foo{a, b} = foo; | ^ private field -error[E0451]: field `b` of struct `bar::Foo` is private +error[E0451]: field `b` of struct `Foo` is private --> $DIR/E0451.rs:18:29 | LL | let f = bar::Foo{ a: 0, b: 0 }; diff --git a/src/test/ui/error-codes/E0507.stderr b/src/test/ui/error-codes/E0507.stderr index 170b8831911..cd5e467944b 100644 --- a/src/test/ui/error-codes/E0507.stderr +++ b/src/test/ui/error-codes/E0507.stderr @@ -1,4 +1,4 @@ -error[E0507]: cannot move out of dereference of `std::cell::Ref<'_, TheDarkKnight>` +error[E0507]: cannot move out of dereference of `Ref<'_, TheDarkKnight>` --> $DIR/E0507.rs:12:5 | LL | x.borrow().nothing_is_true(); diff --git a/src/test/ui/error-codes/E0605.stderr b/src/test/ui/error-codes/E0605.stderr index f23d2008e0b..43269c095d6 100644 --- a/src/test/ui/error-codes/E0605.stderr +++ b/src/test/ui/error-codes/E0605.stderr @@ -1,4 +1,4 @@ -error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` +error[E0605]: non-primitive cast: `u8` as `Vec` --> $DIR/E0605.rs:3:5 | LL | x as Vec; diff --git a/src/test/ui/error-codes/E0616.stderr b/src/test/ui/error-codes/E0616.stderr index 422bf687e7b..da349ed2fde 100644 --- a/src/test/ui/error-codes/E0616.stderr +++ b/src/test/ui/error-codes/E0616.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `x` of struct `a::Foo` is private +error[E0616]: field `x` of struct `Foo` is private --> $DIR/E0616.rs:13:7 | LL | f.x; diff --git a/src/test/ui/error-codes/E0719.stderr b/src/test/ui/error-codes/E0719.stderr index 0e4bbf083ba..b342d634334 100644 --- a/src/test/ui/error-codes/E0719.stderr +++ b/src/test/ui/error-codes/E0719.stderr @@ -1,4 +1,4 @@ -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/E0719.rs:1:33 | LL | trait Foo: Iterator {} @@ -6,7 +6,7 @@ LL | trait Foo: Iterator {} | | | `Item` bound here first -error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified --> $DIR/E0719.rs:6:42 | LL | fn test() -> Box> { diff --git a/src/test/ui/error-codes/e0119/complex-impl.stderr b/src/test/ui/error-codes/e0119/complex-impl.stderr index 2cc09e8b147..b7795c26a99 100644 --- a/src/test/ui/error-codes/e0119/complex-impl.stderr +++ b/src/test/ui/error-codes/e0119/complex-impl.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `complex_impl_support::External` for type `(Q, complex_impl_support::M<'_, '_, '_, std::boxed::Box<_>, _, _>)`: +error[E0119]: conflicting implementations of trait `External` for type `(Q, M<'_, '_, '_, Box<_>, _, _>)`: --> $DIR/complex-impl.rs:9:1 | LL | impl External for (Q, R) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `complex_impl_support`: - - impl<'a, 'b, 'c, T, U, V, W> complex_impl_support::External for (T, complex_impl_support::M<'a, 'b, 'c, std::boxed::Box, V, W>) - where >::Output == V, ::Item == T, 'b: 'a, T: 'a, U: std::ops::FnOnce<(T,)>, U: 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, ::Output: std::marker::Copy; + - impl<'a, 'b, 'c, T, U, V, W> External for (T, M<'a, 'b, 'c, Box, V, W>) + where >::Output == V, ::Item == T, 'b: 'a, T: 'a, U: FnOnce<(T,)>, U: 'static, V: Iterator, V: Clone, W: Add, ::Output: Copy; error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/complex-impl.rs:9:1 diff --git a/src/test/ui/error-codes/e0119/conflict-with-std.stderr b/src/test/ui/error-codes/e0119/conflict-with-std.stderr index 3e0c71e9074..e1b15ba68bd 100644 --- a/src/test/ui/error-codes/e0119/conflict-with-std.stderr +++ b/src/test/ui/error-codes/e0119/conflict-with-std.stderr @@ -1,31 +1,31 @@ -error[E0119]: conflicting implementations of trait `std::convert::AsRef` for type `std::boxed::Box`: +error[E0119]: conflicting implementations of trait `AsRef` for type `Box`: --> $DIR/conflict-with-std.rs:5:1 | LL | impl AsRef for Box { | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `alloc`: - - impl std::convert::AsRef for std::boxed::Box + - impl AsRef for Box where T: ?Sized; -error[E0119]: conflicting implementations of trait `std::convert::From` for type `S`: +error[E0119]: conflicting implementations of trait `From` for type `S`: --> $DIR/conflict-with-std.rs:12:1 | LL | impl From for S { | ^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::convert::From for T; + - impl From for T; -error[E0119]: conflicting implementations of trait `std::convert::TryFrom` for type `X`: +error[E0119]: conflicting implementations of trait `TryFrom` for type `X`: --> $DIR/conflict-with-std.rs:19:1 | LL | impl TryFrom for X { | ^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::convert::TryFrom for T - where U: std::convert::Into; + - impl TryFrom for T + where U: Into; error: aborting due to 3 previous errors diff --git a/src/test/ui/error-codes/e0119/issue-23563.stderr b/src/test/ui/error-codes/e0119/issue-23563.stderr index 8011689880d..34ce66576a0 100644 --- a/src/test/ui/error-codes/e0119/issue-23563.stderr +++ b/src/test/ui/error-codes/e0119/issue-23563.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `a::LolFrom<&[_]>` for type `LocalType<_>`: +error[E0119]: conflicting implementations of trait `LolFrom<&[_]>` for type `LocalType<_>`: --> $DIR/issue-23563.rs:13:1 | LL | impl<'a, T> LolFrom<&'a [T]> for LocalType { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `issue_23563_a`: - - impl a::LolFrom for U - where T: a::LolInto; + - impl LolFrom for U + where T: LolInto; error: aborting due to previous error diff --git a/src/test/ui/error-codes/e0119/issue-27403.stderr b/src/test/ui/error-codes/e0119/issue-27403.stderr index cba10432a93..524b2f207a3 100644 --- a/src/test/ui/error-codes/e0119/issue-27403.stderr +++ b/src/test/ui/error-codes/e0119/issue-27403.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`: +error[E0119]: conflicting implementations of trait `Into<_>` for type `GenX<_>`: --> $DIR/issue-27403.rs:5:1 | LL | impl Into for GenX { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::convert::Into for T - where U: std::convert::From; + - impl Into for T + where U: From; error: aborting due to previous error diff --git a/src/test/ui/error-codes/e0119/issue-28981.stderr b/src/test/ui/error-codes/e0119/issue-28981.stderr index 2a78cc8b2db..fba28b19a72 100644 --- a/src/test/ui/error-codes/e0119/issue-28981.stderr +++ b/src/test/ui/error-codes/e0119/issue-28981.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `std::ops::Deref` for type `&_`: +error[E0119]: conflicting implementations of trait `Deref` for type `&_`: --> $DIR/issue-28981.rs:5:1 | LL | impl Deref for Foo { } | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::ops::Deref for &T + - impl Deref for &T where T: ?Sized; error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g., `MyStruct`) diff --git a/src/test/ui/error-codes/e0119/so-37347311.stderr b/src/test/ui/error-codes/e0119/so-37347311.stderr index f2166de71f8..6de915b0667 100644 --- a/src/test/ui/error-codes/e0119/so-37347311.stderr +++ b/src/test/ui/error-codes/e0119/so-37347311.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `std::convert::From>` for type `MyError<_>`: +error[E0119]: conflicting implementations of trait `From>` for type `MyError<_>`: --> $DIR/so-37347311.rs:11:1 | LL | impl From for MyError { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::convert::From for T; + - impl From for T; error: aborting due to previous error diff --git a/src/test/ui/error-codes/ex-E0611.rs b/src/test/ui/error-codes/ex-E0611.rs index 8460341c44e..f18a3619f31 100644 --- a/src/test/ui/error-codes/ex-E0611.rs +++ b/src/test/ui/error-codes/ex-E0611.rs @@ -8,5 +8,5 @@ mod a { fn main() { let y = a::Foo::new(); - y.0; //~ ERROR field `0` of struct `a::Foo` is private + y.0; //~ ERROR field `0` of struct `Foo` is private } diff --git a/src/test/ui/error-codes/ex-E0611.stderr b/src/test/ui/error-codes/ex-E0611.stderr index 2d22bb39514..1da7b33be9d 100644 --- a/src/test/ui/error-codes/ex-E0611.stderr +++ b/src/test/ui/error-codes/ex-E0611.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `0` of struct `a::Foo` is private +error[E0616]: field `0` of struct `Foo` is private --> $DIR/ex-E0611.rs:11:6 | LL | y.0; diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index 905195d4ad9..89a9d965de2 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -44,7 +44,7 @@ error[E0604]: only `u8` can be cast as `char`, not `u32` LL | 0u32 as char; | ^^^^^^^^^^^^ invalid cast -error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` +error[E0605]: non-primitive cast: `u8` as `Vec` --> $DIR/error-festival.rs:29:5 | LL | x as Vec; diff --git a/src/test/ui/error-should-say-copy-not-pod.rs b/src/test/ui/error-should-say-copy-not-pod.rs index be4e451ceb1..40c4730ef69 100644 --- a/src/test/ui/error-should-say-copy-not-pod.rs +++ b/src/test/ui/error-should-say-copy-not-pod.rs @@ -3,5 +3,5 @@ fn check_bound(_: T) {} fn main() { - check_bound("nocopy".to_string()); //~ ERROR : std::marker::Copy` is not satisfied + check_bound("nocopy".to_string()); //~ ERROR : Copy` is not satisfied } diff --git a/src/test/ui/error-should-say-copy-not-pod.stderr b/src/test/ui/error-should-say-copy-not-pod.stderr index 96ffa6f3e06..346e882485e 100644 --- a/src/test/ui/error-should-say-copy-not-pod.stderr +++ b/src/test/ui/error-should-say-copy-not-pod.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/error-should-say-copy-not-pod.rs:6:17 | LL | fn check_bound(_: T) {} | ---- required by this bound in `check_bound` ... LL | check_bound("nocopy".to_string()); - | ^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` error: aborting due to previous error diff --git a/src/test/ui/estr-subtyping.stderr b/src/test/ui/estr-subtyping.stderr index e5dbab6441c..268ec63a80d 100644 --- a/src/test/ui/estr-subtyping.stderr +++ b/src/test/ui/estr-subtyping.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | wants_uniq(x); | ^ | | - | expected struct `std::string::String`, found `&str` + | expected struct `String`, found `&str` | help: try using a conversion method: `x.to_string()` error: aborting due to previous error diff --git a/src/test/ui/explore-issue-38412.stderr b/src/test/ui/explore-issue-38412.stderr index 1855c0b1437..55f43840b9a 100644 --- a/src/test/ui/explore-issue-38412.stderr +++ b/src/test/ui/explore-issue-38412.stderr @@ -16,19 +16,19 @@ LL | r.a_unstable_undeclared_pub; = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable -error[E0616]: field `b_crate` of struct `pub_and_stability::Record` is private +error[E0616]: field `b_crate` of struct `Record` is private --> $DIR/explore-issue-38412.rs:31:7 | LL | r.b_crate; | ^^^^^^^ private field -error[E0616]: field `c_mod` of struct `pub_and_stability::Record` is private +error[E0616]: field `c_mod` of struct `Record` is private --> $DIR/explore-issue-38412.rs:32:7 | LL | r.c_mod; | ^^^^^ private field -error[E0616]: field `d_priv` of struct `pub_and_stability::Record` is private +error[E0616]: field `d_priv` of struct `Record` is private --> $DIR/explore-issue-38412.rs:33:7 | LL | r.d_priv; @@ -43,19 +43,19 @@ LL | t.2; = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable -error[E0616]: field `3` of struct `pub_and_stability::Tuple` is private +error[E0616]: field `3` of struct `Tuple` is private --> $DIR/explore-issue-38412.rs:38:7 | LL | t.3; | ^ private field -error[E0616]: field `4` of struct `pub_and_stability::Tuple` is private +error[E0616]: field `4` of struct `Tuple` is private --> $DIR/explore-issue-38412.rs:39:7 | LL | t.4; | ^ private field -error[E0616]: field `5` of struct `pub_and_stability::Tuple` is private +error[E0616]: field `5` of struct `Tuple` is private --> $DIR/explore-issue-38412.rs:40:7 | LL | t.5; diff --git a/src/test/ui/extern-flag/public-and-private.stderr b/src/test/ui/extern-flag/public-and-private.stderr index 94c7deaa80d..9dfc10effcf 100644 --- a/src/test/ui/extern-flag/public-and-private.stderr +++ b/src/test/ui/extern-flag/public-and-private.stderr @@ -1,4 +1,4 @@ -error: type `somedep::S` from private dependency 'somedep' in public interface +error: type `S` from private dependency 'somedep' in public interface --> $DIR/public-and-private.rs:10:5 | LL | pub field: somedep::S, diff --git a/src/test/ui/extern/extern-types-not-sync-send.stderr b/src/test/ui/extern/extern-types-not-sync-send.stderr index a1138c32344..dc9810cfcf9 100644 --- a/src/test/ui/extern/extern-types-not-sync-send.stderr +++ b/src/test/ui/extern/extern-types-not-sync-send.stderr @@ -7,7 +7,7 @@ LL | fn assert_sync() { } LL | assert_sync::(); | ^ `A` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `A` + = help: the trait `Sync` is not implemented for `A` error[E0277]: `A` cannot be sent between threads safely --> $DIR/extern-types-not-sync-send.rs:16:19 @@ -18,7 +18,7 @@ LL | fn assert_send() { } LL | assert_send::(); | ^ `A` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `A` + = help: the trait `Send` is not implemented for `A` error: aborting due to 2 previous errors diff --git a/src/test/ui/extern/extern-types-unsized.stderr b/src/test/ui/extern/extern-types-unsized.stderr index 8938afd33ff..fba919ceff9 100644 --- a/src/test/ui/extern/extern-types-unsized.stderr +++ b/src/test/ui/extern/extern-types-unsized.stderr @@ -7,7 +7,7 @@ LL | fn assert_sized() { } LL | assert_sized::(); | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `A` + = help: the trait `Sized` is not implemented for `A` help: consider relaxing the implicit `Sized` restriction | LL | fn assert_sized() { } @@ -22,7 +22,7 @@ LL | fn assert_sized() { } LL | assert_sized::(); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `Foo`, the trait `std::marker::Sized` is not implemented for `A` + = help: within `Foo`, the trait `Sized` is not implemented for `A` = note: required because it appears within the type `Foo` help: consider relaxing the implicit `Sized` restriction | @@ -38,7 +38,7 @@ LL | fn assert_sized() { } LL | assert_sized::>(); | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `Bar`, the trait `std::marker::Sized` is not implemented for `A` + = help: within `Bar`, the trait `Sized` is not implemented for `A` = note: required because it appears within the type `Bar` help: consider relaxing the implicit `Sized` restriction | @@ -54,7 +54,7 @@ LL | fn assert_sized() { } LL | assert_sized::>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `Bar>`, the trait `std::marker::Sized` is not implemented for `A` + = help: within `Bar>`, the trait `Sized` is not implemented for `A` = note: required because it appears within the type `Bar` = note: required because it appears within the type `Bar>` help: consider relaxing the implicit `Sized` restriction diff --git a/src/test/ui/extern/extern-wrong-value-type.rs b/src/test/ui/extern/extern-wrong-value-type.rs index aba52427eb0..a4d7b00b1c6 100644 --- a/src/test/ui/extern/extern-wrong-value-type.rs +++ b/src/test/ui/extern/extern-wrong-value-type.rs @@ -7,5 +7,5 @@ fn main() { // extern functions are extern "C" fn let _x: extern "C" fn() = f; // OK is_fn(f); - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `extern "C" fn() {f}` + //~^ ERROR expected a `Fn<()>` closure, found `extern "C" fn() {f}` } diff --git a/src/test/ui/extern/extern-wrong-value-type.stderr b/src/test/ui/extern/extern-wrong-value-type.stderr index 2cb15f84f69..d92b5f43110 100644 --- a/src/test/ui/extern/extern-wrong-value-type.stderr +++ b/src/test/ui/extern/extern-wrong-value-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: expected a `std::ops::Fn<()>` closure, found `extern "C" fn() {f}` +error[E0277]: expected a `Fn<()>` closure, found `extern "C" fn() {f}` --> $DIR/extern-wrong-value-type.rs:9:11 | LL | fn is_fn(_: F) where F: Fn() {} @@ -7,7 +7,7 @@ LL | fn is_fn(_: F) where F: Fn() {} LL | is_fn(f); | ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}` | - = help: the trait `std::ops::Fn<()>` is not implemented for `extern "C" fn() {f}` + = help: the trait `Fn<()>` is not implemented for `extern "C" fn() {f}` = note: wrap the `extern "C" fn() {f}` in a closure with no arguments: `|| { /* code */ }` error: aborting due to previous error diff --git a/src/test/ui/extern/issue-36122-accessing-externed-dst.stderr b/src/test/ui/extern/issue-36122-accessing-externed-dst.stderr index 5a58e57d36c..5f78775f540 100644 --- a/src/test/ui/extern/issue-36122-accessing-externed-dst.stderr +++ b/src/test/ui/extern/issue-36122-accessing-externed-dst.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[usize]` cannot be known at compilati LL | static symbol: [usize]; | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[usize]` + = help: the trait `Sized` is not implemented for `[usize]` error: aborting due to previous error diff --git a/src/test/ui/fat-ptr-cast.stderr b/src/test/ui/fat-ptr-cast.stderr index 56d5a26beb0..0b0c288fe3b 100644 --- a/src/test/ui/fat-ptr-cast.stderr +++ b/src/test/ui/fat-ptr-cast.stderr @@ -30,7 +30,7 @@ LL | a as u32; | = help: cast through a raw pointer first -error[E0605]: non-primitive cast: `std::boxed::Box<[i32]>` as `usize` +error[E0605]: non-primitive cast: `Box<[i32]>` as `usize` --> $DIR/fat-ptr-cast.rs:14:5 | LL | b as usize; diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.rs b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.rs index 6e0b71bc1ee..47ca7e34975 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.rs +++ b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.rs @@ -23,7 +23,7 @@ impl Foo for Bar { } impl Bar { - fn bar(self: Box>) {} //~ ERROR `std::boxed::Box>` cannot be used as the + fn bar(self: Box>) {} //~ ERROR `Box>` cannot be used as the } fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr index f5d74d7a840..a06c4b2b483 100644 --- a/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr +++ b/src/test/ui/feature-gates/feature-gate-arbitrary-self-types.stderr @@ -18,7 +18,7 @@ LL | fn foo(self: Ptr) {} = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) -error[E0658]: `std::boxed::Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature +error[E0658]: `Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature --> $DIR/feature-gate-arbitrary-self-types.rs:26:18 | LL | fn bar(self: Box>) {} diff --git a/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.rs b/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.rs index c3c554d7d27..5ed302bbff3 100644 --- a/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.rs +++ b/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.rs @@ -1,4 +1,3 @@ -// ignore-tidy-linelength #![allow(warnings)] struct Bar; @@ -6,13 +5,13 @@ struct Bar; // This function would compile with the feature gate, and tests that it is suggested. fn foo() { let arr: [Option; 2] = [None::; 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Option: Copy` is not satisfied [E0277] } // This function would not compile with the feature gate, and tests that it is not suggested. fn bar() { let arr: [Option; 2] = [Some("foo".to_string()); 2]; - //~^ ERROR the trait bound `std::option::Option: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Option: Copy` is not satisfied [E0277] } fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr b/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr index 67721780682..ca1706169af 100644 --- a/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr +++ b/src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.stderr @@ -1,23 +1,23 @@ -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied - --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:8:36 +error[E0277]: the trait bound `Option: Copy` is not satisfied + --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:7:36 | LL | let arr: [Option; 2] = [None::; 2]; - | ^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied = note: this array initializer can be evaluated at compile-time, see issue #49147 for more information = help: add `#![feature(const_in_array_repeat_expressions)]` to the crate attributes to enable -error[E0277]: the trait bound `std::option::Option: std::marker::Copy` is not satisfied - --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:14:36 +error[E0277]: the trait bound `Option: Copy` is not satisfied + --> $DIR/feature-gate-const_in_array_repeat_expressions.rs:13:36 | LL | let arr: [Option; 2] = [Some("foo".to_string()); 2]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::option::Option` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Option` | = help: the following implementations were found: - as std::marker::Copy> + as Copy> = note: the `Copy` trait is required because the repeated element will be copied error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr index d4c09ec40fd..f3fa6412095 100644 --- a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr +++ b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr @@ -64,13 +64,13 @@ LL | | } = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `std::string::String: std::ops::Neg` is not satisfied +error[E0277]: the trait bound `String: Neg` is not satisfied --> $DIR/feature-gate-trivial_bounds.rs:36:1 | LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg { LL | | -s LL | | } - | |_^ the trait `std::ops::Neg` is not implemented for `std::string::String` + | |_^ the trait `Neg` is not implemented for `String` | = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -83,7 +83,7 @@ LL | | for _ in 2i32 {} LL | | } | |_^ `i32` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `i32` + = help: the trait `Iterator` is not implemented for `i32` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -94,7 +94,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | struct TwoStrs(str, str) where str: Sized; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -106,7 +106,7 @@ LL | | let x: Dst = *(Box::new(Dst { x: 1 }) as Box>); LL | | } | |_^ doesn't have a size known at compile-time | - = help: within `Dst<(dyn A + 'static)>`, the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)` + = help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)` = note: required because it appears within the type `Dst<(dyn A + 'static)>` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -119,7 +119,7 @@ LL | | *"Sized".to_string().into_boxed_str() LL | | } | |_^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable diff --git a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr index 0195cc1481e..29595c92376 100644 --- a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr +++ b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr @@ -1,10 +1,10 @@ -error[E0277]: the size for values of type `(dyn std::ops::FnOnce() + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn FnOnce() + 'static)` cannot be known at compilation time --> $DIR/feature-gate-unsized_locals.rs:1:6 | LL | fn f(f: dyn FnOnce()) {} | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::FnOnce() + 'static)` + = help: the trait `Sized` is not implemented for `(dyn FnOnce() + 'static)` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/fmt/send-sync.stderr b/src/test/ui/fmt/send-sync.stderr index b3b53971a37..780c71128d4 100644 --- a/src/test/ui/fmt/send-sync.stderr +++ b/src/test/ui/fmt/send-sync.stderr @@ -7,12 +7,12 @@ LL | fn send(_: T) {} LL | send(format_args!("{:?}", c)); | ^^^^ `core::fmt::Opaque` cannot be shared between threads safely | - = help: within `[std::fmt::ArgumentV1<'_>]`, the trait `std::marker::Sync` is not implemented for `core::fmt::Opaque` + = help: within `[ArgumentV1<'_>]`, the trait `Sync` is not implemented for `core::fmt::Opaque` = note: required because it appears within the type `&core::fmt::Opaque` - = note: required because it appears within the type `std::fmt::ArgumentV1<'_>` - = note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]` - = note: required because of the requirements on the impl of `std::marker::Send` for `&[std::fmt::ArgumentV1<'_>]` - = note: required because it appears within the type `std::fmt::Arguments<'_>` + = note: required because it appears within the type `ArgumentV1<'_>` + = note: required because it appears within the type `[ArgumentV1<'_>]` + = note: required because of the requirements on the impl of `Send` for `&[ArgumentV1<'_>]` + = note: required because it appears within the type `Arguments<'_>` error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely --> $DIR/send-sync.rs:9:5 @@ -23,12 +23,12 @@ LL | fn sync(_: T) {} LL | sync(format_args!("{:?}", c)); | ^^^^ `core::fmt::Opaque` cannot be shared between threads safely | - = help: within `std::fmt::Arguments<'_>`, the trait `std::marker::Sync` is not implemented for `core::fmt::Opaque` + = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::Opaque` = note: required because it appears within the type `&core::fmt::Opaque` - = note: required because it appears within the type `std::fmt::ArgumentV1<'_>` - = note: required because it appears within the type `[std::fmt::ArgumentV1<'_>]` - = note: required because it appears within the type `&[std::fmt::ArgumentV1<'_>]` - = note: required because it appears within the type `std::fmt::Arguments<'_>` + = note: required because it appears within the type `ArgumentV1<'_>` + = note: required because it appears within the type `[ArgumentV1<'_>]` + = note: required because it appears within the type `&[ArgumentV1<'_>]` + = note: required because it appears within the type `Arguments<'_>` error: aborting due to 2 previous errors diff --git a/src/test/ui/fn/fn-compare-mismatch.stderr b/src/test/ui/fn/fn-compare-mismatch.stderr index fa74d027f1e..326418ecbf9 100644 --- a/src/test/ui/fn/fn-compare-mismatch.stderr +++ b/src/test/ui/fn/fn-compare-mismatch.stderr @@ -1,10 +1,10 @@ -error[E0369]: binary operation `==` cannot be applied to type `fn() {main::f}` +error[E0369]: binary operation `==` cannot be applied to type `fn() {f}` --> $DIR/fn-compare-mismatch.rs:4:15 | LL | let x = f == g; - | - ^^ - fn() {main::g} + | - ^^ - fn() {g} | | - | fn() {main::f} + | fn() {f} | help: you might have forgotten to call this function | @@ -21,8 +21,8 @@ error[E0308]: mismatched types LL | let x = f == g; | ^ expected fn item, found a different fn item | - = note: expected fn item `fn() {main::f}` - found fn item `fn() {main::g}` + = note: expected fn item `fn() {f}` + found fn item `fn() {g}` error: aborting due to 2 previous errors diff --git a/src/test/ui/fn/fn-item-type.rs b/src/test/ui/fn/fn-item-type.rs index abae40162a0..415e87b42fa 100644 --- a/src/test/ui/fn/fn-item-type.rs +++ b/src/test/ui/fn/fn-item-type.rs @@ -28,9 +28,9 @@ fn main() { eq(bar::, bar::>); //~^ ERROR mismatched types - //~| expected fn item `fn(_) -> _ {bar::}` - //~| found fn item `fn(_) -> _ {bar::>}` - //~| expected struct `std::string::String`, found struct `std::vec::Vec` + //~| expected fn item `fn(_) -> _ {bar::}` + //~| found fn item `fn(_) -> _ {bar::>}` + //~| expected struct `String`, found struct `Vec` //~| different `fn` items always have unique types, even if their signatures are the same //~| change the expected type to be function pointer //~| if the expected type is due to type inference, cast the expected `fn` to a function pointer diff --git a/src/test/ui/fn/fn-item-type.stderr b/src/test/ui/fn/fn-item-type.stderr index bfa9efa219f..4bd51a668a6 100644 --- a/src/test/ui/fn/fn-item-type.stderr +++ b/src/test/ui/fn/fn-item-type.stderr @@ -26,13 +26,13 @@ error[E0308]: mismatched types --> $DIR/fn-item-type.rs:29:23 | LL | eq(bar::, bar::>); - | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `std::vec::Vec` + | ^^^^^^^^^^^^^^ expected struct `String`, found struct `Vec` | - = note: expected fn item `fn(_) -> _ {bar::}` - found fn item `fn(_) -> _ {bar::>}` + = note: expected fn item `fn(_) -> _ {bar::}` + found fn item `fn(_) -> _ {bar::>}` = note: different `fn` items always have unique types, even if their signatures are the same = help: change the expected type to be function pointer `fn(isize) -> isize` - = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `bar:: as fn(isize) -> isize` + = help: if the expected type is due to type inference, cast the expected `fn` to a function pointer: `bar:: as fn(isize) -> isize` error[E0308]: mismatched types --> $DIR/fn-item-type.rs:39:26 diff --git a/src/test/ui/fn/fn-trait-formatting.rs b/src/test/ui/fn/fn-trait-formatting.rs index 63ab8e88e44..0c389e1dc57 100644 --- a/src/test/ui/fn/fn-trait-formatting.rs +++ b/src/test/ui/fn/fn-trait-formatting.rs @@ -6,16 +6,16 @@ fn main() { let _: () = (box |_: isize| {}) as Box; //~^ ERROR mismatched types //~| expected unit type `()` - //~| found struct `std::boxed::Box` + //~| found struct `Box` let _: () = (box |_: isize, isize| {}) as Box; //~^ ERROR mismatched types //~| expected unit type `()` - //~| found struct `std::boxed::Box` + //~| found struct `Box` let _: () = (box || -> isize { unimplemented!() }) as Box isize>; //~^ ERROR mismatched types //~| expected unit type `()` - //~| found struct `std::boxed::Box isize>` + //~| found struct `Box isize>` needs_fn(1); - //~^ ERROR expected a `std::ops::Fn<(isize,)>` closure, found `{integer}` + //~^ ERROR expected a `Fn<(isize,)>` closure, found `{integer}` } diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr index e3ada4f6bae..5b63b8e2285 100644 --- a/src/test/ui/fn/fn-trait-formatting.stderr +++ b/src/test/ui/fn/fn-trait-formatting.stderr @@ -2,36 +2,36 @@ error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:6:17 | LL | let _: () = (box |_: isize| {}) as Box; - | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box` + | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Box` | | | expected due to this | = note: expected unit type `()` - found struct `std::boxed::Box` + found struct `Box` error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:10:17 | LL | let _: () = (box |_: isize, isize| {}) as Box; - | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box` + | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Box` | | | expected due to this | = note: expected unit type `()` - found struct `std::boxed::Box` + found struct `Box` error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:14:17 | LL | let _: () = (box || -> isize { unimplemented!() }) as Box isize>; - | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box` + | -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Box` | | | expected due to this | = note: expected unit type `()` - found struct `std::boxed::Box isize>` + found struct `Box isize>` -error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}` +error[E0277]: expected a `Fn<(isize,)>` closure, found `{integer}` --> $DIR/fn-trait-formatting.rs:19:14 | LL | fn needs_fn(x: F) where F: Fn(isize) -> isize {} @@ -40,7 +40,7 @@ LL | fn needs_fn(x: F) where F: Fn(isize) -> isize {} LL | needs_fn(1); | ^ expected an `Fn<(isize,)>` closure, found `{integer}` | - = help: the trait `std::ops::Fn<(isize,)>` is not implemented for `{integer}` + = help: the trait `Fn<(isize,)>` is not implemented for `{integer}` error: aborting due to 4 previous errors diff --git a/src/test/ui/for/for-c-in-str.rs b/src/test/ui/for/for-c-in-str.rs index 1871cf9d238..df66127c604 100644 --- a/src/test/ui/for/for-c-in-str.rs +++ b/src/test/ui/for/for-c-in-str.rs @@ -4,8 +4,8 @@ fn main() { for c in "asdf" { //~^ ERROR `&str` is not an iterator //~| NOTE `&str` is not an iterator - //~| HELP the trait `std::iter::Iterator` is not implemented for `&str` - //~| NOTE required by `std::iter::IntoIterator::into_iter` + //~| HELP the trait `Iterator` is not implemented for `&str` + //~| NOTE required by `into_iter` //~| NOTE in this expansion of desugaring of `for` loop //~| NOTE in this expansion of desugaring of `for` loop //~| NOTE in this expansion of desugaring of `for` loop diff --git a/src/test/ui/for/for-c-in-str.stderr b/src/test/ui/for/for-c-in-str.stderr index 9185399804d..b0f959ba027 100644 --- a/src/test/ui/for/for-c-in-str.stderr +++ b/src/test/ui/for/for-c-in-str.stderr @@ -4,8 +4,8 @@ error[E0277]: `&str` is not an iterator LL | for c in "asdf" { | ^^^^^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()` | - = help: the trait `std::iter::Iterator` is not implemented for `&str` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `&str` + = note: required by `into_iter` error: aborting due to previous error diff --git a/src/test/ui/for/for-loop-bogosity.stderr b/src/test/ui/for/for-loop-bogosity.stderr index fe6ac529b43..ccacd655a14 100644 --- a/src/test/ui/for/for-loop-bogosity.stderr +++ b/src/test/ui/for/for-loop-bogosity.stderr @@ -4,8 +4,8 @@ error[E0277]: `MyStruct` is not an iterator LL | for x in bogus { | ^^^^^ `MyStruct` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `MyStruct` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `MyStruct` + = note: required by `into_iter` error: aborting due to previous error diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs index b4f9a38ff35..1c6b9805b51 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs @@ -4,7 +4,7 @@ fn main() { let x: Option; x = 5; //~^ ERROR mismatched types - //~| expected enum `std::option::Option` + //~| expected enum `Option` //~| found type `{integer}` - //~| expected enum `std::option::Option`, found integer + //~| expected enum `Option`, found integer } diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr index 6a550b93be2..b5018b47b7b 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | x = 5; | ^ | | - | expected enum `std::option::Option`, found integer + | expected enum `Option`, found integer | help: try using a variant of the expected enum: `Some(5)` | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found type `{integer}` error: aborting due to previous error diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs index 30cb3ee48e7..2486ae009c1 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs @@ -5,9 +5,9 @@ use std::option::Option; fn bar(x: usize) -> Option { return x; //~^ ERROR mismatched types - //~| expected enum `std::option::Option` + //~| expected enum `Option` //~| found type `usize` - //~| expected enum `std::option::Option`, found `usize` + //~| expected enum `Option`, found `usize` } fn main() { diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr index ca61fb0c171..b9574e39758 100644 --- a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr +++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr @@ -2,14 +2,14 @@ error[E0308]: mismatched types --> $DIR/fully-qualified-type-name4.rs:6:12 | LL | fn bar(x: usize) -> Option { - | ------------- expected `std::option::Option` because of return type + | ------------- expected `Option` because of return type LL | return x; | ^ | | - | expected enum `std::option::Option`, found `usize` + | expected enum `Option`, found `usize` | help: try using a variant of the expected enum: `Some(x)` | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found type `usize` error: aborting due to previous error diff --git a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr index 635f83bbf48..45cdd3d2ddc 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr +++ b/src/test/ui/functional-struct-update/functional-struct-update-noncopyable.stderr @@ -5,7 +5,7 @@ LL | let _b = A { y: Arc::new(3), ..a }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | | | cannot move out of here - | move occurs because `a.x` has type `std::sync::Arc`, which does not implement the `Copy` trait + | move occurs because `a.x` has type `Arc`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.rs b/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.rs index 7ae53020fe0..500633edf12 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.rs +++ b/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.rs @@ -26,7 +26,7 @@ mod foo { fn main() { let s_1 = foo::make_secrets(3, format!("ess one")); let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ... - //~^ ERROR field `secret_uid` of struct `foo::S` is private + //~^ ERROR field `secret_uid` of struct `S` is private println!("main forged an S named: {}", s_2.b); // at end of scope, ... both s_1 *and* s_2 get dropped. Boom! } diff --git a/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr b/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr index 2aeffc3e5e4..0b8af90b418 100644 --- a/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr +++ b/src/test/ui/functional-struct-update/functional-struct-update-respects-privacy.stderr @@ -1,4 +1,4 @@ -error[E0451]: field `secret_uid` of struct `foo::S` is private +error[E0451]: field `secret_uid` of struct `S` is private --> $DIR/functional-struct-update-respects-privacy.rs:28:49 | LL | let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ... diff --git a/src/test/ui/generator/generator-yielding-or-returning-itself.stderr b/src/test/ui/generator/generator-yielding-or-returning-itself.stderr index 9699abd5661..16a5ab2cc86 100644 --- a/src/test/ui/generator/generator-yielding-or-returning-itself.stderr +++ b/src/test/ui/generator/generator-yielding-or-returning-itself.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _] as std::ops::Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _]` +error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _] as Generator>::Return == [generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 19:6 _]` --> $DIR/generator-yielding-or-returning-itself.rs:15:5 | LL | pub fn want_cyclic_generator_return(_: T) @@ -14,7 +14,7 @@ LL | want_cyclic_generator_return(|| { see issue #46062 for more information -error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _] as std::ops::Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _]` +error[E0271]: type mismatch resolving `<[generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _] as Generator>::Yield == [generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 32:6 _]` --> $DIR/generator-yielding-or-returning-itself.rs:28:5 | LL | pub fn want_cyclic_generator_yield(_: T) diff --git a/src/test/ui/generator/issue-68112.rs b/src/test/ui/generator/issue-68112.rs index 9ab2abf7405..feb07c9bf88 100644 --- a/src/test/ui/generator/issue-68112.rs +++ b/src/test/ui/generator/issue-68112.rs @@ -50,7 +50,7 @@ fn test2() { yield; }; require_send(send_gen); - //~^ ERROR `std::cell::RefCell` cannot be shared between threads safely + //~^ ERROR `RefCell` cannot be shared between threads safely } fn main() {} diff --git a/src/test/ui/generator/issue-68112.stderr b/src/test/ui/generator/issue-68112.stderr index 83536f2af14..84d2a854a4b 100644 --- a/src/test/ui/generator/issue-68112.stderr +++ b/src/test/ui/generator/issue-68112.stderr @@ -7,33 +7,33 @@ LL | fn require_send(_: impl Send) {} LL | require_send(send_gen); | ^^^^^^^^^^^^ generator is not `Send` | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` + = help: the trait `Sync` is not implemented for `RefCell` note: generator is not `Send` as this value is used across a yield --> $DIR/issue-68112.rs:31:9 | LL | let _non_send_gen = make_non_send_generator(); - | ------------- has type `impl std::ops::Generator` which is not `Send` + | ------------- has type `impl Generator` which is not `Send` LL | yield; | ^^^^^ yield occurs here, with `_non_send_gen` maybe used later LL | }; | - `_non_send_gen` is later dropped here -error[E0277]: `std::cell::RefCell` cannot be shared between threads safely +error[E0277]: `RefCell` cannot be shared between threads safely --> $DIR/issue-68112.rs:52:5 | LL | fn require_send(_: impl Send) {} | ---- required by this bound in `require_send` ... LL | require_send(send_gen); - | ^^^^^^^^^^^^ `std::cell::RefCell` cannot be shared between threads safely + | ^^^^^^^^^^^^ `RefCell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc>` - = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:38:5: 41:6 t:std::sync::Arc> {()}]` - = note: required because it appears within the type `impl std::ops::Generator` - = note: required because it appears within the type `impl std::ops::Generator` - = note: required because it appears within the type `{impl std::ops::Generator, ()}` - = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:48:20: 51:6 {impl std::ops::Generator, ()}]` + = help: the trait `Sync` is not implemented for `RefCell` + = note: required because of the requirements on the impl of `Send` for `Arc>` + = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:38:5: 41:6 t:Arc> {()}]` + = note: required because it appears within the type `impl Generator` + = note: required because it appears within the type `impl Generator` + = note: required because it appears within the type `{impl Generator, ()}` + = note: required because it appears within the type `[generator@$DIR/issue-68112.rs:48:20: 51:6 {impl Generator, ()}]` error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/not-send-sync.stderr b/src/test/ui/generator/not-send-sync.stderr index 5df2c1b52fb..32527c45c35 100644 --- a/src/test/ui/generator/not-send-sync.stderr +++ b/src/test/ui/generator/not-send-sync.stderr @@ -1,31 +1,31 @@ -error[E0277]: `std::cell::Cell` cannot be shared between threads safely +error[E0277]: `Cell` cannot be shared between threads safely --> $DIR/not-send-sync.rs:16:5 | LL | fn assert_send(_: T) {} - | ---- required by this bound in `main::assert_send` + | ---- required by this bound in `assert_send` ... LL | assert_send(|| { - | ^^^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely + | ^^^^^^^^^^^ `Cell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell` - = 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:16:17: 20:6 a:&std::cell::Cell _]` + = help: the trait `Sync` is not implemented for `Cell` + = note: required because of the requirements on the impl of `Send` for `&Cell` + = note: required because it appears within the type `[generator@$DIR/not-send-sync.rs:16:17: 20:6 a:&Cell _]` error: generator cannot be shared between threads safely --> $DIR/not-send-sync.rs:9:5 | LL | fn assert_sync(_: T) {} - | ---- required by this bound in `main::assert_sync` + | ---- required by this bound in `assert_sync` ... LL | assert_sync(|| { | ^^^^^^^^^^^ generator is not `Sync` | - = help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {std::cell::Cell, ()}]`, the trait `std::marker::Sync` is not implemented for `std::cell::Cell` + = help: within `[generator@$DIR/not-send-sync.rs:9:17: 13:6 {Cell, ()}]`, the trait `Sync` is not implemented for `Cell` note: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:12:9 | LL | let a = Cell::new(2); - | - has type `std::cell::Cell` which is not `Sync` + | - has type `Cell` which is not `Sync` LL | yield; | ^^^^^ yield occurs here, with `a` maybe used later LL | }); diff --git a/src/test/ui/generator/resume-arg-late-bound.stderr b/src/test/ui/generator/resume-arg-late-bound.stderr index c379d9eae8e..dc0864165ab 100644 --- a/src/test/ui/generator/resume-arg-late-bound.stderr +++ b/src/test/ui/generator/resume-arg-late-bound.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | test(gen); | ^^^^ one type is more general than the other | - = note: expected type `for<'a> std::ops::Generator<&'a mut bool>` - found type `std::ops::Generator<&mut bool>` + = note: expected type `for<'a> Generator<&'a mut bool>` + found type `Generator<&mut bool>` error[E0308]: mismatched types --> $DIR/resume-arg-late-bound.rs:15:5 @@ -13,8 +13,8 @@ error[E0308]: mismatched types LL | test(gen); | ^^^^ one type is more general than the other | - = note: expected type `for<'a> std::ops::Generator<&'a mut bool>` - found type `std::ops::Generator<&mut bool>` + = note: expected type `for<'a> Generator<&'a mut bool>` + found type `Generator<&mut bool>` error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr index 379bd8ebd1c..2bcf66dbeae 100644 --- a/src/test/ui/generator/sized-yield.stderr +++ b/src/test/ui/generator/sized-yield.stderr @@ -8,7 +8,7 @@ LL | | yield s[..]; LL | | }; | |____^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: the yield type of a generator must have a statically known size error[E0277]: the size for values of type `str` cannot be known at compilation time @@ -17,7 +17,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | Pin::new(&mut gen).resume(()); | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` error: aborting due to 2 previous errors diff --git a/src/test/ui/generator/static-not-unpin.stderr b/src/test/ui/generator/static-not-unpin.stderr index 3bb899cd890..216b707bb16 100644 --- a/src/test/ui/generator/static-not-unpin.stderr +++ b/src/test/ui/generator/static-not-unpin.stderr @@ -5,7 +5,7 @@ LL | fn assert_unpin(_: T) { | ----- required by this bound in `assert_unpin` ... LL | assert_unpin(generator); - | ^^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]` + | ^^^^^^^^^ the trait `Unpin` is not implemented for `[static generator@$DIR/static-not-unpin.rs:11:25: 13:6 _]` error: aborting due to previous error diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr index 8de77798ff4..260fbb2ec7e 100644 --- a/src/test/ui/generator/type-mismatch-signature-deduction.stderr +++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr @@ -7,7 +7,7 @@ LL | 5 = note: expected type `std::result::Result<{integer}, _>` found type `{integer}` -error[E0271]: type mismatch resolving `<[generator@$DIR/type-mismatch-signature-deduction.rs:6:5: 14:6 _] as std::ops::Generator>::Return == i32` +error[E0271]: type mismatch resolving `<[generator@$DIR/type-mismatch-signature-deduction.rs:6:5: 14:6 _] as Generator>::Return == i32` --> $DIR/type-mismatch-signature-deduction.rs:5:13 | LL | fn foo() -> impl Generator { diff --git a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr index 4d02f2c46a6..c95765d906c 100644 --- a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr +++ b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr @@ -5,7 +5,7 @@ LL | type Assoc3; | --------------- definition of `Assoc3` from trait ... LL | type Assoc3 where T: Iterator = Vec; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::iter::Iterator` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator` error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/impl_bounds.rs b/src/test/ui/generic-associated-types/impl_bounds.rs index 3ffa6c6eec4..77bebc9854a 100644 --- a/src/test/ui/generic-associated-types/impl_bounds.rs +++ b/src/test/ui/generic-associated-types/impl_bounds.rs @@ -17,7 +17,7 @@ impl Foo for Fooy { type B<'a, 'b> where 'b: 'a = (&'a(), &'b ()); //~^ ERROR lifetime bound not satisfied type C where Self: Copy = String; - //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `T: Copy` is not satisfied } fn main() {} diff --git a/src/test/ui/generic-associated-types/impl_bounds.stderr b/src/test/ui/generic-associated-types/impl_bounds.stderr index e06977ebbe3..0546e38a33d 100644 --- a/src/test/ui/generic-associated-types/impl_bounds.stderr +++ b/src/test/ui/generic-associated-types/impl_bounds.stderr @@ -24,18 +24,18 @@ note: but lifetime parameter must outlive the lifetime `'a` as defined on the as LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ()); | ^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/impl_bounds.rs:19:5 | LL | type C where Self: Copy = String; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `Fooy` - = note: the requirement `Fooy: std::marker::Copy` appears on the associated impl type but not on the corresponding associated trait type + = note: required because of the requirements on the impl of `Copy` for `Fooy` + = note: the requirement `Fooy: Copy` appears on the associated impl type but not on the corresponding associated trait type help: consider restricting type parameter `T` | -LL | impl Foo for Fooy { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo for Fooy { + | ^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr b/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr index bc5c40ff029..439b8ab90c9 100644 --- a/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr +++ b/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr @@ -5,7 +5,7 @@ LL | type Assoc3; | --------------- definition of `Assoc3` from trait ... LL | type Assoc3 where T: Iterator = Vec; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: std::iter::Iterator` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator` error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs index 71f9b2967dc..0020887eaea 100644 --- a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs +++ b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs @@ -13,7 +13,7 @@ trait UnsafeCopy { impl UnsafeCopy for T { type Item<'a> = T; - //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `T: Copy` is not satisfied } fn main() { diff --git a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr index 834bc3b7878..6ba79dd5437 100644 --- a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr +++ b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr @@ -7,19 +7,19 @@ LL | #![feature(generic_associated_types)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44265 for more information -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-68641-check-gat-bounds.rs:15:5 | LL | type Item<'a>: Copy; | -------------------- required by `UnsafeCopy::Item` ... LL | type Item<'a> = T; - | ^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl UnsafeCopy for T { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl UnsafeCopy for T { + | ^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs index c99073c1328..ff8d2ca05b2 100644 --- a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs +++ b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs @@ -13,7 +13,7 @@ trait Fun { impl Fun for T { type F<'a> = Self; - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `T` + //~^ ERROR expected a `Fn<()>` closure, found `T` } fn main() { diff --git a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr index 2fe266b8018..15a66e25b19 100644 --- a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr +++ b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr @@ -7,7 +7,7 @@ LL | #![feature(generic_associated_types)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44265 for more information -error[E0277]: expected a `std::ops::Fn<()>` closure, found `T` +error[E0277]: expected a `Fn<()>` closure, found `T` --> $DIR/issue-68642-broken-llvm-ir.rs:15:5 | LL | type F<'a>: Fn() -> u32; @@ -19,8 +19,8 @@ LL | type F<'a> = Self; = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` help: consider restricting type parameter `T` | -LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ +LL | impl> Fun for T { + | ^^^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs b/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs index 24133e75ccc..2107804a8ba 100644 --- a/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs +++ b/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs @@ -13,7 +13,7 @@ trait Fun { impl Fun for T { type F<'a> = Self; - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `T` + //~^ ERROR expected a `Fn<()>` closure, found `T` } pub fn main() { diff --git a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr index e335523778b..9b2ddb23267 100644 --- a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr +++ b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr @@ -7,7 +7,7 @@ LL | #![feature(generic_associated_types)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44265 for more information -error[E0277]: expected a `std::ops::Fn<()>` closure, found `T` +error[E0277]: expected a `Fn<()>` closure, found `T` --> $DIR/issue-68643-broken-mir.rs:15:5 | LL | type F<'a>: Fn() -> u32; @@ -19,8 +19,8 @@ LL | type F<'a> = Self; = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` help: consider restricting type parameter `T` | -LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ +LL | impl> Fun for T { + | ^^^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs index 22620c61b83..bfe63b1be71 100644 --- a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs +++ b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs @@ -13,7 +13,7 @@ trait Fun { impl Fun for T { type F<'a> = Self; - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `T` + //~^ ERROR expected a `Fn<()>` closure, found `T` } fn main() { diff --git a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr index d7a5bb0ebe5..f7bfab35052 100644 --- a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr +++ b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr @@ -7,7 +7,7 @@ LL | #![feature(generic_associated_types)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44265 for more information -error[E0277]: expected a `std::ops::Fn<()>` closure, found `T` +error[E0277]: expected a `Fn<()>` closure, found `T` --> $DIR/issue-68644-codegen-selection.rs:15:5 | LL | type F<'a>: Fn() -> u32; @@ -19,8 +19,8 @@ LL | type F<'a> = Self; = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` help: consider restricting type parameter `T` | -LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ +LL | impl> Fun for T { + | ^^^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs index 423b80e8476..676dcf90238 100644 --- a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs +++ b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs @@ -13,7 +13,7 @@ trait Fun { impl Fun for T { type F<'a> = Self; - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `T` + //~^ ERROR expected a `Fn<()>` closure, found `T` } fn main() { diff --git a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr index 0670625aa2f..6c2d330a19a 100644 --- a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr +++ b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr @@ -7,7 +7,7 @@ LL | #![feature(generic_associated_types)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44265 for more information -error[E0277]: expected a `std::ops::Fn<()>` closure, found `T` +error[E0277]: expected a `Fn<()>` closure, found `T` --> $DIR/issue-68645-codegen-fulfillment.rs:15:5 | LL | type F<'a>: Fn() -> u32; @@ -19,8 +19,8 @@ LL | type F<'a> = Self; = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` help: consider restricting type parameter `T` | -LL | impl> Fun for T { - | ^^^^^^^^^^^^^^^^^^ +LL | impl> Fun for T { + | ^^^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs b/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs index 4ccd42ba643..f682bdd8ac7 100644 --- a/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs +++ b/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs @@ -14,7 +14,7 @@ trait UnsafeCopy { impl UnsafeCopy for T { type Item<'a> = T; - //~^ ERROR type mismatch resolving `::Target == T` + //~^ ERROR type mismatch resolving `::Target == T` } fn main() { diff --git a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr index e1ceeac3196..a9336151b6a 100644 --- a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr +++ b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr @@ -7,7 +7,7 @@ LL | #![feature(generic_associated_types)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #44265 for more information -error[E0271]: type mismatch resolving `::Target == T` +error[E0271]: type mismatch resolving `::Target == T` --> $DIR/issue-68656-unsized-values.rs:16:5 | LL | type Item<'a>: std::ops::Deref; @@ -19,11 +19,11 @@ LL | type Item<'a> = T; | ^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type | = note: expected type parameter `T` - found associated type `::Target` + found associated type `::Target` help: consider further restricting this bound | -LL | impl> UnsafeCopy for T { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl> UnsafeCopy for T { + | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/generic-associated-types/missing-bounds.fixed b/src/test/ui/generic-associated-types/missing-bounds.fixed index 3ba7d043d07..54478d16282 100644 --- a/src/test/ui/generic-associated-types/missing-bounds.fixed +++ b/src/test/ui/generic-associated-types/missing-bounds.fixed @@ -4,7 +4,7 @@ use std::ops::Add; struct A(B); -impl Add for A where B: Add + std::ops::Add { +impl Add for A where B: Add + Add { type Output = Self; fn add(self, rhs: Self) -> Self { @@ -14,7 +14,7 @@ impl Add for A where B: Add + std::ops::Add { struct C(B); -impl> Add for C { +impl> Add for C { type Output = Self; fn add(self, rhs: Self) -> Self { diff --git a/src/test/ui/generic-associated-types/missing-bounds.stderr b/src/test/ui/generic-associated-types/missing-bounds.stderr index 630ceac093e..4d4f7e55873 100644 --- a/src/test/ui/generic-associated-types/missing-bounds.stderr +++ b/src/test/ui/generic-associated-types/missing-bounds.stderr @@ -8,11 +8,11 @@ LL | A(self.0 + rhs.0) | ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type | = note: expected type parameter `B` - found associated type `::Output` + found associated type `::Output` help: consider further restricting this bound | -LL | impl Add for A where B: Add + std::ops::Add { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl Add for A where B: Add + Add { + | ^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/missing-bounds.rs:21:14 @@ -24,11 +24,11 @@ LL | Self(self.0 + rhs.0) | ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type | = note: expected type parameter `B` - found associated type `::Output` + found associated type `::Output` help: consider further restricting this bound | -LL | impl> Add for C { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | impl> Add for C { + | ^^^^^^^^^^^^^^^^^ error[E0369]: cannot add `B` to `B` --> $DIR/missing-bounds.rs:31:21 diff --git a/src/test/ui/generic/generic-type-params-name-repr.rs b/src/test/ui/generic/generic-type-params-name-repr.rs index 45dc85a252f..6e0beec6634 100644 --- a/src/test/ui/generic/generic-type-params-name-repr.rs +++ b/src/test/ui/generic/generic-type-params-name-repr.rs @@ -27,12 +27,12 @@ fn main() { let _: HashMap = (); //~^ ERROR mismatched types //~| expected struct `HashMap`, found `()` - //~| expected struct `HashMap` + //~| expected struct `HashMap` //~| found unit type `()` let _: HashMap> = (); //~^ ERROR mismatched types //~| expected struct `HashMap`, found `()` - //~| expected struct `HashMap` + //~| expected struct `HashMap` //~| found unit type `()` // But not when there's a different type in between. diff --git a/src/test/ui/generic/generic-type-params-name-repr.stderr b/src/test/ui/generic/generic-type-params-name-repr.stderr index 14180766119..4c3c003965c 100644 --- a/src/test/ui/generic/generic-type-params-name-repr.stderr +++ b/src/test/ui/generic/generic-type-params-name-repr.stderr @@ -28,7 +28,7 @@ LL | let _: HashMap = (); | | | expected due to this | - = note: expected struct `HashMap` + = note: expected struct `HashMap` found unit type `()` error[E0308]: mismatched types @@ -39,7 +39,7 @@ LL | let _: HashMap> = (); | | | expected due to this | - = note: expected struct `HashMap` + = note: expected struct `HashMap` found unit type `()` error[E0308]: mismatched types diff --git a/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr b/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr index 7a6c07d4e08..2b88a6046fd 100644 --- a/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr +++ b/src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr @@ -7,7 +7,7 @@ LL | LL | impl Tsized for () {} | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[()]` + = help: the trait `Sized` is not implemented for `[()]` error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr index 92a85825030..f6acb34982c 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_a_b_ret_a_vs_bound_a_ret_a: (for<'a,'b> fn(&'a u32, &'b u3 LL | | for<'a> fn(&'a u32, &'a u32) -> &'a u32) } | |_____________________________________________- in this macro invocation | - = note: expected enum `std::option::Option fn(&'a u32, &'b u32) -> &'a u32>` - found enum `std::option::Option fn(&'a u32, &'a u32) -> &'a u32>` + = note: expected enum `Option fn(&'a u32, &'b u32) -> &'a u32>` + found enum `Option fn(&'a u32, &'a u32) -> &'a u32>` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr index 98f5bff7327..ebad4b93dca 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_a_vs_free_x: (for<'a> fn(&'a u32), LL | | fn(&'x u32)) } | |______________- in this macro invocation | - = note: expected enum `std::option::Option fn(&'a u32)>` - found enum `std::option::Option` + = note: expected enum `Option fn(&'a u32)>` + found enum `Option` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr index 100ba6ac27e..40a0ff97b63 100644 --- a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr @@ -8,8 +8,8 @@ LL | / check! { bound_inv_a_b_vs_bound_inv_a: (for<'a,'b> fn(Inv<'a>, Inv<'b>), LL | | for<'a> fn(Inv<'a>, Inv<'a>)) } | |__________________________________- in this macro invocation | - = note: expected enum `std::option::Option fn(Inv<'a>, Inv<'b>)>` - found enum `std::option::Option fn(Inv<'a>, Inv<'a>)>` + = note: expected enum `Option fn(Inv<'a>, Inv<'b>)>` + found enum `Option fn(Inv<'a>, Inv<'a>)>` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr index 3c8af20e50c..d2f40f7fb5e 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr @@ -8,8 +8,8 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), LL | | fn(Inv<'y>)) } | |______________- in this macro invocation | - = note: expected enum `std::option::Option)>` - found enum `std::option::Option)>` + = note: expected enum `Option)>` + found enum `Option)>` note: the lifetime `'x` as defined on the function body at 38:20... --> $DIR/hr-subtype.rs:38:20 | @@ -40,8 +40,8 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), LL | | fn(Inv<'y>)) } | |______________- in this macro invocation | - = note: expected enum `std::option::Option)>` - found enum `std::option::Option)>` + = note: expected enum `Option)>` + found enum `Option)>` note: the lifetime `'x` as defined on the function body at 44:22... --> $DIR/hr-subtype.rs:44:22 | diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr index 7b4cdd4a419..57610beb862 100644 --- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr +++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr @@ -8,8 +8,8 @@ LL | / check! { free_x_vs_free_y: (fn(&'x u32), LL | | fn(&'y u32)) } | |______________- in this macro invocation | - = note: expected enum `std::option::Option` - found enum `std::option::Option` + = note: expected enum `Option` + found enum `Option` note: the lifetime `'x` as defined on the function body at 44:22... --> $DIR/hr-subtype.rs:44:22 | diff --git a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr index 720e2276d53..8bd23aa9018 100644 --- a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr +++ b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr @@ -7,8 +7,8 @@ LL | trait Trait {} LL | foo::<()>(); | ^^^^^^^^^ implementation of `Trait` is not general enough | - = note: `()` must implement `Trait fn(std::cell::Cell<&'b u32>)>` - = note: ...but `()` actually implements `Trait)>`, for some specific lifetime `'0` + = note: `()` must implement `Trait fn(Cell<&'b u32>)>` + = note: ...but `()` actually implements `Trait)>`, for some specific lifetime `'0` error: aborting due to previous error diff --git a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr index 1c7bfa65d7c..2342a4f6e17 100644 --- a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr +++ b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr @@ -9,7 +9,7 @@ LL | let v = Unit2.m( = help: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39] as std::ops::FnOnce<((&u8,),)>>::Output == Unit3` +error[E0271]: type mismatch resolving `<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39] as FnOnce<((&u8,),)>>::Output == Unit3` --> $DIR/issue-62203-hrtb-ice.rs:38:19 | LL | let v = Unit2.m( diff --git a/src/test/ui/huge-enum.stderr b/src/test/ui/huge-enum.stderr index 8398c511b9f..a069c37b80a 100644 --- a/src/test/ui/huge-enum.stderr +++ b/src/test/ui/huge-enum.stderr @@ -1,4 +1,4 @@ -error: the type `TYPE` is too big for the current architecture +error: the type `Option` is too big for the current architecture --> $DIR/huge-enum.rs:16:9 | LL | let big: BIG = None; diff --git a/src/test/ui/hygiene/fields.rs b/src/test/ui/hygiene/fields.rs index 597019cb1ee..7a417b46fcc 100644 --- a/src/test/ui/hygiene/fields.rs +++ b/src/test/ui/hygiene/fields.rs @@ -15,8 +15,8 @@ mod foo { let s = S { x: 0 }; //~ ERROR type `foo::S` is private let _ = s.x; //~ ERROR type `foo::S` is private - let t = T(0); //~ ERROR type `foo::T` is private - let _ = t.0; //~ ERROR type `foo::T` is private + let t = T(0); //~ ERROR type `T` is private + let _ = t.0; //~ ERROR type `T` is private let s = $S { $x: 0, x: 1 }; assert_eq!((s.$x, s.x), (0, 1)); diff --git a/src/test/ui/hygiene/fields.stderr b/src/test/ui/hygiene/fields.stderr index 6d784408016..3666aeabfa7 100644 --- a/src/test/ui/hygiene/fields.stderr +++ b/src/test/ui/hygiene/fields.stderr @@ -20,7 +20,7 @@ LL | let s = foo::m!(S, x); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `foo::T` is private +error: type `T` is private --> $DIR/fields.rs:18:17 | LL | let t = T(0); @@ -31,7 +31,7 @@ LL | let s = foo::m!(S, x); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `foo::T` is private +error: type `T` is private --> $DIR/fields.rs:19:17 | LL | let _ = t.0; diff --git a/src/test/ui/hygiene/intercrate.rs b/src/test/ui/hygiene/intercrate.rs index 2acbc893cf5..d9b5b789e4a 100644 --- a/src/test/ui/hygiene/intercrate.rs +++ b/src/test/ui/hygiene/intercrate.rs @@ -8,5 +8,5 @@ extern crate intercrate; fn main() { assert_eq!(intercrate::foo::m!(), 1); - //~^ ERROR type `fn() -> u32 {intercrate::foo::bar::f}` is private + //~^ ERROR type `fn() -> u32 {foo::bar::f}` is private } diff --git a/src/test/ui/hygiene/intercrate.stderr b/src/test/ui/hygiene/intercrate.stderr index c27ba74a263..cd593abf530 100644 --- a/src/test/ui/hygiene/intercrate.stderr +++ b/src/test/ui/hygiene/intercrate.stderr @@ -1,4 +1,4 @@ -error: type `fn() -> u32 {intercrate::foo::bar::f}` is private +error: type `fn() -> u32 {foo::bar::f}` is private --> $DIR/intercrate.rs:10:16 | LL | assert_eq!(intercrate::foo::m!(), 1); diff --git a/src/test/ui/hygiene/nested_macro_privacy.rs b/src/test/ui/hygiene/nested_macro_privacy.rs index bee90e2bb88..dea9101ee00 100644 --- a/src/test/ui/hygiene/nested_macro_privacy.rs +++ b/src/test/ui/hygiene/nested_macro_privacy.rs @@ -12,6 +12,6 @@ n!(foo, S, i, m); fn main() { use foo::{S, m}; - S::default().i; //~ ERROR field `i` of struct `foo::S` is private + S::default().i; //~ ERROR field `i` of struct `S` is private m!(S::default()); // ok } diff --git a/src/test/ui/hygiene/nested_macro_privacy.stderr b/src/test/ui/hygiene/nested_macro_privacy.stderr index 482957a3264..1d11cd0f571 100644 --- a/src/test/ui/hygiene/nested_macro_privacy.stderr +++ b/src/test/ui/hygiene/nested_macro_privacy.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `i` of struct `foo::S` is private +error[E0616]: field `i` of struct `S` is private --> $DIR/nested_macro_privacy.rs:15:18 | LL | S::default().i; diff --git a/src/test/ui/if/ifmt-unimpl.rs b/src/test/ui/if/ifmt-unimpl.rs index 65daae4b25e..258f4eea509 100644 --- a/src/test/ui/if/ifmt-unimpl.rs +++ b/src/test/ui/if/ifmt-unimpl.rs @@ -1,4 +1,4 @@ fn main() { format!("{:X}", "3"); - //~^ ERROR: `str: std::fmt::UpperHex` is not satisfied + //~^ ERROR: `str: UpperHex` is not satisfied } diff --git a/src/test/ui/if/ifmt-unimpl.stderr b/src/test/ui/if/ifmt-unimpl.stderr index a142896ada5..65b0f4a09b3 100644 --- a/src/test/ui/if/ifmt-unimpl.stderr +++ b/src/test/ui/if/ifmt-unimpl.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `str: std::fmt::UpperHex` is not satisfied +error[E0277]: the trait bound `str: UpperHex` is not satisfied --> $DIR/ifmt-unimpl.rs:2:21 | LL | format!("{:X}", "3"); - | ^^^ the trait `std::fmt::UpperHex` is not implemented for `str` + | ^^^ the trait `UpperHex` is not implemented for `str` | - = note: required because of the requirements on the impl of `std::fmt::UpperHex` for `&str` + = note: required because of the requirements on the impl of `UpperHex` for `&str` = note: required by `std::fmt::UpperHex::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr index 679b26efe59..4ecc9c34324 100644 --- a/src/test/ui/impl-trait/auto-trait-leak.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak.stderr @@ -84,20 +84,20 @@ LL | | Rc::new(String::from("foo")) LL | | } | |_^ -error[E0277]: `std::rc::Rc` cannot be sent between threads safely +error[E0277]: `Rc` cannot be sent between threads safely --> $DIR/auto-trait-leak.rs:14:5 | LL | fn send(_: T) {} | ---- required by this bound in `send` ... LL | send(cycle2().clone()); - | ^^^^ `std::rc::Rc` cannot be sent between threads safely + | ^^^^ `Rc` cannot be sent between threads safely ... LL | fn cycle2() -> impl Clone { - | ---------- within this `impl std::clone::Clone` + | ---------- within this `impl Clone` | - = help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc` - = note: required because it appears within the type `impl std::clone::Clone` + = help: within `impl Clone`, the trait `Send` is not implemented for `Rc` + = note: required because it appears within the type `impl Clone` error: aborting due to 2 previous errors diff --git a/src/test/ui/impl-trait/auto-trait-leak2.rs b/src/test/ui/impl-trait/auto-trait-leak2.rs index fb4b5405123..a464f576dc7 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.rs +++ b/src/test/ui/impl-trait/auto-trait-leak2.rs @@ -11,10 +11,10 @@ fn send(_: T) {} fn main() { send(before()); - //~^ ERROR `std::rc::Rc>` cannot be sent between threads safely + //~^ ERROR `Rc>` cannot be sent between threads safely send(after()); - //~^ ERROR `std::rc::Rc>` cannot be sent between threads safely + //~^ ERROR `Rc>` cannot be sent between threads safely } // Deferred path, main has to wait until typeck finishes, diff --git a/src/test/ui/impl-trait/auto-trait-leak2.stderr b/src/test/ui/impl-trait/auto-trait-leak2.stderr index b02ef7d4a5b..8bb05c89e91 100644 --- a/src/test/ui/impl-trait/auto-trait-leak2.stderr +++ b/src/test/ui/impl-trait/auto-trait-leak2.stderr @@ -1,34 +1,34 @@ -error[E0277]: `std::rc::Rc>` cannot be sent between threads safely +error[E0277]: `Rc>` cannot be sent between threads safely --> $DIR/auto-trait-leak2.rs:13:5 | LL | fn before() -> impl Fn(i32) { - | ------------ within this `impl std::ops::Fn<(i32,)>` + | ------------ within this `impl Fn<(i32,)>` ... LL | fn send(_: T) {} | ---- required by this bound in `send` ... LL | send(before()); - | ^^^^ `std::rc::Rc>` cannot be sent between threads safely + | ^^^^ `Rc>` cannot be sent between threads safely | - = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` - = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc>]` - = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` + = help: within `impl Fn<(i32,)>`, the trait `Send` is not implemented for `Rc>` + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:Rc>]` + = note: required because it appears within the type `impl Fn<(i32,)>` -error[E0277]: `std::rc::Rc>` cannot be sent between threads safely +error[E0277]: `Rc>` cannot be sent between threads safely --> $DIR/auto-trait-leak2.rs:16:5 | LL | fn send(_: T) {} | ---- required by this bound in `send` ... LL | send(after()); - | ^^^^ `std::rc::Rc>` cannot be sent between threads safely + | ^^^^ `Rc>` cannot be sent between threads safely ... LL | fn after() -> impl Fn(i32) { - | ------------ within this `impl std::ops::Fn<(i32,)>` + | ------------ within this `impl Fn<(i32,)>` | - = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` - = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc>]` - = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` + = help: within `impl Fn<(i32,)>`, the trait `Send` is not implemented for `Rc>` + = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:Rc>]` + = note: required because it appears within the type `impl Fn<(i32,)>` error: aborting due to 2 previous errors diff --git a/src/test/ui/impl-trait/bindings-opaque.stderr b/src/test/ui/impl-trait/bindings-opaque.stderr index 6656968d79a..170bd461234 100644 --- a/src/test/ui/impl-trait/bindings-opaque.stderr +++ b/src/test/ui/impl-trait/bindings-opaque.stderr @@ -7,23 +7,23 @@ LL | #![feature(impl_trait_in_bindings)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #63065 for more information -error[E0599]: no method named `count_ones` found for opaque type `impl std::marker::Copy` in the current scope +error[E0599]: no method named `count_ones` found for opaque type `impl Copy` in the current scope --> $DIR/bindings-opaque.rs:11:17 | LL | let _ = FOO.count_ones(); - | ^^^^^^^^^^ method not found in `impl std::marker::Copy` + | ^^^^^^^^^^ method not found in `impl Copy` -error[E0599]: no method named `count_ones` found for opaque type `impl std::marker::Copy` in the current scope +error[E0599]: no method named `count_ones` found for opaque type `impl Copy` in the current scope --> $DIR/bindings-opaque.rs:13:17 | LL | let _ = BAR.count_ones(); - | ^^^^^^^^^^ method not found in `impl std::marker::Copy` + | ^^^^^^^^^^ method not found in `impl Copy` -error[E0599]: no method named `count_ones` found for opaque type `impl std::marker::Copy` in the current scope +error[E0599]: no method named `count_ones` found for opaque type `impl Copy` in the current scope --> $DIR/bindings-opaque.rs:15:17 | LL | let _ = foo.count_ones(); - | ^^^^^^^^^^ method not found in `impl std::marker::Copy` + | ^^^^^^^^^^ method not found in `impl Copy` error: aborting due to 3 previous errors; 1 warning emitted diff --git a/src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr index 96f961a2aaf..00145d10ed7 100644 --- a/src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr +++ b/src/test/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr @@ -15,7 +15,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) } | | | doesn't have a size known at compile-time | - = help: within `(usize, (dyn Trait + 'static))`, the trait `std::marker::Sized` is not implemented for `(dyn Trait + 'static)` + = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)` = note: required because it appears within the type `(usize, (dyn Trait + 'static))` = note: the return type of a function must have a statically known size @@ -36,7 +36,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) } | | | doesn't have a size known at compile-time | - = help: within `(usize, (dyn Trait + 'static))`, the trait `std::marker::Sized` is not implemented for `(dyn Trait + 'static)` + = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)` = note: required because it appears within the type `(usize, (dyn Trait + 'static))` = note: the return type of a function must have a statically known size @@ -137,15 +137,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:34:16 | LL | fn bam() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type LL | if true { LL | return Struct; | ^^^^^^ | | - | expected struct `std::boxed::Box`, found struct `Struct` + | expected struct `Box`, found struct `Struct` | help: store this in the heap by calling `Box::new`: `Box::new(Struct)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found struct `Struct` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -153,15 +153,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:36:5 | LL | fn bam() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type ... LL | 42 | ^^ | | - | expected struct `std::boxed::Box`, found integer + | expected struct `Box`, found integer | help: store this in the heap by calling `Box::new`: `Box::new(42)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found type `{integer}` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -169,15 +169,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:40:16 | LL | fn baq() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type LL | if true { LL | return 0; | ^ | | - | expected struct `std::boxed::Box`, found integer + | expected struct `Box`, found integer | help: store this in the heap by calling `Box::new`: `Box::new(0)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found type `{integer}` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -185,15 +185,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:42:5 | LL | fn baq() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type ... LL | 42 | ^^ | | - | expected struct `std::boxed::Box`, found integer + | expected struct `Box`, found integer | help: store this in the heap by calling `Box::new`: `Box::new(42)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found type `{integer}` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -201,15 +201,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:46:9 | LL | fn baz() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type LL | if true { LL | Struct | ^^^^^^ | | - | expected struct `std::boxed::Box`, found struct `Struct` + | expected struct `Box`, found struct `Struct` | help: store this in the heap by calling `Box::new`: `Box::new(Struct)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found struct `Struct` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -217,15 +217,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:48:9 | LL | fn baz() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type ... LL | 42 | ^^ | | - | expected struct `std::boxed::Box`, found integer + | expected struct `Box`, found integer | help: store this in the heap by calling `Box::new`: `Box::new(42)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found type `{integer}` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -233,15 +233,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:53:9 | LL | fn baw() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type LL | if true { LL | 0 | ^ | | - | expected struct `std::boxed::Box`, found integer + | expected struct `Box`, found integer | help: store this in the heap by calling `Box::new`: `Box::new(0)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found type `{integer}` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html @@ -249,15 +249,15 @@ error[E0308]: mismatched types --> $DIR/dyn-trait-return-should-be-impl-trait.rs:55:9 | LL | fn baw() -> Box { - | -------------- expected `std::boxed::Box<(dyn Trait + 'static)>` because of return type + | -------------- expected `Box<(dyn Trait + 'static)>` because of return type ... LL | 42 | ^^ | | - | expected struct `std::boxed::Box`, found integer + | expected struct `Box`, found integer | help: store this in the heap by calling `Box::new`: `Box::new(42)` | - = note: expected struct `std::boxed::Box<(dyn Trait + 'static)>` + = note: expected struct `Box<(dyn Trait + 'static)>` found type `{integer}` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr index 628dfb13d4c..9667a9785dc 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -31,7 +31,7 @@ error[E0277]: cannot add `impl Foo` to `u32` LL | n + sum_to(n - 1) | ^ no implementation for `u32 + impl Foo` | - = help: the trait `std::ops::Add` is not implemented for `u32` + = help: the trait `Add` is not implemented for `u32` error: aborting due to 2 previous errors; 1 warning emitted diff --git a/src/test/ui/impl-trait/hidden-lifetimes.stderr b/src/test/ui/impl-trait/hidden-lifetimes.stderr index 956ac1f1a11..7cea4fb93d9 100644 --- a/src/test/ui/impl-trait/hidden-lifetimes.stderr +++ b/src/test/ui/impl-trait/hidden-lifetimes.stderr @@ -16,7 +16,7 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea LL | fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc>) -> impl Swap + 'a { | ^^^^^^^^^^^^^^ | -note: hidden type `std::rc::Rc>` captures the lifetime `'b` as defined on the function body at 45:24 +note: hidden type `Rc>` captures the lifetime `'b` as defined on the function body at 45:24 --> $DIR/hidden-lifetimes.rs:45:24 | LL | fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc>) -> impl Swap + 'a { diff --git a/src/test/ui/impl-trait/impl_trait_projections.stderr b/src/test/ui/impl-trait/impl_trait_projections.stderr index ff4382187aa..e85ed0eda52 100644 --- a/src/test/ui/impl-trait/impl_trait_projections.stderr +++ b/src/test/ui/impl-trait/impl_trait_projections.stderr @@ -26,7 +26,7 @@ error[E0223]: ambiguous associated type --> $DIR/impl_trait_projections.rs:12:50 | LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { - | ^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `::Item` + | ^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `::Item` error: aborting due to 5 previous errors diff --git a/src/test/ui/impl-trait/issue-55872-1.rs b/src/test/ui/impl-trait/issue-55872-1.rs index f99096b4d58..99ac4617b41 100644 --- a/src/test/ui/impl-trait/issue-55872-1.rs +++ b/src/test/ui/impl-trait/issue-55872-1.rs @@ -10,8 +10,8 @@ pub trait Bar impl Bar for S { type E = impl Copy; - //~^ ERROR the trait bound `S: std::marker::Copy` is not satisfied in `(S, T)` [E0277] - //~^^ ERROR the trait bound `T: std::marker::Copy` is not satisfied in `(S, T)` [E0277] + //~^ ERROR the trait bound `S: Copy` is not satisfied in `(S, T)` [E0277] + //~^^ ERROR the trait bound `T: Copy` is not satisfied in `(S, T)` [E0277] fn foo() -> Self::E { //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias diff --git a/src/test/ui/impl-trait/issue-55872-1.stderr b/src/test/ui/impl-trait/issue-55872-1.stderr index 5131509cdf0..a9f73947853 100644 --- a/src/test/ui/impl-trait/issue-55872-1.stderr +++ b/src/test/ui/impl-trait/issue-55872-1.stderr @@ -1,28 +1,28 @@ -error[E0277]: the trait bound `S: std::marker::Copy` is not satisfied in `(S, T)` +error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` --> $DIR/issue-55872-1.rs:12:14 | LL | type E = impl Copy; - | ^^^^^^^^^ within `(S, T)`, the trait `std::marker::Copy` is not implemented for `S` + | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` | = note: required because it appears within the type `(S, T)` = note: the return type of a function must have a statically known size help: consider further restricting this bound | -LL | impl Bar for S { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Bar for S { + | ^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied in `(S, T)` +error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` --> $DIR/issue-55872-1.rs:12:14 | LL | type E = impl Copy; - | ^^^^^^^^^ within `(S, T)`, the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` | = note: required because it appears within the type `(S, T)` = note: the return type of a function must have a statically known size help: consider further restricting this bound | -LL | fn foo() -> Self::E { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn foo() -> Self::E { + | ^^^^^^ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias --> $DIR/issue-55872-1.rs:16:37 diff --git a/src/test/ui/impl-trait/issue-55872-2.rs b/src/test/ui/impl-trait/issue-55872-2.rs index 1ca2e3d9065..7708576ae78 100644 --- a/src/test/ui/impl-trait/issue-55872-2.rs +++ b/src/test/ui/impl-trait/issue-55872-2.rs @@ -10,8 +10,8 @@ pub trait Bar { } impl Bar for S { - type E = impl Copy; - //~^ ERROR the trait bound `impl std::future::Future: std::marker::Copy` is not satisfied [E0277] + type E = impl std::marker::Copy; + //~^ ERROR the trait bound `impl Future: Copy` is not satisfied [E0277] fn foo() -> Self::E { //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias async {} diff --git a/src/test/ui/impl-trait/issue-55872-2.stderr b/src/test/ui/impl-trait/issue-55872-2.stderr index 649109e4c93..6da3704184a 100644 --- a/src/test/ui/impl-trait/issue-55872-2.stderr +++ b/src/test/ui/impl-trait/issue-55872-2.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `impl std::future::Future: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `impl Future: Copy` is not satisfied --> $DIR/issue-55872-2.rs:13:14 | -LL | type E = impl Copy; - | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `impl std::future::Future` +LL | type E = impl std::marker::Copy; + | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` | = note: the return type of a function must have a statically known size diff --git a/src/test/ui/impl-trait/issue-72911.stderr b/src/test/ui/impl-trait/issue-72911.stderr index b28142b916c..55fd38f7c0d 100644 --- a/src/test/ui/impl-trait/issue-72911.stderr +++ b/src/test/ui/impl-trait/issue-72911.stderr @@ -19,14 +19,14 @@ LL | LL | lint_files().flat_map(|f| gather_from_file(&f)) | ----------------------------------------------- | | - | returning here with type `std::iter::FlatMap` - | returning here with type `std::iter::FlatMap` + | returning here with type `FlatMap` + | returning here with type `FlatMap` ... LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator { - | -------------------------- returning this opaque type `std::iter::FlatMap` + | -------------------------- returning this opaque type `FlatMap` ... LL | fn lint_files() -> impl Iterator { - | -------------------------------------- returning this opaque type `std::iter::FlatMap` + | -------------------------------------- returning this opaque type `FlatMap` error: aborting due to 3 previous errors diff --git a/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr b/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr index c538b77098a..16a1262ec27 100644 --- a/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr +++ b/src/test/ui/impl-trait/issues/infinite-impl-trait-issue-38064.stderr @@ -5,22 +5,22 @@ LL | fn foo() -> impl Quux { | ^^^^^^^^^ recursive opaque type ... LL | Foo(bar()) - | ---------- returning here with type `foo::Foo` + | ---------- returning here with type `Foo` ... LL | fn bar() -> impl Quux { - | --------- returning this opaque type `foo::Foo` + | --------- returning this opaque type `Foo` error[E0720]: cannot resolve opaque type --> $DIR/infinite-impl-trait-issue-38064.rs:14:13 | LL | fn foo() -> impl Quux { - | --------- returning this opaque type `bar::Bar` + | --------- returning this opaque type `Bar` ... LL | fn bar() -> impl Quux { | ^^^^^^^^^ recursive opaque type ... LL | Bar(foo()) - | ---------- returning here with type `bar::Bar` + | ---------- returning here with type `Bar` error: aborting due to 2 previous errors 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 7f2eb0c21e6..f6bb52bf638 100644 --- a/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr +++ b/src/test/ui/impl-trait/method-suggestion-no-duplication.stderr @@ -9,7 +9,7 @@ LL | foo(|s| s.is_empty()); | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `is_empty`, perhaps you need to implement it: - candidate #1: `std::iter::ExactSizeIterator` + candidate #1: `ExactSizeIterator` error: aborting due to previous error 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 3cd4d0dd391..64ddcb81c0a 100644 --- a/src/test/ui/impl-trait/no-method-suggested-traits.stderr +++ b/src/test/ui/impl-trait/no-method-suggested-traits.stderr @@ -16,11 +16,11 @@ LL | use no_method_suggested_traits::qux::PrivPub; LL | use no_method_suggested_traits::Reexported; | -error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&u32>>` in the current scope +error[E0599]: no method named `method` found for struct `Rc<&mut Box<&u32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:26:44 | LL | std::rc::Rc::new(&mut Box::new(&1u32)).method(); - | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u32>>` + | ^^^^^^ method not found in `Rc<&mut Box<&u32>>` | = help: items from traits can only be used if the trait is in scope help: the following traits are implemented but not in scope; perhaps add a `use` for one of them: @@ -46,11 +46,11 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use foo::Bar; | -error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&char>>` in the current scope +error[E0599]: no method named `method` found for struct `Rc<&mut Box<&char>>` in the current scope --> $DIR/no-method-suggested-traits.rs:32:43 | LL | std::rc::Rc::new(&mut Box::new(&'a')).method(); - | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&char>>` + | ^^^^^^ method not found in `Rc<&mut Box<&char>>` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it: @@ -70,11 +70,11 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use no_method_suggested_traits::foo::PubPub; | -error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&i32>>` in the current scope +error[E0599]: no method named `method` found for struct `Rc<&mut Box<&i32>>` in the current scope --> $DIR/no-method-suggested-traits.rs:37:44 | LL | std::rc::Rc::new(&mut Box::new(&1i32)).method(); - | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&i32>>` + | ^^^^^^ method not found in `Rc<&mut Box<&i32>>` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it: @@ -94,22 +94,22 @@ LL | Foo.method(); = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `method`, perhaps you need to implement one of them: candidate #1: `foo::Bar` - candidate #2: `no_method_suggested_traits::foo::PubPub` + candidate #2: `PubPub` candidate #3: `no_method_suggested_traits::qux::PrivPub` - candidate #4: `no_method_suggested_traits::Reexported` + candidate #4: `Reexported` -error[E0599]: no method named `method` found for struct `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope +error[E0599]: no method named `method` found for struct `Rc<&mut Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:42:43 | LL | std::rc::Rc::new(&mut Box::new(&Foo)).method(); - | ^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>` + | ^^^^^^ method not found in `Rc<&mut Box<&Foo>>` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following traits define an item `method`, perhaps you need to implement one of them: candidate #1: `foo::Bar` - candidate #2: `no_method_suggested_traits::foo::PubPub` + candidate #2: `PubPub` candidate #3: `no_method_suggested_traits::qux::PrivPub` - candidate #4: `no_method_suggested_traits::Reexported` + candidate #4: `Reexported` error[E0599]: no method named `method2` found for type `u64` in the current scope --> $DIR/no-method-suggested-traits.rs:45:10 @@ -124,11 +124,11 @@ note: `foo::Bar` defines an item `method2`, perhaps you need to implement it LL | pub trait Bar { | ^^^^^^^^^^^^^ -error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&u64>>` in the current scope +error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&u64>>` in the current scope --> $DIR/no-method-suggested-traits.rs:47:44 | LL | std::rc::Rc::new(&mut Box::new(&1u64)).method2(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&u64>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&u64>>` | = help: items from traits can only be used if the trait is implemented and in scope note: `foo::Bar` defines an item `method2`, perhaps you need to implement it @@ -150,11 +150,11 @@ note: `foo::Bar` defines an item `method2`, perhaps you need to implement it LL | pub trait Bar { | ^^^^^^^^^^^^^ -error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope +error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:52:71 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method2(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Foo>>` | = help: items from traits can only be used if the trait is implemented and in scope note: `foo::Bar` defines an item `method2`, perhaps you need to implement it @@ -176,11 +176,11 @@ note: `foo::Bar` defines an item `method2`, perhaps you need to implement it LL | pub trait Bar { | ^^^^^^^^^^^^^ -error[E0599]: no method named `method2` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope +error[E0599]: no method named `method2` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:56:74 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method2(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Bar>>` | = help: items from traits can only be used if the trait is implemented and in scope note: `foo::Bar` defines an item `method2`, perhaps you need to implement it @@ -200,17 +200,17 @@ LL | Foo.method3(); | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `method3`, perhaps you need to implement it: - candidate #1: `no_method_suggested_traits::foo::PubPub` + candidate #1: `PubPub` -error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&Foo>>` in the current scope +error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:61:43 | LL | std::rc::Rc::new(&mut Box::new(&Foo)).method3(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Foo>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&Foo>>` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `method3`, perhaps you need to implement it: - candidate #1: `no_method_suggested_traits::foo::PubPub` + candidate #1: `PubPub` error[E0599]: no method named `method3` found for enum `Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:63:12 @@ -223,17 +223,17 @@ LL | Bar::X.method3(); | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `method3`, perhaps you need to implement it: - candidate #1: `no_method_suggested_traits::foo::PubPub` + candidate #1: `PubPub` -error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&Bar>>` in the current scope +error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:65:46 | LL | std::rc::Rc::new(&mut Box::new(&Bar::X)).method3(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&Bar>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&Bar>>` | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `method3`, perhaps you need to implement it: - candidate #1: `no_method_suggested_traits::foo::PubPub` + candidate #1: `PubPub` error[E0599]: no method named `method3` found for type `usize` in the current scope --> $DIR/no-method-suggested-traits.rs:69:13 @@ -241,11 +241,11 @@ error[E0599]: no method named `method3` found for type `usize` in the current sc LL | 1_usize.method3(); | ^^^^^^^ method not found in `usize` -error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&usize>>` in the current scope +error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&usize>>` in the current scope --> $DIR/no-method-suggested-traits.rs:70:47 | LL | std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&usize>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&usize>>` error[E0599]: no method named `method3` found for struct `no_method_suggested_traits::Foo` in the current scope --> $DIR/no-method-suggested-traits.rs:71:37 @@ -253,11 +253,11 @@ error[E0599]: no method named `method3` found for struct `no_method_suggested_tr LL | no_method_suggested_traits::Foo.method3(); | ^^^^^^^ method not found in `no_method_suggested_traits::Foo` -error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` in the current scope +error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Foo>>` in the current scope --> $DIR/no-method-suggested-traits.rs:72:71 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Foo>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Foo>>` error[E0599]: no method named `method3` found for enum `no_method_suggested_traits::Bar` in the current scope --> $DIR/no-method-suggested-traits.rs:74:40 @@ -265,11 +265,11 @@ error[E0599]: no method named `method3` found for enum `no_method_suggested_trai LL | no_method_suggested_traits::Bar::X.method3(); | ^^^^^^^ method not found in `no_method_suggested_traits::Bar` -error[E0599]: no method named `method3` found for struct `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` in the current scope +error[E0599]: no method named `method3` found for struct `Rc<&mut Box<&no_method_suggested_traits::Bar>>` in the current scope --> $DIR/no-method-suggested-traits.rs:75:74 | LL | std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Bar::X)).method3(); - | ^^^^^^^ method not found in `std::rc::Rc<&mut std::boxed::Box<&no_method_suggested_traits::Bar>>` + | ^^^^^^^ method not found in `Rc<&mut Box<&no_method_suggested_traits::Bar>>` error: aborting due to 24 previous errors diff --git a/src/test/ui/impl-trait/recursive-impl-trait-type-indirect.stderr b/src/test/ui/impl-trait/recursive-impl-trait-type-indirect.stderr index 75ff9e078cc..42e13411bda 100644 --- a/src/test/ui/impl-trait/recursive-impl-trait-type-indirect.stderr +++ b/src/test/ui/impl-trait/recursive-impl-trait-type-indirect.stderr @@ -5,9 +5,9 @@ LL | fn option(i: i32) -> impl Sized { | ^^^^^^^^^^ recursive opaque type LL | LL | if i < 0 { None } else { Some((option(i - 1), i)) } - | ---- ------------------------ returning here with type `std::option::Option<(impl Sized, i32)>` + | ---- ------------------------ returning here with type `Option<(impl Sized, i32)>` | | - | returning here with type `std::option::Option<(impl Sized, i32)>` + | returning here with type `Option<(impl Sized, i32)>` error[E0720]: cannot resolve opaque type --> $DIR/recursive-impl-trait-type-indirect.rs:12:15 @@ -135,13 +135,13 @@ error[E0720]: cannot resolve opaque type --> $DIR/recursive-impl-trait-type-indirect.rs:91:28 | LL | fn mutual_recursion() -> impl Sync { - | --------- returning this opaque type `impl std::marker::Sync` + | --------- returning this opaque type `impl Sync` ... LL | fn mutual_recursion_b() -> impl Sized { | ^^^^^^^^^^ recursive opaque type LL | LL | mutual_recursion() - | ------------------ returning here with type `impl std::marker::Sync` + | ------------------ returning here with type `impl Sync` error: aborting due to 14 previous errors 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 894a65ff389..969ddc57af8 100644 --- a/src/test/ui/impl-trait/region-escape-via-bound.stderr +++ b/src/test/ui/impl-trait/region-escape-via-bound.stderr @@ -4,7 +4,7 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appea LL | fn foo(x: Cell<&'x u32>) -> impl Trait<'y> | ^^^^^^^^^^^^^^ | -note: hidden type `std::cell::Cell<&'x u32>` captures the lifetime `'x` as defined on the function body at 17:7 +note: hidden type `Cell<&'x u32>` captures the lifetime `'x` as defined on the function body at 17:7 --> $DIR/region-escape-via-bound.rs:17:7 | LL | where 'x: 'y diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr index 748bc639a03..e94f2c70215 100644 --- a/src/test/ui/impl-trait/trait_type.stderr +++ b/src/test/ui/impl-trait/trait_type.stderr @@ -4,7 +4,7 @@ error[E0053]: method `fmt` has an incompatible type for trait LL | fn fmt(&self, x: &str) -> () { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability | - = note: expected fn pointer `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` + = note: expected fn pointer `fn(&MyType, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` found fn pointer `fn(&MyType, &str)` error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 @@ -13,7 +13,7 @@ error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fm LL | fn fmt(&self) -> () { } | ^^^^^ expected 2 parameters, found 1 | - = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` + = note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl --> $DIR/trait_type.rs:17:4 @@ -21,7 +21,7 @@ error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in th LL | fn fmt() -> () { } | ^^^^^^^^^^^^^^ expected `&self` in impl | - = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` + = note: `fmt` from trait: `fn(&Self, &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/trait_type.rs:21:1 @@ -29,7 +29,7 @@ error[E0046]: not all trait items implemented, missing: `fmt` LL | impl std::fmt::Display for MyType4 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | - = help: implement the missing item: `fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }` + = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }` error: aborting due to 4 previous errors diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr index a12b01b4d2b..817c573c091 100644 --- a/src/test/ui/impl-trait/universal-mismatched-type.stderr +++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/universal-mismatched-type.rs:4:5 | LL | fn foo(x: impl Debug) -> String { - | ---------- ------ expected `std::string::String` because of return type + | ---------- ------ expected `String` because of return type | | | this type parameter LL | x - | ^ expected struct `std::string::String`, found type parameter `impl Debug` + | ^ expected struct `String`, found type parameter `impl Debug` | - = note: expected struct `std::string::String` + = note: expected struct `String` found type parameter `impl Debug` error: aborting due to previous error diff --git a/src/test/ui/index-help.stderr b/src/test/ui/index-help.stderr index cd4d8356749..78a8f439a71 100644 --- a/src/test/ui/index-help.stderr +++ b/src/test/ui/index-help.stderr @@ -4,8 +4,8 @@ error[E0277]: the type `[{integer}]` cannot be indexed by `i32` LL | x[0i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[{integer}]>` is not implemented for `i32` - = note: required because of the requirements on the impl of `std::ops::Index` for `std::vec::Vec<{integer}>` + = help: the trait `SliceIndex<[{integer}]>` is not implemented for `i32` + = note: required because of the requirements on the impl of `Index` for `Vec<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr index 70614cbbf9f..31fcd4b1c2e 100644 --- a/src/test/ui/indexing-requires-a-uint.stderr +++ b/src/test/ui/indexing-requires-a-uint.stderr @@ -4,8 +4,8 @@ error[E0277]: the type `[{integer}]` cannot be indexed by `u8` LL | [0][0u8]; | ^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[{integer}]>` is not implemented for `u8` - = note: required because of the requirements on the impl of `std::ops::Index` for `[{integer}]` + = help: the trait `SliceIndex<[{integer}]>` is not implemented for `u8` + = note: required because of the requirements on the impl of `Index` for `[{integer}]` error[E0308]: mismatched types --> $DIR/indexing-requires-a-uint.rs:12:18 diff --git a/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr b/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr index 89a22f5e5d6..b6e3bb190ea 100644 --- a/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr +++ b/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr @@ -7,11 +7,11 @@ LL | #![feature(impl_trait_in_bindings)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #63065 for more information -error[E0282]: type annotations needed for `impl std::future::Future` +error[E0282]: type annotations needed for `impl Future` --> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:13:9 | LL | let fut = async { - | --- consider giving `fut` the explicit type `impl std::future::Future`, with the type parameters specified + | --- consider giving `fut` the explicit type `impl Future`, with the type parameters specified LL | make_unit()?; | ^^^^^^^^^^^^ cannot infer type diff --git a/src/test/ui/inference/inference_unstable_featured.stderr b/src/test/ui/inference/inference_unstable_featured.stderr index e23b934ac18..0dd4baf80db 100644 --- a/src/test/ui/inference/inference_unstable_featured.stderr +++ b/src/test/ui/inference/inference_unstable_featured.stderr @@ -4,16 +4,16 @@ error[E0034]: multiple applicable items in scope LL | assert_eq!('x'.ipu_flatten(), 0); | ^^^^^^^^^^^ multiple `ipu_flatten` found | - = note: candidate #1 is defined in an impl of the trait `inference_unstable_iterator::IpuIterator` for the type `char` - = note: candidate #2 is defined in an impl of the trait `inference_unstable_itertools::IpuItertools` for the type `char` + = note: candidate #1 is defined in an impl of the trait `IpuIterator` for the type `char` + = note: candidate #2 is defined in an impl of the trait `IpuItertools` for the type `char` help: disambiguate the associated function for candidate #1 | -LL | assert_eq!(inference_unstable_iterator::IpuIterator::ipu_flatten(&'x'), 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | assert_eq!(IpuIterator::ipu_flatten(&'x'), 0); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function for candidate #2 | -LL | assert_eq!(inference_unstable_itertools::IpuItertools::ipu_flatten(&'x'), 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | assert_eq!(IpuItertools::ipu_flatten(&'x'), 0); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/infinite/infinite-instantiation.rs b/src/test/ui/infinite/infinite-instantiation.rs index 9fee01c1ba6..cb3550cf66b 100644 --- a/src/test/ui/infinite/infinite-instantiation.rs +++ b/src/test/ui/infinite/infinite-instantiation.rs @@ -19,7 +19,7 @@ impl ToOpt for Option { fn function(counter: usize, t: T) { if counter > 0 { function(counter - 1, t.to_option()); - //~^ ERROR reached the recursion limit while instantiating `function::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` +error: reached the recursion limit while instantiating `function::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/infinite-instantiation.rs:21:9 | LL | function(counter - 1, t.to_option()); diff --git a/src/test/ui/inner-static-type-parameter.stderr b/src/test/ui/inner-static-type-parameter.stderr index 1e74445af55..990e4649a58 100644 --- a/src/test/ui/inner-static-type-parameter.stderr +++ b/src/test/ui/inner-static-type-parameter.stderr @@ -12,7 +12,7 @@ error[E0392]: parameter `T` is never used LL | enum Bar { What } | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/integral-indexing.stderr b/src/test/ui/integral-indexing.stderr index 28ef5937eaa..fcd79d19aac 100644 --- a/src/test/ui/integral-indexing.stderr +++ b/src/test/ui/integral-indexing.stderr @@ -4,8 +4,8 @@ error[E0277]: the type `[isize]` cannot be indexed by `u8` LL | v[3u8]; | ^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `u8` - = note: required because of the requirements on the impl of `std::ops::Index` for `std::vec::Vec` + = help: the trait `SliceIndex<[isize]>` is not implemented for `u8` + = note: required because of the requirements on the impl of `Index` for `Vec` error[E0277]: the type `[isize]` cannot be indexed by `i8` --> $DIR/integral-indexing.rs:7:5 @@ -13,8 +13,8 @@ error[E0277]: the type `[isize]` cannot be indexed by `i8` LL | v[3i8]; | ^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `i8` - = note: required because of the requirements on the impl of `std::ops::Index` for `std::vec::Vec` + = help: the trait `SliceIndex<[isize]>` is not implemented for `i8` + = note: required because of the requirements on the impl of `Index` for `Vec` error[E0277]: the type `[isize]` cannot be indexed by `u32` --> $DIR/integral-indexing.rs:8:5 @@ -22,8 +22,8 @@ error[E0277]: the type `[isize]` cannot be indexed by `u32` LL | v[3u32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `u32` - = note: required because of the requirements on the impl of `std::ops::Index` for `std::vec::Vec` + = help: the trait `SliceIndex<[isize]>` is not implemented for `u32` + = note: required because of the requirements on the impl of `Index` for `Vec` error[E0277]: the type `[isize]` cannot be indexed by `i32` --> $DIR/integral-indexing.rs:9:5 @@ -31,8 +31,8 @@ error[E0277]: the type `[isize]` cannot be indexed by `i32` LL | v[3i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `i32` - = note: required because of the requirements on the impl of `std::ops::Index` for `std::vec::Vec` + = help: the trait `SliceIndex<[isize]>` is not implemented for `i32` + = note: required because of the requirements on the impl of `Index` for `Vec` error[E0277]: the type `[u8]` cannot be indexed by `u8` --> $DIR/integral-indexing.rs:12:5 @@ -40,8 +40,8 @@ error[E0277]: the type `[u8]` cannot be indexed by `u8` LL | s.as_bytes()[3u8]; | ^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8` - = note: required because of the requirements on the impl of `std::ops::Index` for `[u8]` + = help: the trait `SliceIndex<[u8]>` is not implemented for `u8` + = note: required because of the requirements on the impl of `Index` for `[u8]` error[E0277]: the type `[u8]` cannot be indexed by `i8` --> $DIR/integral-indexing.rs:13:5 @@ -49,8 +49,8 @@ error[E0277]: the type `[u8]` cannot be indexed by `i8` LL | s.as_bytes()[3i8]; | ^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `i8` - = note: required because of the requirements on the impl of `std::ops::Index` for `[u8]` + = help: the trait `SliceIndex<[u8]>` is not implemented for `i8` + = note: required because of the requirements on the impl of `Index` for `[u8]` error[E0277]: the type `[u8]` cannot be indexed by `u32` --> $DIR/integral-indexing.rs:14:5 @@ -58,8 +58,8 @@ error[E0277]: the type `[u8]` cannot be indexed by `u32` LL | s.as_bytes()[3u32]; | ^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u32` - = note: required because of the requirements on the impl of `std::ops::Index` for `[u8]` + = help: the trait `SliceIndex<[u8]>` is not implemented for `u32` + = note: required because of the requirements on the impl of `Index` for `[u8]` error[E0277]: the type `[u8]` cannot be indexed by `i32` --> $DIR/integral-indexing.rs:15:5 @@ -67,8 +67,8 @@ error[E0277]: the type `[u8]` cannot be indexed by `i32` LL | s.as_bytes()[3i32]; | ^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `i32` - = note: required because of the requirements on the impl of `std::ops::Index` for `[u8]` + = help: the trait `SliceIndex<[u8]>` is not implemented for `i32` + = note: required because of the requirements on the impl of `Index` for `[u8]` error: aborting due to 8 previous errors diff --git a/src/test/ui/interior-mutability/interior-mutability.rs b/src/test/ui/interior-mutability/interior-mutability.rs index ddc882cccf3..c704acc22af 100644 --- a/src/test/ui/interior-mutability/interior-mutability.rs +++ b/src/test/ui/interior-mutability/interior-mutability.rs @@ -3,5 +3,5 @@ use std::panic::catch_unwind; fn main() { let mut x = Cell::new(22); catch_unwind(|| { x.set(23); }); - //~^ ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a + //~^ ERROR the type `UnsafeCell` may contain interior mutability and a } diff --git a/src/test/ui/interior-mutability/interior-mutability.stderr b/src/test/ui/interior-mutability/interior-mutability.stderr index a25acf10a1a..3e19746cc5c 100644 --- a/src/test/ui/interior-mutability/interior-mutability.stderr +++ b/src/test/ui/interior-mutability/interior-mutability.stderr @@ -1,18 +1,18 @@ -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/interior-mutability.rs:5:5 | LL | catch_unwind(|| { x.set(23); }); - | ^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | ::: $SRC_DIR/std/src/panic.rs:LL:COL | LL | pub fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { - | ---------- required by this bound in `std::panic::catch_unwind` + | ---------- required by this bound in `catch_unwind` | - = help: within `std::cell::Cell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::Cell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::Cell` - = note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35 x:&std::cell::Cell]` + = help: within `Cell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `Cell` + = note: required because of the requirements on the impl of `UnwindSafe` for `&Cell` + = note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:5:18: 5:35 x:&Cell]` error: aborting due to previous error diff --git a/src/test/ui/issue-74047.stderr b/src/test/ui/issue-74047.stderr index 6f477c77ced..8f7c91a78d8 100644 --- a/src/test/ui/issue-74047.stderr +++ b/src/test/ui/issue-74047.stderr @@ -5,7 +5,7 @@ LL | impl TryFrom for MyStream {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Error`, `try_from` in implementation | = help: implement the missing item: `type Error = Type;` - = help: implement the missing item: `fn try_from(_: T) -> std::result::Result>::Error> { todo!() }` + = help: implement the missing item: `fn try_from(_: T) -> std::result::Result>::Error> { todo!() }` error: aborting due to previous error diff --git a/src/test/ui/issues-71798.stderr b/src/test/ui/issues-71798.stderr index b3b29a72641..867f8f0496c 100644 --- a/src/test/ui/issues-71798.stderr +++ b/src/test/ui/issues-71798.stderr @@ -12,7 +12,7 @@ LL | fn test_ref(x: &u32) -> impl std::future::Future + '_ { LL | *x | -- this returned value is of type `u32` | - = help: the trait `std::future::Future` is not implemented for `u32` + = help: the trait `Future` is not implemented for `u32` = note: the return type of a function must have a statically known size error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-10398.stderr b/src/test/ui/issues/issue-10398.stderr index f5f4974265b..8d9faf324e8 100644 --- a/src/test/ui/issues/issue-10398.stderr +++ b/src/test/ui/issues/issue-10398.stderr @@ -6,7 +6,7 @@ LL | let _a = x; LL | drop(x); | ^ value used here after move | - = note: move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x` has type `Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-10412.stderr b/src/test/ui/issues/issue-10412.stderr index d241e6406d5..2a6e2414593 100644 --- a/src/test/ui/issues/issue-10412.stderr +++ b/src/test/ui/issues/issue-10412.stderr @@ -55,7 +55,7 @@ LL | trait Serializable<'self, T> { LL | impl<'self> Serializable for &'self str { | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` help: consider relaxing the implicit `Sized` restriction | LL | trait Serializable<'self, T: ?Sized> { diff --git a/src/test/ui/issues/issue-10465.stderr b/src/test/ui/issues/issue-10465.stderr index 666fb6ab2bb..eb32c8db3f6 100644 --- a/src/test/ui/issues/issue-10465.stderr +++ b/src/test/ui/issues/issue-10465.stderr @@ -1,8 +1,8 @@ -error[E0599]: no method named `foo` found for reference `&b::B` in the current scope +error[E0599]: no method named `foo` found for reference `&B` in the current scope --> $DIR/issue-10465.rs:17:15 | LL | b.foo(); - | ^^^ method not found in `&b::B` + | ^^^ method not found in `&B` | = help: items from traits can only be used if the trait is in scope = note: the following trait is implemented but not in scope; perhaps add a `use` for it: diff --git a/src/test/ui/issues/issue-11374.stderr b/src/test/ui/issues/issue-11374.stderr index bc7d1247502..d6a3e758de8 100644 --- a/src/test/ui/issues/issue-11374.stderr +++ b/src/test/ui/issues/issue-11374.stderr @@ -4,11 +4,11 @@ error[E0308]: mismatched types LL | c.read_to(v); | ^ | | - | expected `&mut [u8]`, found struct `std::vec::Vec` + | expected `&mut [u8]`, found struct `Vec` | help: consider mutably borrowing here: `&mut v` | = note: expected mutable reference `&mut [u8]` - found struct `std::vec::Vec<_>` + found struct `Vec<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11515.stderr b/src/test/ui/issues/issue-11515.stderr index b53563d7b65..7935615ad7e 100644 --- a/src/test/ui/issues/issue-11515.stderr +++ b/src/test/ui/issues/issue-11515.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/issue-11515.rs:9:33 | LL | let test = box Test { func: closure }; - | ^^^^^^^ expected trait `std::ops::FnMut`, found trait `std::ops::Fn` + | ^^^^^^^ expected trait `FnMut`, found trait `Fn` | - = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` - found struct `std::boxed::Box<(dyn std::ops::Fn() + 'static)>` + = note: expected struct `Box<(dyn FnMut() + 'static)>` + found struct `Box<(dyn Fn() + 'static)>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-11771.stderr b/src/test/ui/issues/issue-11771.stderr index e78d8423e83..9f250925e50 100644 --- a/src/test/ui/issues/issue-11771.stderr +++ b/src/test/ui/issues/issue-11771.stderr @@ -4,7 +4,7 @@ error[E0277]: cannot add `()` to `{integer}` LL | 1 + | ^ no implementation for `{integer} + ()` | - = help: the trait `std::ops::Add<()>` is not implemented for `{integer}` + = help: the trait `Add<()>` is not implemented for `{integer}` error[E0277]: cannot add `()` to `{integer}` --> $DIR/issue-11771.rs:8:7 @@ -12,7 +12,7 @@ error[E0277]: cannot add `()` to `{integer}` LL | 1 + | ^ no implementation for `{integer} + ()` | - = help: the trait `std::ops::Add<()>` is not implemented for `{integer}` + = help: the trait `Add<()>` is not implemented for `{integer}` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr index 57533ba5e37..00eecbc9a98 100644 --- a/src/test/ui/issues/issue-11844.stderr +++ b/src/test/ui/issues/issue-11844.stderr @@ -2,11 +2,11 @@ error[E0308]: mismatched types --> $DIR/issue-11844.rs:6:9 | LL | match a { - | - this expression has type `std::option::Option>` + | - this expression has type `Option>` LL | Ok(a) => - | ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` + | ^^^^^ expected enum `Option`, found enum `std::result::Result` | - = note: expected enum `std::option::Option>` + = note: expected enum `Option>` found enum `std::result::Result<_, _>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12041.stderr b/src/test/ui/issues/issue-12041.stderr index d95cc89ce99..b9ffa499afe 100644 --- a/src/test/ui/issues/issue-12041.stderr +++ b/src/test/ui/issues/issue-12041.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value: `tx` LL | let tx = tx; | ^^ value moved here, in previous iteration of loop | - = note: move occurs because `tx` has type `std::sync::mpsc::Sender`, which does not implement the `Copy` trait + = note: move occurs because `tx` has type `Sender`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12127.stderr b/src/test/ui/issues/issue-12127.stderr index b759aa45e3e..e5ac85a1019 100644 --- a/src/test/ui/issues/issue-12127.stderr +++ b/src/test/ui/issues/issue-12127.stderr @@ -11,7 +11,7 @@ note: this value implements `FnOnce`, which causes it to be moved when called | LL | f(); | ^ - = note: move occurs because `f` has type `[closure@$DIR/issue-12127.rs:8:24: 8:41 x:std::boxed::Box]`, which does not implement the `Copy` trait + = note: move occurs because `f` has type `[closure@$DIR/issue-12127.rs:8:24: 8:41 x:Box]`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr index 45fede44106..1594c9f503a 100644 --- a/src/test/ui/issues/issue-12552.stderr +++ b/src/test/ui/issues/issue-12552.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | match t { | - this expression has type `std::result::Result<_, {integer}>` LL | Some(k) => match k { - | ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option` + | ^^^^^^^ expected enum `std::result::Result`, found enum `Option` | = note: expected enum `std::result::Result<_, {integer}>` - found enum `std::option::Option<_>` + found enum `Option<_>` error[E0308]: mismatched types --> $DIR/issue-12552.rs:9:5 @@ -16,10 +16,10 @@ LL | match t { | - this expression has type `std::result::Result<_, {integer}>` ... LL | None => () - | ^^^^ expected enum `std::result::Result`, found enum `std::option::Option` + | ^^^^ expected enum `std::result::Result`, found enum `Option` | = note: expected enum `std::result::Result<_, {integer}>` - found enum `std::option::Option<_>` + found enum `Option<_>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-12997-2.stderr b/src/test/ui/issues/issue-12997-2.stderr index 04464896e92..895b415a7e2 100644 --- a/src/test/ui/issues/issue-12997-2.stderr +++ b/src/test/ui/issues/issue-12997-2.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-12997-2.rs:8:1 | LL | fn bar(x: isize) { } - | ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `&mut test::Bencher` + | ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `&mut Bencher` | = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/issues/issue-13407.stderr b/src/test/ui/issues/issue-13407.stderr index 5352066bf77..4df1813a710 100644 --- a/src/test/ui/issues/issue-13407.stderr +++ b/src/test/ui/issues/issue-13407.stderr @@ -22,7 +22,7 @@ error[E0308]: mismatched types --> $DIR/issue-13407.rs:6:12 | LL | A::C = 1; - | ^ expected struct `A::C`, found integer + | ^ expected struct `C`, found integer error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-13446.stderr b/src/test/ui/issues/issue-13446.stderr index 71d3bfe3398..962f8ee9ddb 100644 --- a/src/test/ui/issues/issue-13446.stderr +++ b/src/test/ui/issues/issue-13446.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/issue-13446.rs:3:26 | LL | static VEC: [u32; 256] = vec![]; - | ^^^^^^ expected array `[u32; 256]`, found struct `std::vec::Vec` + | ^^^^^^ expected array `[u32; 256]`, found struct `Vec` | = note: expected array `[u32; 256]` - found struct `std::vec::Vec<_>` + found struct `Vec<_>` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/issues/issue-13466.rs b/src/test/ui/issues/issue-13466.rs index 411e7cbeebd..8048dae1239 100644 --- a/src/test/ui/issues/issue-13466.rs +++ b/src/test/ui/issues/issue-13466.rs @@ -7,14 +7,14 @@ pub fn main() { let _x: usize = match Some(1) { Ok(u) => u, //~^ ERROR mismatched types - //~| expected enum `std::option::Option<{integer}>` + //~| expected enum `Option<{integer}>` //~| found enum `std::result::Result<_, _>` - //~| expected enum `std::option::Option`, found enum `std::result::Result` + //~| expected enum `Option`, found enum `std::result::Result` Err(e) => panic!(e) //~^ ERROR mismatched types - //~| expected enum `std::option::Option<{integer}>` + //~| expected enum `Option<{integer}>` //~| found enum `std::result::Result<_, _>` - //~| expected enum `std::option::Option`, found enum `std::result::Result` + //~| expected enum `Option`, found enum `std::result::Result` }; } diff --git a/src/test/ui/issues/issue-13466.stderr b/src/test/ui/issues/issue-13466.stderr index 52d9e2a91b9..792cc398bb8 100644 --- a/src/test/ui/issues/issue-13466.stderr +++ b/src/test/ui/issues/issue-13466.stderr @@ -2,23 +2,23 @@ error[E0308]: mismatched types --> $DIR/issue-13466.rs:8:9 | LL | let _x: usize = match Some(1) { - | ------- this expression has type `std::option::Option<{integer}>` + | ------- this expression has type `Option<{integer}>` LL | Ok(u) => u, - | ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` + | ^^^^^ expected enum `Option`, found enum `std::result::Result` | - = note: expected enum `std::option::Option<{integer}>` + = note: expected enum `Option<{integer}>` found enum `std::result::Result<_, _>` error[E0308]: mismatched types --> $DIR/issue-13466.rs:14:9 | LL | let _x: usize = match Some(1) { - | ------- this expression has type `std::option::Option<{integer}>` + | ------- this expression has type `Option<{integer}>` ... LL | Err(e) => panic!(e) - | ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` + | ^^^^^^ expected enum `Option`, found enum `std::result::Result` | - = note: expected enum `std::option::Option<{integer}>` + = note: expected enum `Option<{integer}>` found enum `std::result::Result<_, _>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-13853-2.stderr b/src/test/ui/issues/issue-13853-2.stderr index 49b946b354e..667ddbca97c 100644 --- a/src/test/ui/issues/issue-13853-2.stderr +++ b/src/test/ui/issues/issue-13853-2.stderr @@ -1,4 +1,4 @@ -error[E0615]: attempted to take value of method `get` on type `std::boxed::Box<(dyn ResponseHook + 'static)>` +error[E0615]: attempted to take value of method `get` on type `Box<(dyn ResponseHook + 'static)>` --> $DIR/issue-13853-2.rs:5:43 | LL | fn foo(res : Box) { res.get } diff --git a/src/test/ui/issues/issue-13853.stderr b/src/test/ui/issues/issue-13853.stderr index 3f1b955dddb..527e0225eb9 100644 --- a/src/test/ui/issues/issue-13853.stderr +++ b/src/test/ui/issues/issue-13853.stderr @@ -22,11 +22,11 @@ error[E0308]: mismatched types LL | iterate(graph); | ^^^^^ | | - | expected reference, found struct `std::vec::Vec` + | expected reference, found struct `Vec` | help: consider borrowing here: `&graph` | = note: expected reference `&_` - found struct `std::vec::Vec` + found struct `Vec` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-14366.stderr b/src/test/ui/issues/issue-14366.stderr index 4e41acf433e..d5dab561dde 100644 --- a/src/test/ui/issues/issue-14366.stderr +++ b/src/test/ui/issues/issue-14366.stderr @@ -4,8 +4,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | let _x = "test" as &dyn (::std::any::Any); | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` - = note: required for the cast to the object type `dyn std::any::Any` + = help: the trait `Sized` is not implemented for `str` + = note: required for the cast to the object type `dyn Any` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-14915.rs b/src/test/ui/issues/issue-14915.rs index 4acb51a4e50..909540355ed 100644 --- a/src/test/ui/issues/issue-14915.rs +++ b/src/test/ui/issues/issue-14915.rs @@ -4,5 +4,5 @@ fn main() { let x: Box = box 0; println!("{}", x + 1); - //~^ ERROR cannot add `{integer}` to `std::boxed::Box` + //~^ ERROR cannot add `{integer}` to `Box` } diff --git a/src/test/ui/issues/issue-14915.stderr b/src/test/ui/issues/issue-14915.stderr index 3c34a8a3467..bd0b1d39a53 100644 --- a/src/test/ui/issues/issue-14915.stderr +++ b/src/test/ui/issues/issue-14915.stderr @@ -1,10 +1,10 @@ -error[E0369]: cannot add `{integer}` to `std::boxed::Box` +error[E0369]: cannot add `{integer}` to `Box` --> $DIR/issue-14915.rs:6:22 | LL | println!("{}", x + 1); | - ^ - {integer} | | - | std::boxed::Box + | Box error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15756.stderr b/src/test/ui/issues/issue-15756.stderr index 68ceebc5b65..d9bdc69ad71 100644 --- a/src/test/ui/issues/issue-15756.stderr +++ b/src/test/ui/issues/issue-15756.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[T]` cannot be known at compilation t LL | &mut something | ^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[T]` + = help: the trait `Sized` is not implemented for `[T]` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/src/test/ui/issues/issue-15783.rs b/src/test/ui/issues/issue-15783.rs index 0c1db02a8e6..0b1f4545e88 100644 --- a/src/test/ui/issues/issue-15783.rs +++ b/src/test/ui/issues/issue-15783.rs @@ -7,8 +7,8 @@ fn main() { let x = Some(&[name]); let msg = foo(x); //~^ ERROR mismatched types - //~| expected enum `std::option::Option<&[&str]>` - //~| found enum `std::option::Option<&[&str; 1]>` + //~| expected enum `Option<&[&str]>` + //~| found enum `Option<&[&str; 1]>` //~| expected slice `[&str]`, found array `[&str; 1]` assert_eq!(msg, 3); } diff --git a/src/test/ui/issues/issue-15783.stderr b/src/test/ui/issues/issue-15783.stderr index 74a96df5b1b..0b09751676e 100644 --- a/src/test/ui/issues/issue-15783.stderr +++ b/src/test/ui/issues/issue-15783.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let msg = foo(x); | ^ expected slice `[&str]`, found array `[&str; 1]` | - = note: expected enum `std::option::Option<&[&str]>` - found enum `std::option::Option<&[&str; 1]>` + = note: expected enum `Option<&[&str]>` + found enum `Option<&[&str; 1]>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-15896.rs b/src/test/ui/issues/issue-15896.rs index a11c9d07f6f..d3153b516e6 100644 --- a/src/test/ui/issues/issue-15896.rs +++ b/src/test/ui/issues/issue-15896.rs @@ -10,7 +10,6 @@ fn main() { E::B( Tau{t: x}, //~^ ERROR mismatched types - //~| expected enum `main::R`, found struct `main::Tau` _) => x, }; } diff --git a/src/test/ui/issues/issue-15896.stderr b/src/test/ui/issues/issue-15896.stderr index b3f0907b81d..038337f5acc 100644 --- a/src/test/ui/issues/issue-15896.stderr +++ b/src/test/ui/issues/issue-15896.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/issue-15896.rs:11:11 | LL | let u = match e { - | - this expression has type `main::E` + | - this expression has type `E` LL | E::B( LL | Tau{t: x}, - | ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau` + | ^^^^^^^^^ expected enum `R`, found struct `Tau` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-16538.stderr b/src/test/ui/issues/issue-16538.stderr index 5e1f95a989e..81a91db3711 100644 --- a/src/test/ui/issues/issue-16538.stderr +++ b/src/test/ui/issues/issue-16538.stderr @@ -10,7 +10,7 @@ error[E0277]: `*const usize` cannot be shared between threads safely LL | static foo: *const Y::X = Y::foo(Y::x as *const Y::X); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const usize` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `*const usize` + = help: the trait `Sync` is not implemented for `*const usize` = note: shared static variables must have a type that implements `Sync` error[E0133]: use of extern static is unsafe and requires unsafe function or block diff --git a/src/test/ui/issues/issue-17441.rs b/src/test/ui/issues/issue-17441.rs index b9813ef1eef..e5f83c4ebad 100644 --- a/src/test/ui/issues/issue-17441.rs +++ b/src/test/ui/issues/issue-17441.rs @@ -3,10 +3,10 @@ fn main() { //~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]` let _bar = Box::new(1_usize) as dyn std::fmt::Debug; - //~^ ERROR cast to unsized type: `std::boxed::Box` as `dyn std::fmt::Debug` + //~^ ERROR cast to unsized type: `Box` as `dyn Debug` let _baz = 1_usize as dyn std::fmt::Debug; - //~^ ERROR cast to unsized type: `usize` as `dyn std::fmt::Debug` + //~^ ERROR cast to unsized type: `usize` as `dyn Debug` let _quux = [1_usize, 2] as [usize]; //~^ ERROR cast to unsized type: `[usize; 2]` as `[usize]` diff --git a/src/test/ui/issues/issue-17441.stderr b/src/test/ui/issues/issue-17441.stderr index b63a3995d25..4dbe50178cf 100644 --- a/src/test/ui/issues/issue-17441.stderr +++ b/src/test/ui/issues/issue-17441.stderr @@ -10,7 +10,7 @@ help: consider using an implicit coercion to `&[usize]` instead LL | let _foo = &[1_usize, 2] as [usize]; | ^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0620]: cast to unsized type: `std::boxed::Box` as `dyn std::fmt::Debug` +error[E0620]: cast to unsized type: `Box` as `dyn Debug` --> $DIR/issue-17441.rs:5:16 | LL | let _bar = Box::new(1_usize) as dyn std::fmt::Debug; @@ -18,7 +18,7 @@ LL | let _bar = Box::new(1_usize) as dyn std::fmt::Debug; | | | help: you can cast to a `Box` instead: `Box` -error[E0620]: cast to unsized type: `usize` as `dyn std::fmt::Debug` +error[E0620]: cast to unsized type: `usize` as `dyn Debug` --> $DIR/issue-17441.rs:8:16 | LL | let _baz = 1_usize as dyn std::fmt::Debug; diff --git a/src/test/ui/issues/issue-17651.stderr b/src/test/ui/issues/issue-17651.stderr index 812778911a8..987f4e97f36 100644 --- a/src/test/ui/issues/issue-17651.stderr +++ b/src/test/ui/issues/issue-17651.stderr @@ -4,8 +4,8 @@ error[E0277]: the size for values of type `[{integer}]` cannot be known at compi LL | (|| Box::new(*(&[0][..])))(); | ^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[{integer}]` - = note: required by `std::boxed::Box::::new` + = help: the trait `Sized` is not implemented for `[{integer}]` + = note: required by `Box::::new` error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time --> $DIR/issue-17651.rs:5:9 @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `[{integer}]` cannot be known at compi LL | (|| Box::new(*(&[0][..])))(); | ^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[{integer}]` + = help: the trait `Sized` is not implemented for `[{integer}]` = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/src/test/ui/issues/issue-17718-static-sync.stderr b/src/test/ui/issues/issue-17718-static-sync.stderr index 7f162a9985f..4cd85124c35 100644 --- a/src/test/ui/issues/issue-17718-static-sync.stderr +++ b/src/test/ui/issues/issue-17718-static-sync.stderr @@ -4,7 +4,7 @@ error[E0277]: `Foo` cannot be shared between threads safely LL | static BAR: Foo = Foo; | ^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `Foo` + = help: the trait `Sync` is not implemented for `Foo` = note: shared static variables must have a type that implements `Sync` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17728.nll.stderr b/src/test/ui/issues/issue-17728.nll.stderr index d515cf451c4..a13d2dfa1fb 100644 --- a/src/test/ui/issues/issue-17728.nll.stderr +++ b/src/test/ui/issues/issue-17728.nll.stderr @@ -9,12 +9,12 @@ LL | | "n" | "north" => RoomDirection::North, LL | | "down" => RoomDirection::Down, | | ------------------- this and all prior arms are found to be of type `RoomDirection` LL | | _ => None - | | ^^^^ expected enum `RoomDirection`, found enum `std::option::Option` + | | ^^^^ expected enum `RoomDirection`, found enum `Option` LL | | } | |_____- `match` arms have incompatible types | = note: expected enum `RoomDirection` - found enum `std::option::Option<_>` + found enum `Option<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17728.stderr b/src/test/ui/issues/issue-17728.stderr index 2f9ae63aa41..50e3b853fcb 100644 --- a/src/test/ui/issues/issue-17728.stderr +++ b/src/test/ui/issues/issue-17728.stderr @@ -20,12 +20,12 @@ LL | | "n" | "north" => RoomDirection::North, LL | | "down" => RoomDirection::Down, | | ------------------- this and all prior arms are found to be of type `RoomDirection` LL | | _ => None - | | ^^^^ expected enum `RoomDirection`, found enum `std::option::Option` + | | ^^^^ expected enum `RoomDirection`, found enum `Option` LL | | } | |_____- `match` arms have incompatible types | = note: expected enum `RoomDirection` - found enum `std::option::Option<_>` + found enum `Option<_>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-17904-2.stderr b/src/test/ui/issues/issue-17904-2.stderr index 25f32b66103..62b7b79538c 100644 --- a/src/test/ui/issues/issue-17904-2.stderr +++ b/src/test/ui/issues/issue-17904-2.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | struct Foo where T: Copy; | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17959.rs b/src/test/ui/issues/issue-17959.rs index 01416a0d79e..8bf9e623605 100644 --- a/src/test/ui/issues/issue-17959.rs +++ b/src/test/ui/issues/issue-17959.rs @@ -9,7 +9,7 @@ struct G { } impl Drop for G { -//~^ ERROR `Drop` impl requires `T: std::marker::Sized` +//~^ ERROR `Drop` impl requires `T: Sized` fn drop(&mut self) { if !self._ptr.is_null() { } diff --git a/src/test/ui/issues/issue-17959.stderr b/src/test/ui/issues/issue-17959.stderr index 29d32c1f3ce..f00356f602e 100644 --- a/src/test/ui/issues/issue-17959.stderr +++ b/src/test/ui/issues/issue-17959.stderr @@ -1,4 +1,4 @@ -error[E0367]: `Drop` impl requires `T: std::marker::Sized` but the struct it is implemented for does not +error[E0367]: `Drop` impl requires `T: Sized` but the struct it is implemented for does not --> $DIR/issue-17959.rs:11:6 | LL | impl Drop for G { diff --git a/src/test/ui/issues/issue-18400.stderr b/src/test/ui/issues/issue-18400.stderr index ed9137ce396..35fa5fde0ad 100644 --- a/src/test/ui/issues/issue-18400.stderr +++ b/src/test/ui/issues/issue-18400.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `_: std::marker::Sized` +error[E0275]: overflow evaluating the requirement `_: Sized` --> $DIR/issue-18400.rs:24:7 | LL | 0.contains(bits); diff --git a/src/test/ui/issues/issue-18783.stderr b/src/test/ui/issues/issue-18783.stderr index 047b42578a2..cc223ac464c 100644 --- a/src/test/ui/issues/issue-18783.stderr +++ b/src/test/ui/issues/issue-18783.stderr @@ -11,7 +11,7 @@ LL | c.push(Box::new(|| y = 0)); | second mutable borrow occurs here LL | LL | } - | - first borrow might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` + | - first borrow might be used here, when `c` is dropped and runs the destructor for type `RefCell>>` error[E0499]: cannot borrow `y` as mutable more than once at a time --> $DIR/issue-18783.rs:16:29 @@ -26,7 +26,7 @@ LL | Push::push(&c, Box::new(|| y = 0)); | second mutable borrow occurs here LL | LL | } - | - first borrow might be used here, when `c` is dropped and runs the destructor for type `std::cell::RefCell>>` + | - first borrow might be used here, when `c` is dropped and runs the destructor for type `RefCell>>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-18919.stderr b/src/test/ui/issues/issue-18919.stderr index 3b5dfd1ad15..ece714c949c 100644 --- a/src/test/ui/issues/issue-18919.stderr +++ b/src/test/ui/issues/issue-18919.stderr @@ -1,4 +1,4 @@ -error[E0277]: the size for values of type `dyn for<'r> std::ops::Fn(&'r isize) -> isize` cannot be known at compilation time +error[E0277]: the size for values of type `dyn for<'r> Fn(&'r isize) -> isize` cannot be known at compilation time --> $DIR/issue-18919.rs:3:15 | LL | fn ho_func(f: Option) { @@ -7,7 +7,7 @@ LL | fn ho_func(f: Option) { LL | enum Option { | - required by this bound in `Option` | - = help: the trait `std::marker::Sized` is not implemented for `dyn for<'r> std::ops::Fn(&'r isize) -> isize` + = help: the trait `Sized` is not implemented for `dyn for<'r> Fn(&'r isize) -> isize` help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/issue-18919.rs:7:13 | diff --git a/src/test/ui/issues/issue-1920-1.rs b/src/test/ui/issues/issue-1920-1.rs index 996052d7495..26553f56b84 100644 --- a/src/test/ui/issues/issue-1920-1.rs +++ b/src/test/ui/issues/issue-1920-1.rs @@ -10,5 +10,5 @@ fn assert_clone() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR `foo::issue_1920::S: std::clone::Clone` is not satisfied + //~^ ERROR `S: Clone` is not satisfied } diff --git a/src/test/ui/issues/issue-1920-1.stderr b/src/test/ui/issues/issue-1920-1.stderr index 3130434f6f6..0a2459c3a5d 100644 --- a/src/test/ui/issues/issue-1920-1.stderr +++ b/src/test/ui/issues/issue-1920-1.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `foo::issue_1920::S: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `S: Clone` is not satisfied --> $DIR/issue-1920-1.rs:12:20 | LL | fn assert_clone() where T : Clone { } | ----- required by this bound in `assert_clone` ... LL | assert_clone::(); - | ^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `foo::issue_1920::S` + | ^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `S` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1920-2.rs b/src/test/ui/issues/issue-1920-2.rs index 56d842ec4a0..8d4a5f66310 100644 --- a/src/test/ui/issues/issue-1920-2.rs +++ b/src/test/ui/issues/issue-1920-2.rs @@ -8,5 +8,5 @@ fn assert_clone() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR `bar::S: std::clone::Clone` is not satisfied + //~^ ERROR `S: Clone` is not satisfied } diff --git a/src/test/ui/issues/issue-1920-2.stderr b/src/test/ui/issues/issue-1920-2.stderr index 1084c47f001..06bc78a387f 100644 --- a/src/test/ui/issues/issue-1920-2.stderr +++ b/src/test/ui/issues/issue-1920-2.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `bar::S: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `S: Clone` is not satisfied --> $DIR/issue-1920-2.rs:10:20 | LL | fn assert_clone() where T : Clone { } | ----- required by this bound in `assert_clone` ... LL | assert_clone::(); - | ^^^^^^ the trait `std::clone::Clone` is not implemented for `bar::S` + | ^^^^^^ the trait `Clone` is not implemented for `S` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-1920-3.rs b/src/test/ui/issues/issue-1920-3.rs index 83f3fdb9eb3..520db50f94a 100644 --- a/src/test/ui/issues/issue-1920-3.rs +++ b/src/test/ui/issues/issue-1920-3.rs @@ -12,5 +12,5 @@ fn assert_clone() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR `issue_1920::S: std::clone::Clone` is not satisfied + //~^ ERROR `S: Clone` is not satisfied } diff --git a/src/test/ui/issues/issue-1920-3.stderr b/src/test/ui/issues/issue-1920-3.stderr index 11740317e54..48d3105bf9d 100644 --- a/src/test/ui/issues/issue-1920-3.stderr +++ b/src/test/ui/issues/issue-1920-3.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `issue_1920::S: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `S: Clone` is not satisfied --> $DIR/issue-1920-3.rs:14:20 | LL | fn assert_clone() where T : Clone { } | ----- required by this bound in `assert_clone` ... LL | assert_clone::(); - | ^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `issue_1920::S` + | ^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `S` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-19538.stderr b/src/test/ui/issues/issue-19538.stderr index b6033e47b1a..71a013248cf 100644 --- a/src/test/ui/issues/issue-19538.stderr +++ b/src/test/ui/issues/issue-19538.stderr @@ -25,7 +25,7 @@ LL | let test: &mut dyn Bar = &mut thing; | ^^^^^^^^^^ the trait `Bar` cannot be made into an object | = help: consider moving `foo` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&mut dyn Bar>` for `&mut Thing` + = note: required because of the requirements on the impl of `CoerceUnsized<&mut dyn Bar>` for `&mut Thing` = note: required by cast to type `&mut dyn Bar` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-20005.stderr b/src/test/ui/issues/issue-20005.stderr index cbaa7507244..bc414044f78 100644 --- a/src/test/ui/issues/issue-20005.stderr +++ b/src/test/ui/issues/issue-20005.stderr @@ -9,8 +9,8 @@ LL | ) -> >::Result where Dst: From { | help: consider further restricting `Self` | -LL | ) -> >::Result where Dst: From, Self: std::marker::Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | ) -> >::Result where Dst: From, Self: Sized { + | ^^^^^^^^^^^^^ help: consider relaxing the implicit `Sized` restriction | LL | trait From { diff --git a/src/test/ui/issues/issue-20162.rs b/src/test/ui/issues/issue-20162.rs index b7f9caee894..b491bc37f51 100644 --- a/src/test/ui/issues/issue-20162.rs +++ b/src/test/ui/issues/issue-20162.rs @@ -3,5 +3,5 @@ struct X { x: i32 } fn main() { let mut b: Vec = vec![]; b.sort(); - //~^ ERROR `X: std::cmp::Ord` is not satisfied + //~^ ERROR `X: Ord` is not satisfied } diff --git a/src/test/ui/issues/issue-20162.stderr b/src/test/ui/issues/issue-20162.stderr index 1d0d6d5c5d7..ef1eb2ea6c0 100644 --- a/src/test/ui/issues/issue-20162.stderr +++ b/src/test/ui/issues/issue-20162.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `X: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `X: Ord` is not satisfied --> $DIR/issue-20162.rs:5:7 | LL | b.sort(); - | ^^^^ the trait `std::cmp::Ord` is not implemented for `X` + | ^^^^ the trait `Ord` is not implemented for `X` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20413.stderr b/src/test/ui/issues/issue-20413.stderr index a3eb4fec70f..3f96f0bfcd3 100644 --- a/src/test/ui/issues/issue-20413.stderr +++ b/src/test/ui/issues/issue-20413.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `T` is never used LL | struct NoData; | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error[E0275]: overflow evaluating the requirement `NoData>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo` --> $DIR/issue-20413.rs:8:36 diff --git a/src/test/ui/issues/issue-20433.stderr b/src/test/ui/issues/issue-20433.stderr index fda3f2f5db7..3c14226b734 100644 --- a/src/test/ui/issues/issue-20433.stderr +++ b/src/test/ui/issues/issue-20433.stderr @@ -7,9 +7,9 @@ LL | fn iceman(c: Vec<[i32]>) {} ::: $SRC_DIR/alloc/src/vec.rs:LL:COL | LL | pub struct Vec { - | - required by this bound in `std::vec::Vec` + | - required by this bound in `Vec` | - = help: the trait `std::marker::Sized` is not implemented for `[i32]` + = help: the trait `Sized` is not implemented for `[i32]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20605.stderr b/src/test/ui/issues/issue-20605.stderr index 5e06e3bc95c..e8d16a55e92 100644 --- a/src/test/ui/issues/issue-20605.stderr +++ b/src/test/ui/issues/issue-20605.stderr @@ -1,11 +1,11 @@ -error[E0277]: the size for values of type `dyn std::iter::Iterator` cannot be known at compilation time +error[E0277]: the size for values of type `dyn Iterator` cannot be known at compilation time --> $DIR/issue-20605.rs:2:17 | LL | for item in *things { *item = 0 } | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `dyn std::iter::Iterator` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Sized` is not implemented for `dyn Iterator` + = note: required by `into_iter` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-20692.stderr b/src/test/ui/issues/issue-20692.stderr index ca2611e0f9e..0badf66ba7d 100644 --- a/src/test/ui/issues/issue-20692.stderr +++ b/src/test/ui/issues/issue-20692.stderr @@ -22,7 +22,7 @@ LL | trait Array: Sized + Copy {} LL | let _ = x | ^ the trait `Array` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Array>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Array>` for `&T` = note: required by cast to type `&dyn Array` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-2111.stderr b/src/test/ui/issues/issue-2111.stderr index aab2559a155..a39a479e078 100644 --- a/src/test/ui/issues/issue-2111.stderr +++ b/src/test/ui/issues/issue-2111.stderr @@ -5,7 +5,7 @@ LL | match (a,b) { | ^^^^^ pattern `(None, None)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `(std::option::Option, std::option::Option)` + = note: the matched value is of type `(Option, Option)` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-21160.rs b/src/test/ui/issues/issue-21160.rs index 46733566cf3..10136ba11aa 100644 --- a/src/test/ui/issues/issue-21160.rs +++ b/src/test/ui/issues/issue-21160.rs @@ -6,6 +6,6 @@ impl Bar { #[derive(Hash)] struct Foo(Bar); -//~^ error: `Bar: std::hash::Hash` is not satisfied +//~^ error: `Bar: Hash` is not satisfied fn main() {} diff --git a/src/test/ui/issues/issue-21160.stderr b/src/test/ui/issues/issue-21160.stderr index aaba014fcbe..b6ebfb35560 100644 --- a/src/test/ui/issues/issue-21160.stderr +++ b/src/test/ui/issues/issue-21160.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Bar: std::hash::Hash` is not satisfied +error[E0277]: the trait bound `Bar: Hash` is not satisfied --> $DIR/issue-21160.rs:8:12 | LL | struct Foo(Bar); - | ^^^ the trait `std::hash::Hash` is not implemented for `Bar` + | ^^^ the trait `Hash` is not implemented for `Bar` | ::: $SRC_DIR/core/src/hash/mod.rs:LL:COL | diff --git a/src/test/ui/issues/issue-21332.rs b/src/test/ui/issues/issue-21332.rs index db157f095a9..1b13f000b8c 100644 --- a/src/test/ui/issues/issue-21332.rs +++ b/src/test/ui/issues/issue-21332.rs @@ -4,7 +4,7 @@ impl Iterator for S { type Item = i32; fn next(&mut self) -> Result { Ok(7) } //~^ ERROR method `next` has an incompatible type for trait - //~| expected enum `std::option::Option`, found enum `std::result::Result` + //~| expected enum `Option`, found enum `std::result::Result` } fn main() {} diff --git a/src/test/ui/issues/issue-21332.stderr b/src/test/ui/issues/issue-21332.stderr index ace3e014647..1d6ddd2660e 100644 --- a/src/test/ui/issues/issue-21332.stderr +++ b/src/test/ui/issues/issue-21332.stderr @@ -2,9 +2,9 @@ error[E0053]: method `next` has an incompatible type for trait --> $DIR/issue-21332.rs:5:5 | LL | fn next(&mut self) -> Result { Ok(7) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found enum `std::result::Result` | - = note: expected fn pointer `fn(&mut S) -> std::option::Option` + = note: expected fn pointer `fn(&mut S) -> Option` found fn pointer `fn(&mut S) -> std::result::Result` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-21596.stderr b/src/test/ui/issues/issue-21596.stderr index 3e0a532b2b8..70b975524e0 100644 --- a/src/test/ui/issues/issue-21596.stderr +++ b/src/test/ui/issues/issue-21596.stderr @@ -8,7 +8,7 @@ LL | println!("{}", z.to_string()); = note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior = note: the method `to_string` exists but the following trait bounds were not satisfied: `*const u8: std::fmt::Display` - which is required by `*const u8: std::string::ToString` + which is required by `*const u8: ToString` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-21763.rs b/src/test/ui/issues/issue-21763.rs index 29ee5f91717..5beb1d8b8c4 100644 --- a/src/test/ui/issues/issue-21763.rs +++ b/src/test/ui/issues/issue-21763.rs @@ -7,5 +7,5 @@ fn foo() {} fn main() { foo::, Rc<()>>>(); - //~^ ERROR `std::rc::Rc<()>` cannot be sent between threads safely + //~^ ERROR `Rc<()>` cannot be sent between threads safely } diff --git a/src/test/ui/issues/issue-21763.stderr b/src/test/ui/issues/issue-21763.stderr index 3ec876f37d4..4d27f507e26 100644 --- a/src/test/ui/issues/issue-21763.stderr +++ b/src/test/ui/issues/issue-21763.stderr @@ -1,17 +1,17 @@ -error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely +error[E0277]: `Rc<()>` cannot be sent between threads safely --> $DIR/issue-21763.rs:9:5 | LL | fn foo() {} | ---- required by this bound in `foo` ... LL | foo::, Rc<()>>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely | - = help: within `(std::rc::Rc<()>, std::rc::Rc<()>)`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` - = note: required because it appears within the type `(std::rc::Rc<()>, std::rc::Rc<()>)` - = note: required because of the requirements on the impl of `std::marker::Send` for `hashbrown::raw::RawTable<(std::rc::Rc<()>, std::rc::Rc<()>)>` - = note: required because it appears within the type `hashbrown::map::HashMap, std::rc::Rc<()>, std::collections::hash_map::RandomState>` - = note: required because it appears within the type `std::collections::HashMap, std::rc::Rc<()>>` + = help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>` + = note: required because it appears within the type `(Rc<()>, Rc<()>)` + = note: required because of the requirements on the impl of `Send` for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` + = note: required because it appears within the type `hashbrown::map::HashMap, Rc<()>, RandomState>` + = note: required because it appears within the type `HashMap, Rc<()>>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22034.rs b/src/test/ui/issues/issue-22034.rs index fab1cdadaf5..405ffd089c2 100644 --- a/src/test/ui/issues/issue-22034.rs +++ b/src/test/ui/issues/issue-22034.rs @@ -6,6 +6,6 @@ fn main() { let ptr: *mut () = core::ptr::null_mut(); let _: &mut dyn Fn() = unsafe { &mut *(ptr as *mut dyn Fn()) - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `()` + //~^ ERROR expected a `Fn<()>` closure, found `()` }; } diff --git a/src/test/ui/issues/issue-22034.stderr b/src/test/ui/issues/issue-22034.stderr index 132880aab11..edcd21ebd6b 100644 --- a/src/test/ui/issues/issue-22034.stderr +++ b/src/test/ui/issues/issue-22034.stderr @@ -1,12 +1,12 @@ -error[E0277]: expected a `std::ops::Fn<()>` closure, found `()` +error[E0277]: expected a `Fn<()>` closure, found `()` --> $DIR/issue-22034.rs:8:16 | LL | &mut *(ptr as *mut dyn Fn()) | ^^^ expected an `Fn<()>` closure, found `()` | - = help: the trait `std::ops::Fn<()>` is not implemented for `()` + = help: the trait `Fn<()>` is not implemented for `()` = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }` - = note: required for the cast to the object type `dyn std::ops::Fn()` + = note: required for the cast to the object type `dyn Fn()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22289.stderr b/src/test/ui/issues/issue-22289.stderr index 4c35deb1fbe..60027853609 100644 --- a/src/test/ui/issues/issue-22289.stderr +++ b/src/test/ui/issues/issue-22289.stderr @@ -1,4 +1,4 @@ -error[E0605]: non-primitive cast: `i32` as `&(dyn std::any::Any + 'static)` +error[E0605]: non-primitive cast: `i32` as `&(dyn Any + 'static)` --> $DIR/issue-22289.rs:2:5 | LL | 0 as &dyn std::any::Any; diff --git a/src/test/ui/issues/issue-22312.stderr b/src/test/ui/issues/issue-22312.stderr index 28564b07463..823ffc6de6d 100644 --- a/src/test/ui/issues/issue-22312.stderr +++ b/src/test/ui/issues/issue-22312.stderr @@ -1,4 +1,4 @@ -error[E0605]: non-primitive cast: `Self` as `&dyn std::ops::Index>::Output>` +error[E0605]: non-primitive cast: `Self` as `&dyn Index>::Output>` --> $DIR/issue-22312.rs:11:24 | LL | let indexer = &(*self as &dyn Index>::Output>); diff --git a/src/test/ui/issues/issue-22872.stderr b/src/test/ui/issues/issue-22872.stderr index 038490bbd7c..c65a97d9999 100644 --- a/src/test/ui/issues/issue-22872.stderr +++ b/src/test/ui/issues/issue-22872.stderr @@ -4,13 +4,13 @@ error[E0277]: `

>::Item` is not an iterator LL | let _: Box Wrap<'b>> = Box::new(Wrapper(process)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `

>::Item` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `

>::Item` + = help: the trait `Iterator` is not implemented for `

>::Item` = note: required because of the requirements on the impl of `for<'b> Wrap<'b>` for `Wrapper

` = note: required for the cast to the object type `dyn for<'b> Wrap<'b>` help: consider further restricting the associated type | -LL | fn push_process

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

>::Item: std::iter::Iterator { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn push_process

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

>::Item: Iterator { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-22874.stderr b/src/test/ui/issues/issue-22874.stderr index 6f22fe6a997..d6489908044 100644 --- a/src/test/ui/issues/issue-22874.stderr +++ b/src/test/ui/issues/issue-22874.stderr @@ -1,10 +1,10 @@ -error[E0277]: the size for values of type `[std::string::String]` cannot be known at compilation time +error[E0277]: the size for values of type `[String]` cannot be known at compilation time --> $DIR/issue-22874.rs:2:11 | LL | rows: [[String]], | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[std::string::String]` + = help: the trait `Sized` is not implemented for `[String]` = note: slice and array elements must have `Sized` type error: aborting due to previous error diff --git a/src/test/ui/issues/issue-23024.rs b/src/test/ui/issues/issue-23024.rs index 63675368162..ddeb516a4b0 100644 --- a/src/test/ui/issues/issue-23024.rs +++ b/src/test/ui/issues/issue-23024.rs @@ -9,5 +9,5 @@ fn main() println!("{:?}",(vfnfer[0] as dyn Fn)(3)); //~^ ERROR the precise format of `Fn`-family traits' //~| ERROR wrong number of type arguments: expected 1, found 0 [E0107] - //~| ERROR the value of the associated type `Output` (from trait `std::ops::FnOnce`) + //~| ERROR the value of the associated type `Output` (from trait `FnOnce`) } diff --git a/src/test/ui/issues/issue-23024.stderr b/src/test/ui/issues/issue-23024.stderr index f9403cd077d..fdb68ff7126 100644 --- a/src/test/ui/issues/issue-23024.stderr +++ b/src/test/ui/issues/issue-23024.stderr @@ -13,7 +13,7 @@ error[E0107]: wrong number of type arguments: expected 1, found 0 LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); | ^^ expected 1 type argument -error[E0191]: the value of the associated type `Output` (from trait `std::ops::FnOnce`) must be specified +error[E0191]: the value of the associated type `Output` (from trait `FnOnce`) must be specified --> $DIR/issue-23024.rs:9:39 | LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); diff --git a/src/test/ui/issues/issue-23122-2.stderr b/src/test/ui/issues/issue-23122-2.stderr index c4032b27edc..60dbb15d0f9 100644 --- a/src/test/ui/issues/issue-23122-2.stderr +++ b/src/test/ui/issues/issue-23122-2.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: std::marker::Sized` +error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` --> $DIR/issue-23122-2.rs:7:15 | LL | impl Next for GetNext { @@ -7,7 +7,7 @@ LL | impl Next for GetNext { = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_23122_2`) = note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` -error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: std::marker::Sized` +error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` --> $DIR/issue-23122-2.rs:9:5 | LL | type Next = as Next>::Next; diff --git a/src/test/ui/issues/issue-23281.stderr b/src/test/ui/issues/issue-23281.stderr index 46b4be6fd36..d8046497b98 100644 --- a/src/test/ui/issues/issue-23281.stderr +++ b/src/test/ui/issues/issue-23281.stderr @@ -1,4 +1,4 @@ -error[E0277]: the size for values of type `(dyn std::ops::Fn() + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn Fn() + 'static)` cannot be known at compilation time --> $DIR/issue-23281.rs:4:27 | LL | pub fn function(funs: Vec ()>) {} @@ -7,7 +7,7 @@ LL | pub fn function(funs: Vec ()>) {} LL | struct Vec { | - required by this bound in `Vec` | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::Fn() + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Fn() + 'static)` help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/issue-23281.rs:8:12 | diff --git a/src/test/ui/issues/issue-23966.stderr b/src/test/ui/issues/issue-23966.stderr index c2fe6d92b91..fff9b3c303a 100644 --- a/src/test/ui/issues/issue-23966.stderr +++ b/src/test/ui/issues/issue-23966.stderr @@ -1,10 +1,10 @@ -error[E0277]: expected a `std::ops::FnMut<(_, char)>` closure, found `()` +error[E0277]: expected a `FnMut<(_, char)>` closure, found `()` --> $DIR/issue-23966.rs:2:32 | LL | "".chars().fold(|_, _| (), ()); | ^^ expected an `FnMut<(_, char)>` closure, found `()` | - = help: the trait `std::ops::FnMut<(_, char)>` is not implemented for `()` + = help: the trait `FnMut<(_, char)>` is not implemented for `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24352.stderr b/src/test/ui/issues/issue-24352.stderr index a315ca8b08f..69cd7789065 100644 --- a/src/test/ui/issues/issue-24352.stderr +++ b/src/test/ui/issues/issue-24352.stderr @@ -4,7 +4,7 @@ error[E0277]: cannot subtract `{integer}` from `f64` LL | 1.0f64 - 1 | ^ no implementation for `f64 - {integer}` | - = help: the trait `std::ops::Sub<{integer}>` is not implemented for `f64` + = help: the trait `Sub<{integer}>` is not implemented for `f64` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24446.stderr b/src/test/ui/issues/issue-24446.stderr index d2714408d8a..1674fa8af28 100644 --- a/src/test/ui/issues/issue-24446.stderr +++ b/src/test/ui/issues/issue-24446.stderr @@ -1,10 +1,10 @@ -error[E0277]: the size for values of type `(dyn std::ops::Fn() -> u32 + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time --> $DIR/issue-24446.rs:2:17 | LL | static foo: dyn Fn() -> u32 = || -> u32 { | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::Fn() -> u32 + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-24819.rs b/src/test/ui/issues/issue-24819.rs index 1155e8d5d54..59c3f2cd114 100644 --- a/src/test/ui/issues/issue-24819.rs +++ b/src/test/ui/issues/issue-24819.rs @@ -4,7 +4,7 @@ fn main() { let mut v = Vec::new(); foo(&mut v); //~^ ERROR mismatched types - //~| expected struct `std::collections::HashSet`, found struct `std::vec::Vec` + //~| expected struct `HashSet`, found struct `Vec` } fn foo(h: &mut HashSet) { diff --git a/src/test/ui/issues/issue-24819.stderr b/src/test/ui/issues/issue-24819.stderr index 1166a887f86..2f931e59d59 100644 --- a/src/test/ui/issues/issue-24819.stderr +++ b/src/test/ui/issues/issue-24819.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/issue-24819.rs:5:9 | LL | foo(&mut v); - | ^^^^^^ expected struct `std::collections::HashSet`, found struct `std::vec::Vec` + | ^^^^^^ expected struct `HashSet`, found struct `Vec` | - = note: expected mutable reference `&mut std::collections::HashSet` - found mutable reference `&mut std::vec::Vec<_>` + = note: expected mutable reference `&mut HashSet` + found mutable reference `&mut Vec<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-25368.stderr b/src/test/ui/issues/issue-25368.stderr index a09de86a708..6a970bc0494 100644 --- a/src/test/ui/issues/issue-25368.stderr +++ b/src/test/ui/issues/issue-25368.stderr @@ -1,8 +1,8 @@ -error[E0282]: type annotations needed for `(std::sync::mpsc::Sender>, std::sync::mpsc::Receiver>)` +error[E0282]: type annotations needed for `(Sender>, std::sync::mpsc::Receiver>)` --> $DIR/issue-25368.rs:11:17 | LL | let (tx, rx) = channel(); - | -------- consider giving this pattern the explicit type `(std::sync::mpsc::Sender>, std::sync::mpsc::Receiver>)`, where the type parameter `T` is specified + | -------- consider giving this pattern the explicit type `(Sender>, std::sync::mpsc::Receiver>)`, where the type parameter `T` is specified ... LL | tx.send(Foo{ foo: PhantomData }); | ^^^ cannot infer type for type parameter `T` declared on the struct `Foo` diff --git a/src/test/ui/issues/issue-25386.rs b/src/test/ui/issues/issue-25386.rs index 45775e0e4ae..a76d8a615f6 100644 --- a/src/test/ui/issues/issue-25386.rs +++ b/src/test/ui/issues/issue-25386.rs @@ -17,12 +17,12 @@ mod stuff { macro_rules! check_ptr_exist { ($var:expr, $member:ident) => ( (*$var.c_object).$member.is_some() - //~^ ERROR field `c_object` of struct `stuff::Item` is private + //~^ ERROR field `c_object` of struct `Item` is private ); } fn main() { let item = stuff::Item::new(); println!("{}", check_ptr_exist!(item, name)); - //~^ ERROR field `name` of struct `stuff::CObj` is private + //~^ ERROR field `name` of struct `CObj` is private } diff --git a/src/test/ui/issues/issue-25386.stderr b/src/test/ui/issues/issue-25386.stderr index 6419e7a5571..dcf2f5afa5c 100644 --- a/src/test/ui/issues/issue-25386.stderr +++ b/src/test/ui/issues/issue-25386.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `c_object` of struct `stuff::Item` is private +error[E0616]: field `c_object` of struct `Item` is private --> $DIR/issue-25386.rs:19:16 | LL | (*$var.c_object).$member.is_some() @@ -9,7 +9,7 @@ LL | println!("{}", check_ptr_exist!(item, name)); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0616]: field `name` of struct `stuff::CObj` is private +error[E0616]: field `name` of struct `CObj` is private --> $DIR/issue-25386.rs:26:43 | LL | println!("{}", check_ptr_exist!(item, name)); diff --git a/src/test/ui/issues/issue-2590.stderr b/src/test/ui/issues/issue-2590.stderr index 3517d92403f..6aacd563af1 100644 --- a/src/test/ui/issues/issue-2590.stderr +++ b/src/test/ui/issues/issue-2590.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of `self.tokens` which is behind a shared referenc --> $DIR/issue-2590.rs:11:9 | LL | self.tokens - | ^^^^^^^^^^^ move occurs because `self.tokens` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^^^^^^^^^^ move occurs because `self.tokens` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-26472.rs b/src/test/ui/issues/issue-26472.rs index 4eb38d10a70..b100c59ad0b 100644 --- a/src/test/ui/issues/issue-26472.rs +++ b/src/test/ui/issues/issue-26472.rs @@ -8,6 +8,6 @@ mod sub { fn main() { let s = sub::S::new(); - let v = s.len; //~ ERROR field `len` of struct `sub::S` is private - s.len = v; //~ ERROR field `len` of struct `sub::S` is private + let v = s.len; //~ ERROR field `len` of struct `S` is private + s.len = v; //~ ERROR field `len` of struct `S` is private } diff --git a/src/test/ui/issues/issue-26472.stderr b/src/test/ui/issues/issue-26472.stderr index f7df5b6232b..8e95b2ff688 100644 --- a/src/test/ui/issues/issue-26472.stderr +++ b/src/test/ui/issues/issue-26472.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `len` of struct `sub::S` is private +error[E0616]: field `len` of struct `S` is private --> $DIR/issue-26472.rs:11:15 | LL | let v = s.len; @@ -9,7 +9,7 @@ help: a method `len` also exists, call it with parentheses LL | let v = s.len(); | ^^ -error[E0616]: field `len` of struct `sub::S` is private +error[E0616]: field `len` of struct `S` is private --> $DIR/issue-26472.rs:12:7 | LL | s.len = v; diff --git a/src/test/ui/issues/issue-27060-2.stderr b/src/test/ui/issues/issue-27060-2.stderr index 5dbcc96e874..c4faecbdf2f 100644 --- a/src/test/ui/issues/issue-27060-2.stderr +++ b/src/test/ui/issues/issue-27060-2.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/issue-27060-2.rs:3:11 | LL | pub struct Bad { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | data: T, | ^ doesn't have a size known at compile-time | diff --git a/src/test/ui/issues/issue-27078.stderr b/src/test/ui/issues/issue-27078.stderr index de1810e99aa..006389f7537 100644 --- a/src/test/ui/issues/issue-27078.stderr +++ b/src/test/ui/issues/issue-27078.stderr @@ -7,8 +7,8 @@ LL | fn foo(self) -> &'static i32 { = help: unsized locals are gated as an unstable feature help: consider further restricting `Self` | -LL | fn foo(self) -> &'static i32 where Self: std::marker::Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn foo(self) -> &'static i32 where Self: Sized { + | ^^^^^^^^^^^^^^^^^ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn foo(&self) -> &'static i32 { diff --git a/src/test/ui/issues/issue-2718-a.rs b/src/test/ui/issues/issue-2718-a.rs index 188168bb94c..6c491584540 100644 --- a/src/test/ui/issues/issue-2718-a.rs +++ b/src/test/ui/issues/issue-2718-a.rs @@ -6,7 +6,7 @@ mod pingpong { use SendPacket; pub type Ping = SendPacket; pub struct Pong(SendPacket); - //~^ ERROR recursive type `pingpong::Pong` has infinite size + //~^ ERROR recursive type `Pong` has infinite size } fn main() {} diff --git a/src/test/ui/issues/issue-2718-a.stderr b/src/test/ui/issues/issue-2718-a.stderr index d152ffde4e5..5c6c99a1ff2 100644 --- a/src/test/ui/issues/issue-2718-a.stderr +++ b/src/test/ui/issues/issue-2718-a.stderr @@ -1,4 +1,4 @@ -error[E0072]: recursive type `pingpong::Pong` has infinite size +error[E0072]: recursive type `Pong` has infinite size --> $DIR/issue-2718-a.rs:8:5 | LL | pub struct Pong(SendPacket); @@ -7,7 +7,7 @@ LL | pub struct Pong(SendPacket); | | recursive without indirection | recursive type has infinite size | -help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `pingpong::Pong` representable +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `Pong` representable | LL | pub struct Pong(Box>); | ^^^^ ^ diff --git a/src/test/ui/issues/issue-27282-move-ref-mut-into-guard.stderr b/src/test/ui/issues/issue-27282-move-ref-mut-into-guard.stderr index 30cf0d66afa..7895cefb4cb 100644 --- a/src/test/ui/issues/issue-27282-move-ref-mut-into-guard.stderr +++ b/src/test/ui/issues/issue-27282-move-ref-mut-into-guard.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `foo` in pattern guard LL | if { (|| { let bar = foo; bar.take() })(); false } => {}, | ^^ --- | | | - | | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait + | | move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait | | move occurs due to use in closure | move out of `foo` occurs here | diff --git a/src/test/ui/issues/issue-28098.stderr b/src/test/ui/issues/issue-28098.stderr index 8b724b9331d..df552fc2d0e 100644 --- a/src/test/ui/issues/issue-28098.stderr +++ b/src/test/ui/issues/issue-28098.stderr @@ -4,7 +4,7 @@ error[E0277]: `()` is not an iterator LL | let _ = Iterator::next(&mut ()); | ^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` = note: required by `std::iter::Iterator::next` error[E0277]: `bool` is not an iterator @@ -13,8 +13,8 @@ error[E0277]: `bool` is not an iterator LL | for _ in false {} | ^^^^^ `bool` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `bool` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `bool` + = note: required by `into_iter` error[E0277]: `()` is not an iterator --> $DIR/issue-28098.rs:9:28 @@ -22,7 +22,7 @@ error[E0277]: `()` is not an iterator LL | let _ = Iterator::next(&mut ()); | ^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` = note: required by `std::iter::Iterator::next` error[E0277]: `()` is not an iterator @@ -31,7 +31,7 @@ error[E0277]: `()` is not an iterator LL | let _ = Iterator::next(&mut ()); | ^^^^^^^^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` error[E0277]: `()` is not an iterator --> $DIR/issue-28098.rs:18:28 @@ -39,7 +39,7 @@ error[E0277]: `()` is not an iterator LL | let _ = Iterator::next(&mut ()); | ^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` = note: required by `std::iter::Iterator::next` error[E0277]: `()` is not an iterator @@ -48,7 +48,7 @@ error[E0277]: `()` is not an iterator LL | let _ = Iterator::next(&mut ()); | ^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` = note: required by `std::iter::Iterator::next` error[E0277]: `bool` is not an iterator @@ -57,8 +57,8 @@ error[E0277]: `bool` is not an iterator LL | for _ in false {} | ^^^^^ `bool` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `bool` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `bool` + = note: required by `into_iter` error[E0277]: `()` is not an iterator --> $DIR/issue-28098.rs:18:13 @@ -66,7 +66,7 @@ error[E0277]: `()` is not an iterator LL | let _ = Iterator::next(&mut ()); | ^^^^^^^^^^^^^^ `()` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `()` + = help: the trait `Iterator` is not implemented for `()` error: aborting due to 8 previous errors diff --git a/src/test/ui/issues/issue-2823.stderr b/src/test/ui/issues/issue-2823.stderr index fc38f4b61f3..e044352e954 100644 --- a/src/test/ui/issues/issue-2823.stderr +++ b/src/test/ui/issues/issue-2823.stderr @@ -12,12 +12,12 @@ LL | let _d = c.clone(); LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc` here - | the method is available for `std::rc::Rc` here + | the method is available for `Arc` here + | the method is available for `Rc` here | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `clone`, perhaps you need to implement it: - candidate #1: `std::clone::Clone` + candidate #1: `Clone` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-28344.stderr b/src/test/ui/issues/issue-28344.stderr index e34ac45e69d..4955dea564d 100644 --- a/src/test/ui/issues/issue-28344.stderr +++ b/src/test/ui/issues/issue-28344.stderr @@ -1,31 +1,31 @@ -error[E0191]: the value of the associated type `Output` (from trait `std::ops::BitXor`) must be specified +error[E0191]: the value of the associated type `Output` (from trait `BitXor`) must be specified --> $DIR/issue-28344.rs:4:17 | LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | ^^^^^^ help: specify the associated type: `BitXor` -error[E0599]: no function or associated item named `bitor` found for trait object `dyn std::ops::BitXor<_>` in the current scope +error[E0599]: no function or associated item named `bitor` found for trait object `dyn BitXor<_>` in the current scope --> $DIR/issue-28344.rs:4:25 | LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | ^^^^^ | | - | function or associated item not found in `dyn std::ops::BitXor<_>` + | function or associated item not found in `dyn BitXor<_>` | help: there is an associated function with a similar name: `bitxor` -error[E0191]: the value of the associated type `Output` (from trait `std::ops::BitXor`) must be specified +error[E0191]: the value of the associated type `Output` (from trait `BitXor`) must be specified --> $DIR/issue-28344.rs:8:13 | LL | let g = BitXor::bitor; | ^^^^^^ help: specify the associated type: `BitXor` -error[E0599]: no function or associated item named `bitor` found for trait object `dyn std::ops::BitXor<_>` in the current scope +error[E0599]: no function or associated item named `bitor` found for trait object `dyn BitXor<_>` in the current scope --> $DIR/issue-28344.rs:8:21 | LL | let g = BitXor::bitor; | ^^^^^ | | - | function or associated item not found in `dyn std::ops::BitXor<_>` + | function or associated item not found in `dyn BitXor<_>` | help: there is an associated function with a similar name: `bitxor` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-28568.stderr b/src/test/ui/issues/issue-28568.stderr index 7729b9d240d..f17f1326b13 100644 --- a/src/test/ui/issues/issue-28568.stderr +++ b/src/test/ui/issues/issue-28568.stderr @@ -1,4 +1,4 @@ -error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `MyStruct`: +error[E0119]: conflicting implementations of trait `Drop` for type `MyStruct`: --> $DIR/issue-28568.rs:7:1 | LL | impl Drop for MyStruct { diff --git a/src/test/ui/issues/issue-29723.stderr b/src/test/ui/issues/issue-29723.stderr index 04915ab5f95..e39ddfc81c9 100644 --- a/src/test/ui/issues/issue-29723.stderr +++ b/src/test/ui/issues/issue-29723.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `s` --> $DIR/issue-29723.rs:10:13 | LL | let s = String::new(); - | - move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `s` has type `String`, which does not implement the `Copy` trait LL | let _s = match 0 { LL | 0 if { drop(s); false } => String::from("oops"), | - value moved here diff --git a/src/test/ui/issues/issue-30355.stderr b/src/test/ui/issues/issue-30355.stderr index 98de768a5a8..db7a5a7f6dc 100644 --- a/src/test/ui/issues/issue-30355.stderr +++ b/src/test/ui/issues/issue-30355.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | &X(*Y) | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index 23a1a27675c..a4f69a17cef 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving `, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]> as std::iter::Iterator>::Item == &_` +error[E0271]: type mismatch resolving `, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]> as Iterator>::Item == &_` --> $DIR/issue-31173.rs:10:10 | LL | .cloned() @@ -7,25 +7,25 @@ LL | .cloned() = note: expected type `u8` found reference `&_` -error[E0599]: no method named `collect` found for struct `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope +error[E0599]: no method named `collect` found for struct `Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope --> $DIR/issue-31173.rs:14:10 | LL | .collect(); - | ^^^^^^^ method not found in `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` + | ^^^^^^^ method not found in `Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` | ::: $SRC_DIR/core/src/iter/adapters/mod.rs:LL:COL | LL | pub struct Cloned { - | -------------------- doesn't satisfy `_: std::iter::Iterator` + | -------------------- doesn't satisfy `_: Iterator` ... LL | pub struct TakeWhile { - | -------------------------- doesn't satisfy `<_ as std::iter::Iterator>::Item = &_` + | -------------------------- doesn't satisfy `<_ as Iterator>::Item = &_` | = note: the method `collect` exists but the following trait bounds were not satisfied: - `, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]> as std::iter::Iterator>::Item = &_` - which is required by `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>: std::iter::Iterator` - `std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>: std::iter::Iterator` - which is required by `&mut std::iter::Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>: std::iter::Iterator` + `, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]> as Iterator>::Item = &_` + which is required by `Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>: Iterator` + `Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>: Iterator` + which is required by `&mut Cloned, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>: Iterator` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-32709.stderr b/src/test/ui/issues/issue-32709.stderr index af272633f21..cc12c153621 100644 --- a/src/test/ui/issues/issue-32709.stderr +++ b/src/test/ui/issues/issue-32709.stderr @@ -4,10 +4,10 @@ error[E0277]: `?` couldn't convert the error to `()` LL | fn a() -> Result { | --------------- expected `()` because of this LL | Err(5)?; - | ^ the trait `std::convert::From<{integer}>` is not implemented for `()` + | ^ the trait `From<{integer}>` is not implemented for `()` | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait - = note: required by `std::convert::From::from` + = note: required by `from` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-32963.rs b/src/test/ui/issues/issue-32963.rs index 3e6cf446da3..58055cd5456 100644 --- a/src/test/ui/issues/issue-32963.rs +++ b/src/test/ui/issues/issue-32963.rs @@ -8,5 +8,5 @@ fn main() { size_of_copy::(); //~^ ERROR only auto traits can be used as additional traits in a trait object //~| ERROR only auto traits can be used as additional traits in a trait object - //~| ERROR the trait bound `dyn Misc: std::marker::Copy` is not satisfied + //~| ERROR the trait bound `dyn Misc: Copy` is not satisfied } diff --git a/src/test/ui/issues/issue-32963.stderr b/src/test/ui/issues/issue-32963.stderr index f9628f2c2ec..76c62c1c6dd 100644 --- a/src/test/ui/issues/issue-32963.stderr +++ b/src/test/ui/issues/issue-32963.stderr @@ -6,7 +6,7 @@ LL | size_of_copy::(); | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + std::marker::Copy {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + Copy {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit error[E0225]: only auto traits can be used as additional traits in a trait object @@ -17,17 +17,17 @@ LL | size_of_copy::(); | | | first non-auto trait | - = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + std::marker::Copy {}` + = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Misc + Copy {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit -error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied --> $DIR/issue-32963.rs:8:5 | LL | fn size_of_copy() -> usize { mem::size_of::() } | ---- required by this bound in `size_of_copy` ... LL | size_of_copy::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `dyn Misc` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-33140-hack-boundaries.stderr b/src/test/ui/issues/issue-33140-hack-boundaries.stderr index ae65701ecb5..c9586be6cae 100644 --- a/src/test/ui/issues/issue-33140-hack-boundaries.stderr +++ b/src/test/ui/issues/issue-33140-hack-boundaries.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `Trait1` for type `(dyn std::marker::Send + 'static)`: +error[E0119]: conflicting implementations of trait `Trait1` for type `(dyn Send + 'static)`: --> $DIR/issue-33140-hack-boundaries.rs:18:1 | LL | impl Trait1 for dyn Send {} | ------------------------ first implementation here LL | impl Trait1 for dyn Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + 'static)` -error[E0751]: found both positive and negative implementation of trait `Trait2` for type `(dyn std::marker::Send + 'static)`: +error[E0751]: found both positive and negative implementation of trait `Trait2` for type `(dyn Send + 'static)`: --> $DIR/issue-33140-hack-boundaries.rs:25:1 | LL | impl Trait2 for dyn Send {} @@ -14,21 +14,21 @@ LL | impl Trait2 for dyn Send {} LL | impl !Trait2 for dyn Send {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here -error[E0119]: conflicting implementations of trait `Trait3<(dyn std::marker::Sync + 'static)>` for type `(dyn std::marker::Send + 'static)`: +error[E0119]: conflicting implementations of trait `Trait3<(dyn Sync + 'static)>` for type `(dyn Send + 'static)`: --> $DIR/issue-33140-hack-boundaries.rs:32:1 | LL | impl Trait3 for dyn Send {} | ---------------------------------- first implementation here LL | impl Trait3 for dyn Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + 'static)` -error[E0119]: conflicting implementations of trait `Trait4a` for type `(dyn std::marker::Send + 'static)`: +error[E0119]: conflicting implementations of trait `Trait4a` for type `(dyn Send + 'static)`: --> $DIR/issue-33140-hack-boundaries.rs:39:1 | LL | impl Trait4a for T {} | ----------------------------- first implementation here LL | impl Trait4a for dyn Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + 'static)` error[E0119]: conflicting implementations of trait `Trait4b` for type `()`: --> $DIR/issue-33140-hack-boundaries.rs:46:1 @@ -38,29 +38,29 @@ LL | impl Trait4b for () {} LL | impl Trait4b for () {} | ^^^^^^^^^^^^^^^^^^^ conflicting implementation for `()` -error[E0119]: conflicting implementations of trait `Trait4c` for type `(dyn Trait1 + std::marker::Send + 'static)`: +error[E0119]: conflicting implementations of trait `Trait4c` for type `(dyn Trait1 + Send + 'static)`: --> $DIR/issue-33140-hack-boundaries.rs:53:1 | LL | impl Trait4c for dyn Trait1 + Send {} | ---------------------------------- first implementation here LL | impl Trait4c for dyn Trait1 + Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Trait1 + std::marker::Send + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Trait1 + Send + 'static)` -error[E0119]: conflicting implementations of trait `Trait4d` for type `dyn std::marker::Send`: +error[E0119]: conflicting implementations of trait `Trait4d` for type `dyn Send`: --> $DIR/issue-33140-hack-boundaries.rs:60:1 | LL | impl<'a> Trait4d for dyn Send + 'a {} | ---------------------------------- first implementation here LL | impl<'a> Trait4d for dyn Send + 'a {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `dyn std::marker::Send` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `dyn Send` -error[E0119]: conflicting implementations of trait `Trait5` for type `(dyn std::marker::Send + 'static)`: +error[E0119]: conflicting implementations of trait `Trait5` for type `(dyn Send + 'static)`: --> $DIR/issue-33140-hack-boundaries.rs:67:1 | LL | impl Trait5 for dyn Send {} | ------------------------ first implementation here LL | impl Trait5 for dyn Send where u32: Copy {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + 'static)` error: aborting due to 8 previous errors diff --git a/src/test/ui/issues/issue-33140-traitobject-crate.stderr b/src/test/ui/issues/issue-33140-traitobject-crate.stderr index 781decb5ae2..00d8f1691e4 100644 --- a/src/test/ui/issues/issue-33140-traitobject-crate.stderr +++ b/src/test/ui/issues/issue-33140-traitobject-crate.stderr @@ -1,10 +1,10 @@ -warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) +warning: conflicting implementations of trait `Trait` for type `(dyn Send + Sync + 'static)`: (E0119) --> $DIR/issue-33140-traitobject-crate.rs:85:1 | LL | unsafe impl Trait for dyn (::std::marker::Send) + Sync { } | ------------------------------------------------------ first implementation here LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` | note: the lint level is defined here --> $DIR/issue-33140-traitobject-crate.rs:3:9 @@ -14,26 +14,26 @@ LL | #![warn(order_dependent_trait_objects)] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #56484 -warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) +warning: conflicting implementations of trait `Trait` for type `(dyn Send + Sync + 'static)`: (E0119) --> $DIR/issue-33140-traitobject-crate.rs:88:1 | LL | unsafe impl Trait for dyn (::std::marker::Send) + Send + Sync { } | ------------------------------------------------------------- first implementation here ... LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #56484 -warning: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) +warning: conflicting implementations of trait `Trait` for type `(dyn Send + Sync + 'static)`: (E0119) --> $DIR/issue-33140-traitobject-crate.rs:92:1 | LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send { } | ------------------------------------------------------ first implementation here ... LL | unsafe impl Trait for dyn (::std::marker::Sync) + Send + Sync { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #56484 diff --git a/src/test/ui/issues/issue-33140.stderr b/src/test/ui/issues/issue-33140.stderr index 9a900d2fc94..354c6ff2fba 100644 --- a/src/test/ui/issues/issue-33140.stderr +++ b/src/test/ui/issues/issue-33140.stderr @@ -1,20 +1,20 @@ -error[E0119]: conflicting implementations of trait `Trait` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: +error[E0119]: conflicting implementations of trait `Trait` for type `(dyn Send + Sync + 'static)`: --> $DIR/issue-33140.rs:9:1 | LL | impl Trait for dyn Send + Sync { | ------------------------------ first implementation here ... LL | impl Trait for dyn Sync + Send { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` -error[E0119]: conflicting implementations of trait `Trait2` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: +error[E0119]: conflicting implementations of trait `Trait2` for type `(dyn Send + Sync + 'static)`: --> $DIR/issue-33140.rs:22:1 | LL | impl Trait2 for dyn Send + Sync { | ------------------------------- first implementation here ... LL | impl Trait2 for dyn Sync + Send + Sync { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` error[E0592]: duplicate definitions with name `abc` --> $DIR/issue-33140.rs:29:5 diff --git a/src/test/ui/issues/issue-3344.stderr b/src/test/ui/issues/issue-3344.stderr index 723e03d452f..11d5999672e 100644 --- a/src/test/ui/issues/issue-3344.stderr +++ b/src/test/ui/issues/issue-3344.stderr @@ -4,7 +4,7 @@ error[E0046]: not all trait items implemented, missing: `partial_cmp` LL | impl PartialOrd for Thing { | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `partial_cmp` in implementation | - = help: implement the missing item: `fn partial_cmp(&self, _: &Rhs) -> std::option::Option { todo!() }` + = help: implement the missing item: `fn partial_cmp(&self, _: &Rhs) -> Option { todo!() }` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-33941.stderr b/src/test/ui/issues/issue-33941.stderr index 20335d2cdd6..aeab923d2df 100644 --- a/src/test/ui/issues/issue-33941.stderr +++ b/src/test/ui/issues/issue-33941.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` +error[E0271]: type mismatch resolving ` as Iterator>::Item == &_` --> $DIR/issue-33941.rs:4:36 | LL | for _ in HashMap::new().iter().cloned() {} @@ -7,7 +7,7 @@ LL | for _ in HashMap::new().iter().cloned() {} = note: expected tuple `(&_, &_)` found reference `&_` -error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` +error[E0271]: type mismatch resolving ` as Iterator>::Item == &_` --> $DIR/issue-33941.rs:4:14 | LL | for _ in HashMap::new().iter().cloned() {} @@ -15,9 +15,9 @@ LL | for _ in HashMap::new().iter().cloned() {} | = note: expected tuple `(&_, &_)` found reference `&_` - = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned>` + = note: required because of the requirements on the impl of `Iterator` for `Cloned>` -error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == &_` +error[E0271]: type mismatch resolving ` as Iterator>::Item == &_` --> $DIR/issue-33941.rs:4:14 | LL | for _ in HashMap::new().iter().cloned() {} @@ -25,7 +25,7 @@ LL | for _ in HashMap::new().iter().cloned() {} | = note: expected tuple `(&_, &_)` found reference `&_` - = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned>` + = note: required because of the requirements on the impl of `Iterator` for `Cloned>` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-34229.stderr b/src/test/ui/issues/issue-34229.stderr index cd9be6ab72c..d25189e7837 100644 --- a/src/test/ui/issues/issue-34229.stderr +++ b/src/test/ui/issues/issue-34229.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `Comparable` with `Comparable` LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` + = help: the trait `PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0277]: can't compare `Comparable` with `Comparable` LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` + = help: the trait `PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0277]: can't compare `Comparable` with `Comparable` LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` + = help: the trait `PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0277]: can't compare `Comparable` with `Comparable` LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` + = help: the trait `PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0277]: can't compare `Comparable` with `Comparable` LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable); | ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable` + = help: the trait `PartialOrd` is not implemented for `Comparable` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/issues/issue-34334.rs b/src/test/ui/issues/issue-34334.rs index 97905e2f8fa..bf2d091a01e 100644 --- a/src/test/ui/issues/issue-34334.rs +++ b/src/test/ui/issues/issue-34334.rs @@ -2,5 +2,5 @@ fn main () { let sr: Vec<(u32, _, _) = vec![]; //~^ ERROR expected one of `,` or `>`, found `=` let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect(); - //~^ ERROR a value of type `std::vec::Vec<(u32, _, _)>` cannot be built + //~^ ERROR a value of type `Vec<(u32, _, _)>` cannot be built } diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index 364f8264db4..c10a4144305 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -6,13 +6,13 @@ LL | let sr: Vec<(u32, _, _) = vec![]; | | | while parsing the type for `sr` -error[E0277]: a value of type `std::vec::Vec<(u32, _, _)>` cannot be built from an iterator over elements of type `()` +error[E0277]: a value of type `Vec<(u32, _, _)>` cannot be built from an iterator over elements of type `()` --> $DIR/issue-34334.rs:4:87 | LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_receiver)| {}).collect(); - | ^^^^^^^ value of type `std::vec::Vec<(u32, _, _)>` cannot be built from `std::iter::Iterator` + | ^^^^^^^ value of type `Vec<(u32, _, _)>` cannot be built from `std::iter::Iterator` | - = help: the trait `std::iter::FromIterator<()>` is not implemented for `std::vec::Vec<(u32, _, _)>` + = help: the trait `FromIterator<()>` is not implemented for `Vec<(u32, _, _)>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-35677.stderr b/src/test/ui/issues/issue-35677.stderr index 978221e502f..afdc5d68ca3 100644 --- a/src/test/ui/issues/issue-35677.stderr +++ b/src/test/ui/issues/issue-35677.stderr @@ -1,12 +1,12 @@ -error[E0599]: no method named `is_subset` found for reference `&std::collections::HashSet` in the current scope +error[E0599]: no method named `is_subset` found for reference `&HashSet` in the current scope --> $DIR/issue-35677.rs:4:10 | LL | this.is_subset(other) - | ^^^^^^^^^ method not found in `&std::collections::HashSet` + | ^^^^^^^^^ method not found in `&HashSet` | = note: the method `is_subset` exists but the following trait bounds were not satisfied: - `T: std::cmp::Eq` - `T: std::hash::Hash` + `T: Eq` + `T: Hash` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-35869.stderr b/src/test/ui/issues/issue-35869.stderr index 66e89998e1d..f80561bf6be 100644 --- a/src/test/ui/issues/issue-35869.stderr +++ b/src/test/ui/issues/issue-35869.stderr @@ -19,8 +19,8 @@ LL | fn bar(_: Option); LL | fn bar(_: Option) {} | ^^^^^^^^^^^ expected `u8`, found `u16` | - = note: expected fn pointer `fn(std::option::Option)` - found fn pointer `fn(std::option::Option)` + = note: expected fn pointer `fn(Option)` + found fn pointer `fn(Option)` error[E0053]: method `baz` has an incompatible type for trait --> $DIR/issue-35869.rs:15:15 diff --git a/src/test/ui/issues/issue-35988.stderr b/src/test/ui/issues/issue-35988.stderr index 0f0b80a9ff8..2e03acc112d 100644 --- a/src/test/ui/issues/issue-35988.stderr +++ b/src/test/ui/issues/issue-35988.stderr @@ -1,10 +1,10 @@ -error[E0277]: the size for values of type `[std::boxed::Box]` cannot be known at compilation time +error[E0277]: the size for values of type `[Box]` cannot be known at compilation time --> $DIR/issue-35988.rs:2:7 | LL | V([Box]), | ^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[std::boxed::Box]` + = help: the trait `Sized` is not implemented for `[Box]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size diff --git a/src/test/ui/issues/issue-3601.stderr b/src/test/ui/issues/issue-3601.stderr index 6b2a5d76243..adad480f92b 100644 --- a/src/test/ui/issues/issue-3601.stderr +++ b/src/test/ui/issues/issue-3601.stderr @@ -5,7 +5,7 @@ LL | box NodeKind::Element(ed) => match ed.kind { | ^^^^^^^ pattern `Box(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `std::boxed::Box` + = note: the matched value is of type `Box` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-36299.stderr b/src/test/ui/issues/issue-36299.stderr index a9516b8e5e5..8e29a925d80 100644 --- a/src/test/ui/issues/issue-36299.stderr +++ b/src/test/ui/issues/issue-36299.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct Foo<'a, A> {} | ^^ unused parameter | - = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` error[E0392]: parameter `A` is never used --> $DIR/issue-36299.rs:1:16 @@ -12,7 +12,7 @@ error[E0392]: parameter `A` is never used LL | struct Foo<'a, A> {} | ^ unused parameter | - = help: consider removing `A`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-36638.stderr b/src/test/ui/issues/issue-36638.stderr index fe48ea158de..e5d6f8ec7ad 100644 --- a/src/test/ui/issues/issue-36638.stderr +++ b/src/test/ui/issues/issue-36638.stderr @@ -16,7 +16,7 @@ error[E0392]: parameter `Self` is never used LL | struct Foo(Self); | ^^^^ unused parameter | - = help: consider removing `Self`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `Self`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-3680.rs b/src/test/ui/issues/issue-3680.rs index 64050c72f2c..8912e7a18ac 100644 --- a/src/test/ui/issues/issue-3680.rs +++ b/src/test/ui/issues/issue-3680.rs @@ -2,8 +2,8 @@ fn main() { match None { Err(_) => () //~^ ERROR mismatched types - //~| expected enum `std::option::Option<_>` + //~| expected enum `Option<_>` //~| found enum `std::result::Result<_, _>` - //~| expected enum `std::option::Option`, found enum `std::result::Result` + //~| expected enum `Option`, found enum `std::result::Result` } } diff --git a/src/test/ui/issues/issue-3680.stderr b/src/test/ui/issues/issue-3680.stderr index 713e4b5ccd5..479942b8e2c 100644 --- a/src/test/ui/issues/issue-3680.stderr +++ b/src/test/ui/issues/issue-3680.stderr @@ -2,11 +2,11 @@ error[E0308]: mismatched types --> $DIR/issue-3680.rs:3:9 | LL | match None { - | ---- this expression has type `std::option::Option<_>` + | ---- this expression has type `Option<_>` LL | Err(_) => () - | ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result` + | ^^^^^^ expected enum `Option`, found enum `std::result::Result` | - = note: expected enum `std::option::Option<_>` + = note: expected enum `Option<_>` found enum `std::result::Result<_, _>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/issues/issue-37026.stderr index f0285730c5a..48a4a5bcad2 100644 --- a/src/test/ui/issues/issue-37026.stderr +++ b/src/test/ui/issues/issue-37026.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let empty_struct::XEmpty2 = (); | ^^^^^^^^^^^^^^^^^^^^^ -- this expression has type `()` | | - | expected `()`, found struct `empty_struct::XEmpty2` + | expected `()`, found struct `XEmpty2` error[E0308]: mismatched types --> $DIR/issue-37026.rs:7:9 @@ -12,7 +12,7 @@ error[E0308]: mismatched types LL | let empty_struct::XEmpty6(..) = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^ -- this expression has type `()` | | - | expected `()`, found struct `empty_struct::XEmpty6` + | expected `()`, found struct `XEmpty6` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-37534.stderr b/src/test/ui/issues/issue-37534.stderr index 5d008cf24dc..895479986f1 100644 --- a/src/test/ui/issues/issue-37534.stderr +++ b/src/test/ui/issues/issue-37534.stderr @@ -21,7 +21,7 @@ error[E0392]: parameter `T` is never used LL | struct Foo { } | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors; 1 warning emitted diff --git a/src/test/ui/issues/issue-3763.rs b/src/test/ui/issues/issue-3763.rs index 451321c5503..25ad6b319f9 100644 --- a/src/test/ui/issues/issue-3763.rs +++ b/src/test/ui/issues/issue-3763.rs @@ -16,14 +16,14 @@ mod my_mod { fn main() { let my_struct = my_mod::MyStruct(); let _woohoo = (&my_struct).priv_field; - //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private + //~^ ERROR field `priv_field` of struct `MyStruct` is private let _woohoo = (Box::new(my_struct)).priv_field; - //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private + //~^ ERROR field `priv_field` of struct `MyStruct` is private (&my_struct).happyfun(); //~ ERROR associated function `happyfun` is private (Box::new(my_struct)).happyfun(); //~ ERROR associated function `happyfun` is private let nope = my_struct.priv_field; - //~^ ERROR field `priv_field` of struct `my_mod::MyStruct` is private + //~^ ERROR field `priv_field` of struct `MyStruct` is private } diff --git a/src/test/ui/issues/issue-3763.stderr b/src/test/ui/issues/issue-3763.stderr index b63967bb9dc..7f54c9f8a6b 100644 --- a/src/test/ui/issues/issue-3763.stderr +++ b/src/test/ui/issues/issue-3763.stderr @@ -1,10 +1,10 @@ -error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private +error[E0616]: field `priv_field` of struct `MyStruct` is private --> $DIR/issue-3763.rs:18:32 | LL | let _woohoo = (&my_struct).priv_field; | ^^^^^^^^^^ private field -error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private +error[E0616]: field `priv_field` of struct `MyStruct` is private --> $DIR/issue-3763.rs:21:41 | LL | let _woohoo = (Box::new(my_struct)).priv_field; @@ -22,7 +22,7 @@ error[E0624]: associated function `happyfun` is private LL | (Box::new(my_struct)).happyfun(); | ^^^^^^^^ private associated function -error[E0616]: field `priv_field` of struct `my_mod::MyStruct` is private +error[E0616]: field `priv_field` of struct `MyStruct` is private --> $DIR/issue-3763.rs:27:26 | LL | let nope = my_struct.priv_field; diff --git a/src/test/ui/issues/issue-37884.stderr b/src/test/ui/issues/issue-37884.stderr index 5baa245b3cc..d741d426852 100644 --- a/src/test/ui/issues/issue-37884.stderr +++ b/src/test/ui/issues/issue-37884.stderr @@ -9,8 +9,8 @@ LL | | Some(&mut self.0) LL | | } | |_____^ lifetime mismatch | - = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> std::option::Option<_>` - found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<_>` + = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> Option<_>` + found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> Option<_>` note: the anonymous lifetime #1 defined on the method body at 6:5... --> $DIR/issue-37884.rs:6:5 | diff --git a/src/test/ui/issues/issue-38604.stderr b/src/test/ui/issues/issue-38604.stderr index 2bba50e1f41..39a62b81c6c 100644 --- a/src/test/ui/issues/issue-38604.stderr +++ b/src/test/ui/issues/issue-38604.stderr @@ -20,8 +20,8 @@ LL | trait Foo where u32: Q { LL | Box::new(()); | ^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::boxed::Box<()>` - = note: required by cast to type `std::boxed::Box` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Box<()>` + = note: required by cast to type `Box` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-38954.stderr b/src/test/ui/issues/issue-38954.stderr index e96bbe1a993..bc40fd07c5a 100644 --- a/src/test/ui/issues/issue-38954.stderr +++ b/src/test/ui/issues/issue-38954.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | fn _test(ref _p: str) {} | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/issues/issue-39175.stderr b/src/test/ui/issues/issue-39175.stderr index 2f6e676538e..dbb334e7b95 100644 --- a/src/test/ui/issues/issue-39175.stderr +++ b/src/test/ui/issues/issue-39175.stderr @@ -1,8 +1,8 @@ -error[E0599]: no method named `exec` found for mutable reference `&mut std::process::Command` in the current scope +error[E0599]: no method named `exec` found for mutable reference `&mut Command` in the current scope --> $DIR/issue-39175.rs:15:39 | LL | Command::new("echo").arg("hello").exec(); - | ^^^^ method not found in `&mut std::process::Command` + | ^^^^ method not found in `&mut Command` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it: diff --git a/src/test/ui/issues/issue-40000.stderr b/src/test/ui/issues/issue-40000.stderr index 3eb3482ac91..00543c5fff4 100644 --- a/src/test/ui/issues/issue-40000.stderr +++ b/src/test/ui/issues/issue-40000.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | foo(bar); | ^^^ one type is more general than the other | - = note: expected trait object `dyn for<'r> std::ops::Fn(&'r i32)` - found trait object `dyn std::ops::Fn(&i32)` + = note: expected trait object `dyn for<'r> Fn(&'r i32)` + found trait object `dyn Fn(&i32)` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr index 8a9d9aab81a..0a5a6b80e9b 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-1.stderr @@ -1,10 +1,10 @@ -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/issue-40402-1.rs:9:13 | LL | let e = f.v[0]; | ^^^^^^ | | - | move occurs because value has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because value has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&f.v[0]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr index d0a4097de68..b6049f967ff 100644 --- a/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr +++ b/src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.stderr @@ -1,4 +1,4 @@ -error[E0507]: cannot move out of index of `std::vec::Vec<(std::string::String, std::string::String)>` +error[E0507]: cannot move out of index of `Vec<(String, String)>` --> $DIR/issue-40402-2.rs:5:18 | LL | let (a, b) = x[0]; diff --git a/src/test/ui/issues/issue-40749.rs b/src/test/ui/issues/issue-40749.rs index 87ff5a650fe..0a847853b12 100644 --- a/src/test/ui/issues/issue-40749.rs +++ b/src/test/ui/issues/issue-40749.rs @@ -2,5 +2,5 @@ fn main() { [0; ..10]; //~^ ERROR mismatched types //~| expected type `usize` - //~| found struct `std::ops::RangeTo<{integer}>` + //~| found struct `RangeTo<{integer}>` } diff --git a/src/test/ui/issues/issue-40749.stderr b/src/test/ui/issues/issue-40749.stderr index 4170a96bddf..fa239f744fb 100644 --- a/src/test/ui/issues/issue-40749.stderr +++ b/src/test/ui/issues/issue-40749.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/issue-40749.rs:2:9 | LL | [0; ..10]; - | ^^^^ expected `usize`, found struct `std::ops::RangeTo` + | ^^^^ expected `usize`, found struct `RangeTo` | = note: expected type `usize` - found struct `std::ops::RangeTo<{integer}>` + found struct `RangeTo<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-40827.stderr b/src/test/ui/issues/issue-40827.stderr index a10abb89021..5ea795d1397 100644 --- a/src/test/ui/issues/issue-40827.stderr +++ b/src/test/ui/issues/issue-40827.stderr @@ -1,29 +1,29 @@ -error[E0277]: `std::rc::Rc` cannot be sent between threads safely +error[E0277]: `Rc` cannot be sent between threads safely --> $DIR/issue-40827.rs:14:5 | LL | fn f(_: T) {} | ---- required by this bound in `f` ... LL | f(Foo(Arc::new(Bar::B(None)))); - | ^ `std::rc::Rc` cannot be sent between threads safely + | ^ `Rc` cannot be sent between threads safely | - = help: within `Bar`, the trait `std::marker::Send` is not implemented for `std::rc::Rc` + = help: within `Bar`, the trait `Send` is not implemented for `Rc` = note: required because it appears within the type `Bar` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc` + = note: required because of the requirements on the impl of `Send` for `Arc` = note: required because it appears within the type `Foo` -error[E0277]: `std::rc::Rc` cannot be shared between threads safely +error[E0277]: `Rc` cannot be shared between threads safely --> $DIR/issue-40827.rs:14:5 | LL | fn f(_: T) {} | ---- required by this bound in `f` ... LL | f(Foo(Arc::new(Bar::B(None)))); - | ^ `std::rc::Rc` cannot be shared between threads safely + | ^ `Rc` cannot be shared between threads safely | - = help: within `Bar`, the trait `std::marker::Sync` is not implemented for `std::rc::Rc` + = help: within `Bar`, the trait `Sync` is not implemented for `Rc` = note: required because it appears within the type `Bar` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc` + = note: required because of the requirements on the impl of `Send` for `Arc` = note: required because it appears within the type `Foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-41229-ref-str.stderr b/src/test/ui/issues/issue-41229-ref-str.stderr index 35aa1acdc1c..c5c848e63e6 100644 --- a/src/test/ui/issues/issue-41229-ref-str.stderr +++ b/src/test/ui/issues/issue-41229-ref-str.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | pub fn example(ref s: str) {} | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/issues/issue-41726.stderr b/src/test/ui/issues/issue-41726.stderr index aa7f23511dd..b00a420bc37 100644 --- a/src/test/ui/issues/issue-41726.stderr +++ b/src/test/ui/issues/issue-41726.stderr @@ -1,10 +1,10 @@ -error[E0596]: cannot borrow data in an index of `std::collections::HashMap>` as mutable +error[E0596]: cannot borrow data in an index of `HashMap>` as mutable --> $DIR/issue-41726.rs:5:9 | LL | things[src.as_str()].sort(); | ^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable | - = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `std::collections::HashMap>` + = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `HashMap>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr index d082e0a6b5d..ae9ee88eb33 100644 --- a/src/test/ui/issues/issue-41974.stderr +++ b/src/test/ui/issues/issue-41974.stderr @@ -1,11 +1,11 @@ -error[E0119]: conflicting implementations of trait `std::ops::Drop` for type `std::boxed::Box<_>`: +error[E0119]: conflicting implementations of trait `Drop` for type `Box<_>`: --> $DIR/issue-41974.rs:7:1 | LL | impl Drop for T where T: A { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `alloc`: - - impl std::ops::Drop for std::boxed::Box + - impl Drop for Box where T: ?Sized; = note: downstream crates may implement trait `A` for type `std::boxed::Box<_>` diff --git a/src/test/ui/issues/issue-42312.stderr b/src/test/ui/issues/issue-42312.stderr index fbe87aa2dbe..b55a724c0db 100644 --- a/src/test/ui/issues/issue-42312.stderr +++ b/src/test/ui/issues/issue-42312.stderr @@ -1,27 +1,27 @@ -error[E0277]: the size for values of type `::Target` cannot be known at compilation time +error[E0277]: the size for values of type `::Target` cannot be known at compilation time --> $DIR/issue-42312.rs:4:12 | LL | fn baz(_: Self::Target) where Self: Deref {} | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `::Target` + = help: the trait `Sized` is not implemented for `::Target` = help: unsized locals are gated as an unstable feature help: consider further restricting the associated type | -LL | fn baz(_: Self::Target) where Self: Deref, ::Target: std::marker::Sized {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn baz(_: Self::Target) where Self: Deref, ::Target: Sized {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: function arguments must have a statically known size, borrowed types always have a known size | LL | fn baz(_: &Self::Target) where Self: Deref {} | ^ -error[E0277]: the size for values of type `(dyn std::string::ToString + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn ToString + 'static)` cannot be known at compilation time --> $DIR/issue-42312.rs:8:10 | LL | pub fn f(_: dyn ToString) {} | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::string::ToString + 'static)` + = help: the trait `Sized` is not implemented for `(dyn ToString + 'static)` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/issues/issue-42796.stderr b/src/test/ui/issues/issue-42796.stderr index d9dfbc999f3..61cf3f25d0d 100644 --- a/src/test/ui/issues/issue-42796.stderr +++ b/src/test/ui/issues/issue-42796.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `s` --> $DIR/issue-42796.rs:18:20 | LL | let s = "Hello!".to_owned(); - | - move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `s` has type `String`, which does not implement the `Copy` trait LL | let mut s_copy = s; | - value moved here ... diff --git a/src/test/ui/issues/issue-42880.stderr b/src/test/ui/issues/issue-42880.stderr index 82cdc20df2f..bec14429d38 100644 --- a/src/test/ui/issues/issue-42880.stderr +++ b/src/test/ui/issues/issue-42880.stderr @@ -1,8 +1,8 @@ -error[E0599]: no associated item named `String` found for struct `std::string::String` in the current scope +error[E0599]: no associated item named `String` found for struct `String` in the current scope --> $DIR/issue-42880.rs:4:22 | LL | let f = |&Value::String(_)| (); - | ^^^^^^ associated item not found in `std::string::String` + | ^^^^^^ associated item not found in `String` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-43355.stderr b/src/test/ui/issues/issue-43355.stderr index 75c69e5b3e3..f7eaa635af4 100644 --- a/src/test/ui/issues/issue-43355.stderr +++ b/src/test/ui/issues/issue-43355.stderr @@ -1,4 +1,4 @@ -error[E0119]: conflicting implementations of trait `Trait1>` for type `A`: +error[E0119]: conflicting implementations of trait `Trait1>` for type `A`: --> $DIR/issue-43355.rs:13:1 | LL | impl Trait1 for T where T: Trait2 { diff --git a/src/test/ui/issues/issue-43420-no-over-suggest.stderr b/src/test/ui/issues/issue-43420-no-over-suggest.stderr index 27aebc548e1..77d52f6ecab 100644 --- a/src/test/ui/issues/issue-43420-no-over-suggest.stderr +++ b/src/test/ui/issues/issue-43420-no-over-suggest.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/issue-43420-no-over-suggest.rs:8:9 | LL | foo(&a); - | ^^ expected slice `[u16]`, found struct `std::vec::Vec` + | ^^ expected slice `[u16]`, found struct `Vec` | = note: expected reference `&[u16]` - found reference `&std::vec::Vec` + found reference `&Vec` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-43784-associated-type.rs b/src/test/ui/issues/issue-43784-associated-type.rs index 92083d88f1b..78815d8d3fa 100644 --- a/src/test/ui/issues/issue-43784-associated-type.rs +++ b/src/test/ui/issues/issue-43784-associated-type.rs @@ -11,7 +11,7 @@ impl Partial for T::Assoc where } impl Complete for T { - type Assoc = T; //~ ERROR the trait bound `T: std::marker::Copy` is not satisfied + type Assoc = T; //~ ERROR the trait bound `T: Copy` is not satisfied } fn main() {} diff --git a/src/test/ui/issues/issue-43784-associated-type.stderr b/src/test/ui/issues/issue-43784-associated-type.stderr index d8e9110fbbd..039852ad165 100644 --- a/src/test/ui/issues/issue-43784-associated-type.stderr +++ b/src/test/ui/issues/issue-43784-associated-type.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-43784-associated-type.rs:14:18 | LL | type Assoc = T; - | ^ the trait `std::marker::Copy` is not implemented for `T` + | ^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl Complete for T { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Complete for T { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-43784-supertrait.rs b/src/test/ui/issues/issue-43784-supertrait.rs index 3c03433a268..55c26ccd2da 100644 --- a/src/test/ui/issues/issue-43784-supertrait.rs +++ b/src/test/ui/issues/issue-43784-supertrait.rs @@ -5,6 +5,6 @@ pub trait Complete: Partial { } impl Partial for T where T: Complete {} -impl Complete for T {} //~ ERROR the trait bound `T: std::marker::Copy` is not satisfied +impl Complete for T {} //~ ERROR the trait bound `T: Copy` is not satisfied fn main() {} diff --git a/src/test/ui/issues/issue-43784-supertrait.stderr b/src/test/ui/issues/issue-43784-supertrait.stderr index 2fb0583ee7d..d92e4fa9e4a 100644 --- a/src/test/ui/issues/issue-43784-supertrait.stderr +++ b/src/test/ui/issues/issue-43784-supertrait.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/issue-43784-supertrait.rs:8:9 | LL | impl Complete for T {} - | ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl Complete for T {} - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Complete for T {} + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46112.stderr b/src/test/ui/issues/issue-46112.stderr index a861c38b001..ec05fbe580e 100644 --- a/src/test/ui/issues/issue-46112.stderr +++ b/src/test/ui/issues/issue-46112.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | fn main() { test(Ok(())); } | ^^ | | - | expected enum `std::option::Option`, found `()` + | expected enum `Option`, found `()` | help: try using a variant of the expected enum: `Some(())` | - = note: expected enum `std::option::Option<()>` + = note: expected enum `Option<()>` found unit type `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-46771.rs b/src/test/ui/issues/issue-46771.rs index 2b5241e5ff6..22be8d6af8a 100644 --- a/src/test/ui/issues/issue-46771.rs +++ b/src/test/ui/issues/issue-46771.rs @@ -1,4 +1,4 @@ fn main() { struct Foo; - (1 .. 2).find(|_| Foo(0) == 0); //~ ERROR expected function, found `main::Foo` + (1 .. 2).find(|_| Foo(0) == 0); //~ ERROR expected function, found `Foo` } diff --git a/src/test/ui/issues/issue-46771.stderr b/src/test/ui/issues/issue-46771.stderr index 76c86d7aa90..a37b5648959 100644 --- a/src/test/ui/issues/issue-46771.stderr +++ b/src/test/ui/issues/issue-46771.stderr @@ -1,8 +1,8 @@ -error[E0618]: expected function, found `main::Foo` +error[E0618]: expected function, found `Foo` --> $DIR/issue-46771.rs:3:23 | LL | struct Foo; - | ----------- `main::Foo` defined here + | ----------- `Foo` defined here LL | (1 .. 2).find(|_| Foo(0) == 0); | ^^^--- | | diff --git a/src/test/ui/issues/issue-47646.stderr b/src/test/ui/issues/issue-47646.stderr index c0b87636848..b46c277d045 100644 --- a/src/test/ui/issues/issue-47646.stderr +++ b/src/test/ui/issues/issue-47646.stderr @@ -11,7 +11,7 @@ LL | println!("{:?}", heap); | ^^^^ immutable borrow occurs here ... LL | }; - | - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(std::option::Option>, ())` + | - ... and the mutable borrow might be used here, when that temporary is dropped and runs the destructor for type `(Option>, ())` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-48728.rs b/src/test/ui/issues/issue-48728.rs index 8405a30478b..cbdc10bd2e1 100644 --- a/src/test/ui/issues/issue-48728.rs +++ b/src/test/ui/issues/issue-48728.rs @@ -1,7 +1,7 @@ // Regression test for #48728, an ICE that occurred computing // coherence "help" information. -#[derive(Clone)] //~ ERROR conflicting implementations of trait `std::clone::Clone` +#[derive(Clone)] //~ ERROR conflicting implementations of trait `Clone` struct Node(Box); impl Clone for Node<[T]> { diff --git a/src/test/ui/issues/issue-48728.stderr b/src/test/ui/issues/issue-48728.stderr index a0698c20798..2e98a5c6d1a 100644 --- a/src/test/ui/issues/issue-48728.stderr +++ b/src/test/ui/issues/issue-48728.stderr @@ -1,4 +1,4 @@ -error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `Node<[_]>`: +error[E0119]: conflicting implementations of trait `Clone` for type `Node<[_]>`: --> $DIR/issue-48728.rs:4:10 | LL | #[derive(Clone)] diff --git a/src/test/ui/issues/issue-4972.stderr b/src/test/ui/issues/issue-4972.stderr index b1947e2a9df..40db50278ca 100644 --- a/src/test/ui/issues/issue-4972.stderr +++ b/src/test/ui/issues/issue-4972.stderr @@ -1,8 +1,8 @@ -error[E0033]: type `std::boxed::Box<(dyn MyTrait + 'static)>` cannot be dereferenced +error[E0033]: type `Box<(dyn MyTrait + 'static)>` cannot be dereferenced --> $DIR/issue-4972.rs:14:25 | LL | TraitWrapper::A(box ref map) => map, - | ^^^^^^^^^^^ type `std::boxed::Box<(dyn MyTrait + 'static)>` cannot be dereferenced + | ^^^^^^^^^^^ type `Box<(dyn MyTrait + 'static)>` cannot be dereferenced error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs index 5b6b8f8de18..153ca0843d6 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.rs @@ -1,4 +1,4 @@ fn main() { let _result = &Some(42).as_deref(); -//~^ ERROR no method named `as_deref` found for enum `std::option::Option<{integer}>` +//~^ ERROR no method named `as_deref` found for enum `Option<{integer}>` } diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr index b97131a1992..a8cd98b6107 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref.stderr @@ -1,12 +1,12 @@ -error[E0599]: no method named `as_deref` found for enum `std::option::Option<{integer}>` in the current scope +error[E0599]: no method named `as_deref` found for enum `Option<{integer}>` in the current scope --> $DIR/option-as_deref.rs:2:29 | LL | let _result = &Some(42).as_deref(); | ^^^^^^^^ help: there is an associated function with a similar name: `as_ref` | = note: the method `as_deref` exists but the following trait bounds were not satisfied: - `{integer}: std::ops::Deref` - `<{integer} as std::ops::Deref>::Target = _` + `{integer}: Deref` + `<{integer} as Deref>::Target = _` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs index c5fe6ea82cb..11d5378fe30 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.rs @@ -1,4 +1,4 @@ fn main() { let _result = &mut Some(42).as_deref_mut(); -//~^ ERROR no method named `as_deref_mut` found for enum `std::option::Option<{integer}>` +//~^ ERROR no method named `as_deref_mut` found for enum `Option<{integer}>` } diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr index f2133c8c84d..08399fcea7c 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/option-as_deref_mut.stderr @@ -1,12 +1,12 @@ -error[E0599]: no method named `as_deref_mut` found for enum `std::option::Option<{integer}>` in the current scope +error[E0599]: no method named `as_deref_mut` found for enum `Option<{integer}>` in the current scope --> $DIR/option-as_deref_mut.rs:2:33 | LL | let _result = &mut Some(42).as_deref_mut(); - | ^^^^^^^^^^^^ method not found in `std::option::Option<{integer}>` + | ^^^^^^^^^^^^ method not found in `Option<{integer}>` | = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied: - `{integer}: std::ops::DerefMut` - `<{integer} as std::ops::Deref>::Target = _` + `{integer}: DerefMut` + `<{integer} as Deref>::Target = _` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr index 96524c30959..933e8a0c44b 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref.stderr @@ -5,8 +5,8 @@ LL | let _result = &Ok(42).as_deref(); | ^^^^^^^^ help: there is an associated function with a similar name: `as_ref` | = note: the method `as_deref` exists but the following trait bounds were not satisfied: - `{integer}: std::ops::Deref` - `<{integer} as std::ops::Deref>::Target = _` + `{integer}: Deref` + `<{integer} as Deref>::Target = _` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr index 73266bc7f68..69d85126f10 100644 --- a/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr +++ b/src/test/ui/issues/issue-50264-inner-deref-trait/result-as_deref_mut.stderr @@ -5,8 +5,8 @@ LL | let _result = &mut Ok(42).as_deref_mut(); | ^^^^^^^^^^^^ method not found in `std::result::Result<{integer}, _>` | = note: the method `as_deref_mut` exists but the following trait bounds were not satisfied: - `{integer}: std::ops::DerefMut` - `<{integer} as std::ops::Deref>::Target = _` + `{integer}: DerefMut` + `<{integer} as Deref>::Target = _` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-50480.stderr b/src/test/ui/issues/issue-50480.stderr index dfcac128173..50691f1f57f 100644 --- a/src/test/ui/issues/issue-50480.stderr +++ b/src/test/ui/issues/issue-50480.stderr @@ -16,7 +16,7 @@ error[E0277]: `i32` is not an iterator LL | struct Foo(NotDefined, ::Item, Vec, String); | ^^^^^^^^^^^^^^^^^^^^^^^ `i32` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `i32` + = help: the trait `Iterator` is not implemented for `i32` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` error[E0204]: the trait `Copy` may not be implemented for this type diff --git a/src/test/ui/issues/issue-50582.stderr b/src/test/ui/issues/issue-50582.stderr index 13f6c4d7633..4f531460e69 100644 --- a/src/test/ui/issues/issue-50582.stderr +++ b/src/test/ui/issues/issue-50582.stderr @@ -10,7 +10,7 @@ error[E0277]: cannot add `()` to `{integer}` LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); | ^ no implementation for `{integer} + ()` | - = help: the trait `std::ops::Add<()>` is not implemented for `{integer}` + = help: the trait `Add<()>` is not implemented for `{integer}` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-5100.rs b/src/test/ui/issues/issue-5100.rs index 71dd237cad5..5e926fabe21 100644 --- a/src/test/ui/issues/issue-5100.rs +++ b/src/test/ui/issues/issue-5100.rs @@ -33,7 +33,7 @@ fn main() { box (true, false) => () //~^ ERROR mismatched types //~| expected tuple `(bool, bool)` -//~| found struct `std::boxed::Box<_>` +//~| found struct `Box<_>` } match (true, false) { diff --git a/src/test/ui/issues/issue-5100.stderr b/src/test/ui/issues/issue-5100.stderr index a89980964ca..de71e1d1a66 100644 --- a/src/test/ui/issues/issue-5100.stderr +++ b/src/test/ui/issues/issue-5100.stderr @@ -40,10 +40,10 @@ error[E0308]: mismatched types LL | match (true, false) { | ------------- this expression has type `(bool, bool)` LL | box (true, false) => () - | ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box` + | ^^^^^^^^^^^^^^^^^ expected tuple, found struct `Box` | = note: expected tuple `(bool, bool)` - found struct `std::boxed::Box<_>` + found struct `Box<_>` error[E0308]: mismatched types --> $DIR/issue-5100.rs:40:9 diff --git a/src/test/ui/issues/issue-5216.stderr b/src/test/ui/issues/issue-5216.stderr index 21d9333735c..7a1f42adf65 100644 --- a/src/test/ui/issues/issue-5216.stderr +++ b/src/test/ui/issues/issue-5216.stderr @@ -2,18 +2,18 @@ error[E0308]: mismatched types --> $DIR/issue-5216.rs:3:21 | LL | pub static C: S = S(f); - | ^ expected struct `std::boxed::Box`, found fn item + | ^ expected struct `Box`, found fn item | - = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` + = note: expected struct `Box<(dyn FnMut() + 'static)>` found fn item `fn() {f}` error[E0308]: mismatched types --> $DIR/issue-5216.rs:8:19 | LL | pub static D: T = g; - | ^ expected struct `std::boxed::Box`, found fn item + | ^ expected struct `Box`, found fn item | - = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>` + = note: expected struct `Box<(dyn FnMut() + 'static)>` found fn item `fn() {g}` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-52262.stderr b/src/test/ui/issues/issue-52262.stderr index 7312976c801..c0bde4b2321 100644 --- a/src/test/ui/issues/issue-52262.stderr +++ b/src/test/ui/issues/issue-52262.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of `*key` which is behind a shared reference --> $DIR/issue-52262.rs:16:35 | LL | String::from_utf8(*key).unwrap() - | ^^^^ move occurs because `*key` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^^^ move occurs because `*key` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/issues/issue-53348.rs b/src/test/ui/issues/issue-53348.rs index bbfdd9c5389..65f4656b022 100644 --- a/src/test/ui/issues/issue-53348.rs +++ b/src/test/ui/issues/issue-53348.rs @@ -9,7 +9,7 @@ fn main() { for i in v { a = *i.to_string(); //~^ ERROR mismatched types - //~| NOTE expected struct `std::string::String`, found `str` + //~| NOTE expected struct `String`, found `str` v2.push(a); } } diff --git a/src/test/ui/issues/issue-53348.stderr b/src/test/ui/issues/issue-53348.stderr index 433fe40ea03..8f500261243 100644 --- a/src/test/ui/issues/issue-53348.stderr +++ b/src/test/ui/issues/issue-53348.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-53348.rs:10:13 | LL | a = *i.to_string(); - | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found `str` + | ^^^^^^^^^^^^^^ expected struct `String`, found `str` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-53692.stderr b/src/test/ui/issues/issue-53692.stderr index b83fb346b14..09c78da54bc 100644 --- a/src/test/ui/issues/issue-53692.stderr +++ b/src/test/ui/issues/issue-53692.stderr @@ -4,11 +4,11 @@ error[E0308]: mismatched types LL | let items_clone: Vec = ref_items.clone(); | -------- ^^^^^^^^^^^^^^^^^ | | | - | | expected struct `std::vec::Vec`, found `&[i32]` + | | expected struct `Vec`, found `&[i32]` | | help: try using a conversion method: `ref_items.to_vec()` | expected due to this | - = note: expected struct `std::vec::Vec` + = note: expected struct `Vec` found reference `&[i32]` error[E0308]: mismatched types @@ -17,7 +17,7 @@ error[E0308]: mismatched types LL | let string: String = s.clone(); | ------ ^^^^^^^^^ | | | - | | expected struct `std::string::String`, found `&str` + | | expected struct `String`, found `&str` | | help: try using a conversion method: `s.to_string()` | expected due to this diff --git a/src/test/ui/issues/issue-54062.rs b/src/test/ui/issues/issue-54062.rs index 495b7343f20..60a9b00d5d4 100644 --- a/src/test/ui/issues/issue-54062.rs +++ b/src/test/ui/issues/issue-54062.rs @@ -8,6 +8,6 @@ fn main() {} fn testing(test: Test) { let _ = test.comps.inner.lock().unwrap(); - //~^ ERROR: field `inner` of struct `std::sync::Mutex` is private + //~^ ERROR: field `inner` of struct `Mutex` is private //~| ERROR: no method named `unwrap` found } diff --git a/src/test/ui/issues/issue-54062.stderr b/src/test/ui/issues/issue-54062.stderr index f9aef08c353..e9e8080d467 100644 --- a/src/test/ui/issues/issue-54062.stderr +++ b/src/test/ui/issues/issue-54062.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `inner` of struct `std::sync::Mutex` is private +error[E0616]: field `inner` of struct `Mutex` is private --> $DIR/issue-54062.rs:10:24 | LL | let _ = test.comps.inner.lock().unwrap(); diff --git a/src/test/ui/issues/issue-54410.stderr b/src/test/ui/issues/issue-54410.stderr index 9205a518c8c..516c59afb33 100644 --- a/src/test/ui/issues/issue-54410.stderr +++ b/src/test/ui/issues/issue-54410.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[i8]` cannot be known at compilation LL | pub static mut symbol: [i8]; | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[i8]` + = help: the trait `Sized` is not implemented for `[i8]` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-55796.stderr b/src/test/ui/issues/issue-55796.stderr index 6bfb7af5444..1aa0050336e 100644 --- a/src/test/ui/issues/issue-55796.stderr +++ b/src/test/ui/issues/issue-55796.stderr @@ -9,7 +9,7 @@ note: first, the lifetime cannot outlive the lifetime `'a` as defined on the tra | LL | pub trait Graph<'a> { | ^^ -note: ...so that the type `std::iter::Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:16:40: 16:54]>` will meet its required lifetime bounds +note: ...so that the type `Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:16:40: 16:54]>` will meet its required lifetime bounds --> $DIR/issue-55796.rs:16:9 | LL | Box::new(self.out_edges(u).map(|e| e.target())) @@ -20,8 +20,8 @@ note: ...so that the expression is assignable | LL | Box::new(self.out_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: expected `std::boxed::Box<(dyn std::iter::Iterator>::Node> + 'static)>` - found `std::boxed::Box>::Node>>` + = note: expected `Box<(dyn Iterator>::Node> + 'static)>` + found `Box>::Node>>` error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> $DIR/issue-55796.rs:21:9 @@ -34,7 +34,7 @@ note: first, the lifetime cannot outlive the lifetime `'a` as defined on the tra | LL | pub trait Graph<'a> { | ^^ -note: ...so that the type `std::iter::Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:21:39: 21:53]>` will meet its required lifetime bounds +note: ...so that the type `Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:21:39: 21:53]>` will meet its required lifetime bounds --> $DIR/issue-55796.rs:21:9 | LL | Box::new(self.in_edges(u).map(|e| e.target())) @@ -45,8 +45,8 @@ note: ...so that the expression is assignable | LL | Box::new(self.in_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: expected `std::boxed::Box<(dyn std::iter::Iterator>::Node> + 'static)>` - found `std::boxed::Box>::Node>>` + = note: expected `Box<(dyn Iterator>::Node> + 'static)>` + found `Box>::Node>>` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-56175.stderr b/src/test/ui/issues/issue-56175.stderr index c0799db7c12..ee3f609f47d 100644 --- a/src/test/ui/issues/issue-56175.stderr +++ b/src/test/ui/issues/issue-56175.stderr @@ -1,8 +1,8 @@ -error[E0599]: no method named `trait_method` found for struct `reexported_trait::FooStruct` in the current scope +error[E0599]: no method named `trait_method` found for struct `FooStruct` in the current scope --> $DIR/issue-56175.rs:5:33 | LL | reexported_trait::FooStruct.trait_method(); - | ^^^^^^^^^^^^ method not found in `reexported_trait::FooStruct` + | ^^^^^^^^^^^^ method not found in `FooStruct` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it: @@ -10,11 +10,11 @@ help: the following trait is implemented but not in scope; perhaps add a `use` f LL | use reexported_trait::Trait; | -error[E0599]: no method named `trait_method_b` found for struct `reexported_trait::FooStruct` in the current scope +error[E0599]: no method named `trait_method_b` found for struct `FooStruct` in the current scope --> $DIR/issue-56175.rs:7:33 | LL | reexported_trait::FooStruct.trait_method_b(); - | ^^^^^^^^^^^^^^ method not found in `reexported_trait::FooStruct` + | ^^^^^^^^^^^^^^ method not found in `FooStruct` | = help: items from traits can only be used if the trait is in scope help: the following trait is implemented but not in scope; perhaps add a `use` for it: diff --git a/src/test/ui/issues/issue-56806.stderr b/src/test/ui/issues/issue-56806.stderr index a4f9aadcfef..f164fd0c5d2 100644 --- a/src/test/ui/issues/issue-56806.stderr +++ b/src/test/ui/issues/issue-56806.stderr @@ -1,4 +1,4 @@ -error[E0307]: invalid `self` parameter type: std::boxed::Box<(dyn Trait + 'static)> +error[E0307]: invalid `self` parameter type: Box<(dyn Trait + 'static)> --> $DIR/issue-56806.rs:2:34 | LL | fn dyn_instead_of_self(self: Box); diff --git a/src/test/ui/issues/issue-56943.stderr b/src/test/ui/issues/issue-56943.stderr index 6caf974809e..74ed5ec0fb6 100644 --- a/src/test/ui/issues/issue-56943.stderr +++ b/src/test/ui/issues/issue-56943.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-56943.rs:6:29 | LL | let _: issue_56943::S = issue_56943::S2; - | -------------- ^^^^^^^^^^^^^^^ expected struct `issue_56943::S`, found struct `issue_56943::S2` + | -------------- ^^^^^^^^^^^^^^^ expected struct `S`, found struct `S2` | | | expected due to this diff --git a/src/test/ui/issues/issue-57741-1.stderr b/src/test/ui/issues/issue-57741-1.stderr index a4f1ac94825..789a1f44db2 100644 --- a/src/test/ui/issues/issue-57741-1.stderr +++ b/src/test/ui/issues/issue-57741-1.stderr @@ -2,22 +2,22 @@ error[E0308]: mismatched types --> $DIR/issue-57741-1.rs:14:9 | LL | let y = match x { - | - this expression has type `std::boxed::Box` + | - this expression has type `Box` LL | S::A { a } | S::B { b: a } => a, - | ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` + | ^^^^^^^^^^ expected struct `Box`, found enum `S` | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found enum `S` error[E0308]: mismatched types --> $DIR/issue-57741-1.rs:14:22 | LL | let y = match x { - | - this expression has type `std::boxed::Box` + | - this expression has type `Box` LL | S::A { a } | S::B { b: a } => a, - | ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` + | ^^^^^^^^^^^^^ expected struct `Box`, found enum `S` | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found enum `S` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-57741.stderr b/src/test/ui/issues/issue-57741.stderr index 6f9e5b08a83..cd277f20ef1 100644 --- a/src/test/ui/issues/issue-57741.stderr +++ b/src/test/ui/issues/issue-57741.stderr @@ -4,12 +4,12 @@ error[E0308]: mismatched types LL | let y = match x { | - | | - | this expression has type `std::boxed::Box` + | this expression has type `Box` | help: consider dereferencing the boxed value: `*x` LL | T::A(a) | T::B(a) => a, - | ^^^^^^^ expected struct `std::boxed::Box`, found enum `T` + | ^^^^^^^ expected struct `Box`, found enum `T` | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found enum `T` error[E0308]: mismatched types @@ -18,12 +18,12 @@ error[E0308]: mismatched types LL | let y = match x { | - | | - | this expression has type `std::boxed::Box` + | this expression has type `Box` | help: consider dereferencing the boxed value: `*x` LL | T::A(a) | T::B(a) => a, - | ^^^^^^^ expected struct `std::boxed::Box`, found enum `T` + | ^^^^^^^ expected struct `Box`, found enum `T` | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found enum `T` error[E0308]: mismatched types @@ -32,12 +32,12 @@ error[E0308]: mismatched types LL | let y = match x { | - | | - | this expression has type `std::boxed::Box` + | this expression has type `Box` | help: consider dereferencing the boxed value: `*x` LL | S::A { a } | S::B { b: a } => a, - | ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` + | ^^^^^^^^^^ expected struct `Box`, found enum `S` | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found enum `S` error[E0308]: mismatched types @@ -46,12 +46,12 @@ error[E0308]: mismatched types LL | let y = match x { | - | | - | this expression has type `std::boxed::Box` + | this expression has type `Box` | help: consider dereferencing the boxed value: `*x` LL | S::A { a } | S::B { b: a } => a, - | ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S` + | ^^^^^^^^^^^^^ expected struct `Box`, found enum `S` | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found enum `S` error: aborting due to 4 previous errors diff --git a/src/test/ui/issues/issue-57843.stderr b/src/test/ui/issues/issue-57843.stderr index 57b206d7bff..01edb9507a3 100644 --- a/src/test/ui/issues/issue-57843.stderr +++ b/src/test/ui/issues/issue-57843.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | Foo(Box::new(|_| ())); | ^^^^^^^^^^^^^^^^ one type is more general than the other | - = note: expected type `std::ops::FnOnce<(&'a bool,)>` - found type `std::ops::FnOnce<(&bool,)>` + = note: expected type `FnOnce<(&'a bool,)>` + found type `FnOnce<(&bool,)>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-58344.rs b/src/test/ui/issues/issue-58344.rs index 99b656d74f5..9b184e296aa 100644 --- a/src/test/ui/issues/issue-58344.rs +++ b/src/test/ui/issues/issue-58344.rs @@ -40,8 +40,8 @@ fn add_generic, B>(lhs: A, rhs: B) -> Either< fn add_one( value: u32, ) -> Either>::Output>, impl Trait<>::Output>> { - //~^ ERROR: the trait bound `impl Trait<::Output>: Trait` - //~| ERROR: the trait bound `impl Trait<::Output>: Trait` + //~^ ERROR: the trait bound `impl Trait<::Output>: Trait` + //~| ERROR: the trait bound `impl Trait<::Output>: Trait` add_generic(value, 1u32) } diff --git a/src/test/ui/issues/issue-58344.stderr b/src/test/ui/issues/issue-58344.stderr index e0c196e518b..ade85d8b016 100644 --- a/src/test/ui/issues/issue-58344.stderr +++ b/src/test/ui/issues/issue-58344.stderr @@ -1,22 +1,22 @@ -error[E0277]: the trait bound `impl Trait<::Output>: Trait` is not satisfied +error[E0277]: the trait bound `impl Trait<::Output>: Trait` is not satisfied --> $DIR/issue-58344.rs:42:13 | LL | ) -> Either>::Output>, impl Trait<>::Output>> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Trait<::Output>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Trait<::Output>` ... LL | add_generic(value, 1u32) - | ------------------------ this returned value is of type `Either::Output>, impl Trait<::Output>>` + | ------------------------ this returned value is of type `Either::Output>, impl Trait<::Output>>` | = note: the return type of a function must have a statically known size -error[E0277]: the trait bound `impl Trait<::Output>: Trait` is not satisfied +error[E0277]: the trait bound `impl Trait<::Output>: Trait` is not satisfied --> $DIR/issue-58344.rs:42:52 | LL | ) -> Either>::Output>, impl Trait<>::Output>> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Trait<::Output>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Trait<::Output>` ... LL | add_generic(value, 1u32) - | ------------------------ this returned value is of type `Either::Output>, impl Trait<::Output>>` + | ------------------------ this returned value is of type `Either::Output>, impl Trait<::Output>>` | = note: the return type of a function must have a statically known size diff --git a/src/test/ui/issues/issue-5883.stderr b/src/test/ui/issues/issue-5883.stderr index 897984d0ae4..8d639304ab6 100644 --- a/src/test/ui/issues/issue-5883.stderr +++ b/src/test/ui/issues/issue-5883.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at LL | fn new_struct(r: dyn A + 'static) | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)` + = help: the trait `Sized` is not implemented for `(dyn A + 'static)` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | @@ -20,7 +20,7 @@ LL | LL | Struct { r: r } | --------------- this returned value is of type `Struct` | - = help: within `Struct`, the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)` + = help: within `Struct`, the trait `Sized` is not implemented for `(dyn A + 'static)` = note: required because it appears within the type `Struct` = note: the return type of a function must have a statically known size diff --git a/src/test/ui/issues/issue-59488.rs b/src/test/ui/issues/issue-59488.rs index 6fa9961f26c..384501e3e5d 100644 --- a/src/test/ui/issues/issue-59488.rs +++ b/src/test/ui/issues/issue-59488.rs @@ -29,6 +29,6 @@ fn main() { let i = Foo::Bar; assert_eq!(Foo::Bar, i); //~^ ERROR binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}` [E0369] - //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` [E0277] - //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` [E0277] + //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` [E0277] + //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` [E0277] } diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr index 58f1376b19d..3b10491a8ab 100644 --- a/src/test/ui/issues/issue-59488.stderr +++ b/src/test/ui/issues/issue-59488.stderr @@ -79,25 +79,25 @@ LL | assert_eq!(Foo::Bar, i); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` +error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` --> $DIR/issue-59488.rs:30:5 | LL | assert_eq!(Foo::Bar, i); - | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` + = help: the trait `Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` + = note: required because of the requirements on the impl of `Debug` for `&fn(usize) -> Foo {Foo::Bar}` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug` +error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` --> $DIR/issue-59488.rs:30:5 | LL | assert_eq!(Foo::Bar, i); - | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}` + = help: the trait `Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}` + = note: required because of the requirements on the impl of `Debug` for `&fn(usize) -> Foo {Foo::Bar}` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/issues/issue-60218.stderr b/src/test/ui/issues/issue-60218.stderr index 77b9d9c4aaa..a2b2fdd4fd2 100644 --- a/src/test/ui/issues/issue-60218.stderr +++ b/src/test/ui/issues/issue-60218.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'t> ::IntoIter, _> as std::iter::Iterator>::Item: Foo` is not satisfied +error[E0277]: the trait bound `for<'t> ::IntoIter, _> as Iterator>::Item: Foo` is not satisfied --> $DIR/issue-60218.rs:18:5 | LL | pub fn trigger_error(iterable: I, functor: F) @@ -8,7 +8,7 @@ LL | for<'t> ::IntoIter, F> as Iterator>::Item: Foo, | --- required by this bound in `trigger_error` ... LL | trigger_error(vec![], |x: &u32| x) - | ^^^^^^^^^^^^^ the trait `for<'t> Foo` is not implemented for `::IntoIter, _> as std::iter::Iterator>::Item` + | ^^^^^^^^^^^^^ the trait `for<'t> Foo` is not implemented for `::IntoIter, _> as Iterator>::Item` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-61106.stderr b/src/test/ui/issues/issue-61106.stderr index 163aa816ab7..2d841d28ee2 100644 --- a/src/test/ui/issues/issue-61106.stderr +++ b/src/test/ui/issues/issue-61106.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | foo(x.clone()); | ^^^^^^^^^ | | - | expected `&str`, found struct `std::string::String` + | expected `&str`, found struct `String` | help: consider borrowing here: `&x` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-61108.stderr b/src/test/ui/issues/issue-61108.stderr index d7c2bbf9175..d6c289cbd66 100644 --- a/src/test/ui/issues/issue-61108.stderr +++ b/src/test/ui/issues/issue-61108.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `bad_letters` --> $DIR/issue-61108.rs:6:5 | LL | let mut bad_letters = vec!['e', 't', 'o', 'i']; - | --------------- move occurs because `bad_letters` has type `std::vec::Vec`, which does not implement the `Copy` trait + | --------------- move occurs because `bad_letters` has type `Vec`, which does not implement the `Copy` trait LL | for l in bad_letters { | ----------- | | diff --git a/src/test/ui/issues/issue-64559.stderr b/src/test/ui/issues/issue-64559.stderr index e942a1aeba3..5b97e21b888 100644 --- a/src/test/ui/issues/issue-64559.stderr +++ b/src/test/ui/issues/issue-64559.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `orig` --> $DIR/issue-64559.rs:4:20 | LL | let orig = vec![true]; - | ---- move occurs because `orig` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ---- move occurs because `orig` has type `Vec`, which does not implement the `Copy` trait LL | for _val in orig {} | ---- | | diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr index 6537867bbf5..00ebff9007d 100644 --- a/src/test/ui/issues/issue-6458-4.stderr +++ b/src/test/ui/issues/issue-6458-4.stderr @@ -8,7 +8,7 @@ LL | fn foo(b: bool) -> Result { LL | Err("bar".to_string()); | - help: consider removing this semicolon | - = note: expected enum `std::result::Result` + = note: expected enum `std::result::Result` found unit type `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-65611.stderr b/src/test/ui/issues/issue-65611.stderr index 20e2ba144d9..e3c005a0593 100644 --- a/src/test/ui/issues/issue-65611.stderr +++ b/src/test/ui/issues/issue-65611.stderr @@ -5,7 +5,7 @@ LL | let x = buffer.last().unwrap().0.clone(); | -------^^^^-- | | | | | cannot infer type for type parameter `T` - | this method call resolves to `std::option::Option<&T>` + | this method call resolves to `Option<&T>` | = note: type must be known at this point diff --git a/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr b/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr index 83d8770b2e0..de0e78ac20c 100644 --- a/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr +++ b/src/test/ui/issues/issue-65634-raw-ident-suggestion.stderr @@ -4,12 +4,12 @@ error[E0034]: multiple applicable items in scope LL | r#fn {}.r#struct(); | ^^^^^^^^ multiple `r#struct` found | -note: candidate #1 is defined in an impl of the trait `async` for the type `r#fn` +note: candidate #1 is defined in an impl of the trait `async` for the type `fn` --> $DIR/issue-65634-raw-ident-suggestion.rs:4:5 | LL | fn r#struct(&self) { | ^^^^^^^^^^^^^^^^^^ -note: candidate #2 is defined in an impl of the trait `await` for the type `r#fn` +note: candidate #2 is defined in an impl of the trait `await` for the type `fn` --> $DIR/issue-65634-raw-ident-suggestion.rs:10:5 | LL | fn r#struct(&self) { diff --git a/src/test/ui/issues/issue-65673.stderr b/src/test/ui/issues/issue-65673.stderr index fef64ebf2d3..aa43ac9414f 100644 --- a/src/test/ui/issues/issue-65673.stderr +++ b/src/test/ui/issues/issue-65673.stderr @@ -9,7 +9,7 @@ LL | type Ctx; LL | type Ctx = dyn Alias; | ^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn Trait + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Trait + 'static)` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr b/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr index 8e7ee97e0b9..a08531000bc 100644 --- a/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr +++ b/src/test/ui/issues/issue-66923-show-error-for-correct-call.stderr @@ -1,18 +1,18 @@ -error[E0277]: a value of type `std::vec::Vec` cannot be built from an iterator over elements of type `&f64` +error[E0277]: a value of type `Vec` cannot be built from an iterator over elements of type `&f64` --> $DIR/issue-66923-show-error-for-correct-call.rs:8:39 | LL | let x2: Vec = x1.into_iter().collect(); - | ^^^^^^^ value of type `std::vec::Vec` cannot be built from `std::iter::Iterator` + | ^^^^^^^ value of type `Vec` cannot be built from `std::iter::Iterator` | - = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec` + = help: the trait `FromIterator<&f64>` is not implemented for `Vec` -error[E0277]: a value of type `std::vec::Vec` cannot be built from an iterator over elements of type `&f64` +error[E0277]: a value of type `Vec` cannot be built from an iterator over elements of type `&f64` --> $DIR/issue-66923-show-error-for-correct-call.rs:12:29 | LL | let x3 = x1.into_iter().collect::>(); - | ^^^^^^^ value of type `std::vec::Vec` cannot be built from `std::iter::Iterator` + | ^^^^^^^ value of type `Vec` cannot be built from `std::iter::Iterator` | - = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec` + = help: the trait `FromIterator<&f64>` is not implemented for `Vec` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-67039-unsound-pin-partialeq.stderr b/src/test/ui/issues/issue-67039-unsound-pin-partialeq.stderr index 3330d60242f..036a9300a17 100644 --- a/src/test/ui/issues/issue-67039-unsound-pin-partialeq.stderr +++ b/src/test/ui/issues/issue-67039-unsound-pin-partialeq.stderr @@ -1,12 +1,12 @@ -error[E0271]: type mismatch resolving ` as std::ops::Deref>::Target == std::rc::Rc` +error[E0271]: type mismatch resolving ` as Deref>::Target == Rc` --> $DIR/issue-67039-unsound-pin-partialeq.rs:25:29 | LL | let _ = Pin::new(Apple) == Rc::pin(Apple); - | ^^ expected struct `Apple`, found struct `std::rc::Rc` + | ^^ expected struct `Apple`, found struct `Rc` | = note: expected type `Apple` - found struct `std::rc::Rc` - = note: required because of the requirements on the impl of `std::cmp::PartialEq>>` for `std::pin::Pin` + found struct `Rc` + = note: required because of the requirements on the impl of `PartialEq>>` for `Pin` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-69725.stderr b/src/test/ui/issues/issue-69725.stderr index 20420d37b3e..3f70dbcc2a0 100644 --- a/src/test/ui/issues/issue-69725.stderr +++ b/src/test/ui/issues/issue-69725.stderr @@ -1,25 +1,25 @@ -error[E0599]: no method named `clone` found for struct `issue_69725::Struct` in the current scope +error[E0599]: no method named `clone` found for struct `Struct` in the current scope --> $DIR/issue-69725.rs:7:32 | LL | let _ = Struct::::new().clone(); - | ^^^^^ method not found in `issue_69725::Struct` + | ^^^^^ method not found in `Struct` | ::: $DIR/auxiliary/issue-69725.rs:2:1 | LL | pub struct Struct(A); - | ------------------------ doesn't satisfy `issue_69725::Struct: std::clone::Clone` + | ------------------------ doesn't satisfy `Struct: Clone` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc>` here - | the method is available for `std::rc::Rc>` here + | the method is available for `Arc>` here + | the method is available for `Rc>` here | = note: the method `clone` exists but the following trait bounds were not satisfied: - `A: std::clone::Clone` - which is required by `issue_69725::Struct: std::clone::Clone` + `A: Clone` + which is required by `Struct: Clone` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-7013.rs b/src/test/ui/issues/issue-7013.rs index 3d72b67e391..c1f400b3304 100644 --- a/src/test/ui/issues/issue-7013.rs +++ b/src/test/ui/issues/issue-7013.rs @@ -24,5 +24,5 @@ struct A { fn main() { let a = A {v: box B{v: None} as Box}; - //~^ ERROR `std::rc::Rc>` cannot be sent between threads safely + //~^ ERROR `Rc>` cannot be sent between threads safely } diff --git a/src/test/ui/issues/issue-7013.stderr b/src/test/ui/issues/issue-7013.stderr index f2668d33122..5f3156a5402 100644 --- a/src/test/ui/issues/issue-7013.stderr +++ b/src/test/ui/issues/issue-7013.stderr @@ -1,13 +1,13 @@ -error[E0277]: `std::rc::Rc>` cannot be sent between threads safely +error[E0277]: `Rc>` cannot be sent between threads safely --> $DIR/issue-7013.rs:26:19 | LL | let a = A {v: box B{v: None} as Box}; - | ^^^^^^^^^^^^^^ `std::rc::Rc>` cannot be sent between threads safely + | ^^^^^^^^^^^^^^ `Rc>` cannot be sent between threads safely | - = help: within `B`, the trait `std::marker::Send` is not implemented for `std::rc::Rc>` - = note: required because it appears within the type `std::option::Option>>` + = help: within `B`, the trait `Send` is not implemented for `Rc>` + = note: required because it appears within the type `Option>>` = note: required because it appears within the type `B` - = note: required for the cast to the object type `dyn Foo + std::marker::Send` + = note: required for the cast to the object type `dyn Foo + Send` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-7061.rs b/src/test/ui/issues/issue-7061.rs index ef61eac7baa..8a6ee920a3a 100644 --- a/src/test/ui/issues/issue-7061.rs +++ b/src/test/ui/issues/issue-7061.rs @@ -3,7 +3,7 @@ struct BarStruct; impl<'a> BarStruct { fn foo(&'a mut self) -> Box { self } //~^ ERROR mismatched types - //~| expected struct `std::boxed::Box` + //~| expected struct `Box` //~| found mutable reference `&'a mut BarStruct` } diff --git a/src/test/ui/issues/issue-7061.stderr b/src/test/ui/issues/issue-7061.stderr index bf1450ca765..27034378d3f 100644 --- a/src/test/ui/issues/issue-7061.stderr +++ b/src/test/ui/issues/issue-7061.stderr @@ -2,11 +2,11 @@ error[E0308]: mismatched types --> $DIR/issue-7061.rs:4:46 | LL | fn foo(&'a mut self) -> Box { self } - | -------------- ^^^^ expected struct `std::boxed::Box`, found `&mut BarStruct` + | -------------- ^^^^ expected struct `Box`, found `&mut BarStruct` | | - | expected `std::boxed::Box` because of return type + | expected `Box` because of return type | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found mutable reference `&'a mut BarStruct` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr b/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr index 467c15cc52d..f5a56d7553b 100644 --- a/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr +++ b/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr @@ -20,18 +20,18 @@ LL | assert_eq!(a, 0); found type `i32` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: `fn() -> i32 {a}` doesn't implement `std::fmt::Debug` +error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug` --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 | LL | fn a() -> i32 { | - consider calling this function ... LL | assert_eq!(a, 0); - | ^^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `fn() -> i32 {a}` + = help: the trait `Debug` is not implemented for `fn() -> i32 {a}` = help: use parentheses to call the function: `a()` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn() -> i32 {a}` + = note: required because of the requirements on the impl of `Debug` for `&fn() -> i32 {a}` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/issues/issue-7092.rs b/src/test/ui/issues/issue-7092.rs index 09fa6c52508..85bfbf90d9a 100644 --- a/src/test/ui/issues/issue-7092.rs +++ b/src/test/ui/issues/issue-7092.rs @@ -5,9 +5,9 @@ fn foo(x: Whatever) { match x { Some(field) => //~^ ERROR mismatched types -//~| expected enum `Whatever`, found enum `std::option::Option` +//~| expected enum `Whatever`, found enum `Option` //~| expected enum `Whatever` -//~| found enum `std::option::Option<_>` +//~| found enum `Option<_>` field.access(), } } diff --git a/src/test/ui/issues/issue-7092.stderr b/src/test/ui/issues/issue-7092.stderr index 590dd40c653..59e8d75e236 100644 --- a/src/test/ui/issues/issue-7092.stderr +++ b/src/test/ui/issues/issue-7092.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | match x { | - this expression has type `Whatever` LL | Some(field) => - | ^^^^^^^^^^^ expected enum `Whatever`, found enum `std::option::Option` + | ^^^^^^^^^^^ expected enum `Whatever`, found enum `Option` | = note: expected enum `Whatever` - found enum `std::option::Option<_>` + found enum `Option<_>` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-71036.rs b/src/test/ui/issues/issue-71036.rs index 01d1cff42e4..3d2df6fe997 100644 --- a/src/test/ui/issues/issue-71036.rs +++ b/src/test/ui/issues/issue-71036.rs @@ -9,8 +9,8 @@ struct Foo<'a, T: ?Sized> { } impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} -//~^ ERROR the trait bound `&'a T: std::marker::Unsize<&'a U>` is not satisfied -//~| NOTE the trait `std::marker::Unsize<&'a U>` is not implemented for `&'a T` +//~^ ERROR the trait bound `&'a T: Unsize<&'a U>` is not satisfied +//~| NOTE the trait `Unsize<&'a U>` is not implemented for `&'a T` //~| NOTE all implementations of `Unsize` are provided automatically by the compiler //~| NOTE required because of the requirements on the impl diff --git a/src/test/ui/issues/issue-71036.stderr b/src/test/ui/issues/issue-71036.stderr index 57cf2468945..db1f6946660 100644 --- a/src/test/ui/issues/issue-71036.stderr +++ b/src/test/ui/issues/issue-71036.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `&'a T: std::marker::Unsize<&'a U>` is not satisfied +error[E0277]: the trait bound `&'a T: Unsize<&'a U>` is not satisfied --> $DIR/issue-71036.rs:11:1 | LL | impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Unsize<&'a U>` is not implemented for `&'a T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unsize<&'a U>` is not implemented for `&'a T` | = note: all implementations of `Unsize` are provided automatically by the compiler, see for more information - = note: required because of the requirements on the impl of `std::ops::DispatchFromDyn<&'a &'a U>` for `&'a &'a T` + = note: required because of the requirements on the impl of `DispatchFromDyn<&'a &'a U>` for `&'a &'a T` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-71584.stderr b/src/test/ui/issues/issue-71584.stderr index c162d338a93..1c216e64982 100644 --- a/src/test/ui/issues/issue-71584.stderr +++ b/src/test/ui/issues/issue-71584.stderr @@ -1,8 +1,8 @@ -error[E0284]: type annotations needed: cannot satisfy `>::Output == u64` +error[E0284]: type annotations needed: cannot satisfy `>::Output == u64` --> $DIR/issue-71584.rs:4:11 | LL | d = d % n.into(); - | ^ cannot satisfy `>::Output == u64` + | ^ cannot satisfy `>::Output == u64` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-72690.stderr b/src/test/ui/issues/issue-72690.stderr index 64e78ddf604..feb1316357e 100644 --- a/src/test/ui/issues/issue-72690.stderr +++ b/src/test/ui/issues/issue-72690.stderr @@ -2,10 +2,10 @@ error[E0283]: type annotations needed --> $DIR/issue-72690.rs:7:5 | LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` error[E0282]: type annotations needed --> $DIR/issue-72690.rs:11:6 @@ -19,68 +19,68 @@ error[E0283]: type annotations needed LL | let _ = "x".as_ref(); | ^^^^^^ cannot infer type for type `str` | - = note: cannot satisfy `str: std::convert::AsRef<_>` + = note: cannot satisfy `str: AsRef<_>` error[E0283]: type annotations needed --> $DIR/issue-72690.rs:19:5 | LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` error[E0283]: type annotations needed --> $DIR/issue-72690.rs:25:5 | LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` error[E0283]: type annotations needed --> $DIR/issue-72690.rs:33:5 | LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` -error[E0283]: type annotations needed for `std::string::String` +error[E0283]: type annotations needed for `String` --> $DIR/issue-72690.rs:41:5 | LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` LL | let _ = String::from("x"); | - consider giving this pattern a type | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` -error[E0283]: type annotations needed for `std::string::String` +error[E0283]: type annotations needed for `String` --> $DIR/issue-72690.rs:47:5 | LL | let _ = String::from("x"); | - consider giving this pattern a type LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` -error[E0283]: type annotations needed for `std::string::String` +error[E0283]: type annotations needed for `String` --> $DIR/issue-72690.rs:55:5 | LL | let _ = String::from("x"); | - consider giving this pattern a type ... LL | String::from("x".as_ref()); - | ^^^^^^^^^^^^ cannot infer type for struct `std::string::String` + | ^^^^^^^^^^^^ cannot infer type for struct `String` | - = note: cannot satisfy `std::string::String: std::convert::From<&_>` - = note: required by `std::convert::From::from` + = note: cannot satisfy `String: From<&_>` + = note: required by `from` error: aborting due to 9 previous errors diff --git a/src/test/ui/issues/issue-7364.rs b/src/test/ui/issues/issue-7364.rs index 52ec9e42be7..39452897e67 100644 --- a/src/test/ui/issues/issue-7364.rs +++ b/src/test/ui/issues/issue-7364.rs @@ -5,7 +5,7 @@ use std::cell::RefCell; // Regression test for issue 7364 static boxed: Box> = box RefCell::new(0); //~^ ERROR allocations are not allowed in statics -//~| ERROR `std::cell::RefCell` cannot be shared between threads safely [E0277] +//~| ERROR `RefCell` cannot be shared between threads safely [E0277] //~| ERROR static contains unimplemented expression type fn main() { } diff --git a/src/test/ui/issues/issue-7364.stderr b/src/test/ui/issues/issue-7364.stderr index efff2c24525..90f3bf53a7b 100644 --- a/src/test/ui/issues/issue-7364.stderr +++ b/src/test/ui/issues/issue-7364.stderr @@ -12,15 +12,15 @@ LL | static boxed: Box> = box RefCell::new(0); | = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable -error[E0277]: `std::cell::RefCell` cannot be shared between threads safely +error[E0277]: `RefCell` cannot be shared between threads safely --> $DIR/issue-7364.rs:6:1 | LL | static boxed: Box> = box RefCell::new(0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::RefCell` cannot be shared between threads safely + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `RefCell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique>` - = note: required because it appears within the type `std::boxed::Box>` + = help: the trait `Sync` is not implemented for `RefCell` + = note: required because of the requirements on the impl of `Sync` for `Unique>` + = note: required because it appears within the type `Box>` = note: shared static variables must have a type that implements `Sync` error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-73886.rs b/src/test/ui/issues/issue-73886.rs index 2f1ec8c6d62..9c0c87a5cf2 100644 --- a/src/test/ui/issues/issue-73886.rs +++ b/src/test/ui/issues/issue-73886.rs @@ -2,5 +2,5 @@ fn main() { let _ = &&[0] as &[_]; //~^ ERROR non-primitive cast: `&&[i32; 1]` as `&[_]` let _ = 7u32 as Option<_>; - //~^ ERROR non-primitive cast: `u32` as `std::option::Option<_>` + //~^ ERROR non-primitive cast: `u32` as `Option<_>` } diff --git a/src/test/ui/issues/issue-73886.stderr b/src/test/ui/issues/issue-73886.stderr index e8ab7db6b82..31f642ea664 100644 --- a/src/test/ui/issues/issue-73886.stderr +++ b/src/test/ui/issues/issue-73886.stderr @@ -4,7 +4,7 @@ error[E0605]: non-primitive cast: `&&[i32; 1]` as `&[_]` LL | let _ = &&[0] as &[_]; | ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object -error[E0605]: non-primitive cast: `u32` as `std::option::Option<_>` +error[E0605]: non-primitive cast: `u32` as `Option<_>` --> $DIR/issue-73886.rs:4:13 | LL | let _ = 7u32 as Option<_>; diff --git a/src/test/ui/issues/issue-74236/main.stderr b/src/test/ui/issues/issue-74236/main.stderr index 51d4833e014..55e94ae72c7 100644 --- a/src/test/ui/issues/issue-74236/main.stderr +++ b/src/test/ui/issues/issue-74236/main.stderr @@ -2,9 +2,9 @@ error[E0308]: mismatched types --> $DIR/main.rs:7:9 | LL | let () = dep::Renamed; - | ^^ ------------ this expression has type `dep::Renamed` + | ^^ ------------ this expression has type `Renamed` | | - | expected struct `dep::Renamed`, found `()` + | expected struct `Renamed`, found `()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-8727.rs b/src/test/ui/issues/issue-8727.rs index 14bdd851111..01b3bc582f7 100644 --- a/src/test/ui/issues/issue-8727.rs +++ b/src/test/ui/issues/issue-8727.rs @@ -6,7 +6,7 @@ fn generic() { //~ WARN function cannot return without recursing generic::>(); } -//~^^ ERROR reached the recursion limit while instantiating `generic::>(); = note: `#[warn(unconditional_recursion)]` on by default = help: a `loop` may express intention better if this is on purpose -error: reached the recursion limit while instantiating `generic::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` +error: reached the recursion limit while instantiating `generic::>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` --> $DIR/issue-8727.rs:7:5 | LL | generic::>(); diff --git a/src/test/ui/iterators/array-of-ranges.stderr b/src/test/ui/iterators/array-of-ranges.stderr index 3dbed9a1065..6271d8107bc 100644 --- a/src/test/ui/iterators/array-of-ranges.stderr +++ b/src/test/ui/iterators/array-of-ranges.stderr @@ -4,49 +4,49 @@ error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator LL | for _ in [0..1] {} | ^^^^^^ if you meant to iterate between two values, remove the square brackets | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]` + = help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]` = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` -error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator +error[E0277]: `[RangeInclusive<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:4:14 | LL | for _ in [0..=1] {} - | ^^^^^^^ if you meant to iterate between two values, remove the square brackets + | ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeInclusive<{integer}>; 1]` - = note: `[start..=end]` is an array of one `RangeInclusive`; you might have meant to have a `RangeInclusive` without the brackets: `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `[RangeInclusive<{integer}>; 1]` + = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` + = note: required by `into_iter` -error[E0277]: `[std::ops::RangeFrom<{integer}>; 1]` is not an iterator +error[E0277]: `[RangeFrom<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:6:14 | LL | for _ in [0..] {} - | ^^^^^ if you meant to iterate from a value onwards, remove the square brackets + | ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeFrom<{integer}>; 1]` - = note: `[start..]` is an array of one `RangeFrom`; you might have meant to have a `RangeFrom` without the brackets: `start..`, keeping in mind that iterating over an unbounded iterator will run forever unless you `break` or `return` from within the loop - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `[RangeFrom<{integer}>; 1]` + = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` + = note: required by `into_iter` -error[E0277]: `[std::ops::RangeTo<{integer}>; 1]` is not an iterator +error[E0277]: `[RangeTo<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:8:14 | LL | for _ in [..1] {} - | ^^^^^ if you meant to iterate until a value, remove the square brackets and add a starting value + | ^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeTo<{integer}>; 1]` - = note: `[..end]` is an array of one `RangeTo`; you might have meant to have a bounded `Range` without the brackets: `0..end` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `[RangeTo<{integer}>; 1]` + = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` + = note: required by `into_iter` -error[E0277]: `[std::ops::RangeToInclusive<{integer}>; 1]` is not an iterator +error[E0277]: `[RangeToInclusive<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:10:14 | LL | for _ in [..=1] {} - | ^^^^^^ if you meant to iterate until a value (including it), remove the square brackets and add a starting value + | ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeToInclusive<{integer}>; 1]` - = note: `[..=end]` is an array of one `RangeToInclusive`; you might have meant to have a bounded `RangeInclusive` without the brackets: `0..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `[RangeToInclusive<{integer}>; 1]` + = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` + = note: required by `into_iter` error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:14:14 @@ -54,9 +54,9 @@ error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator LL | for _ in [start..end] {} | ^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]` + = help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]` = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:17:14 @@ -64,9 +64,9 @@ error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator LL | for _ in array_of_range {} | ^^^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]` + = help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]` = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator --> $DIR/array-of-ranges.rs:19:14 @@ -74,19 +74,19 @@ error[E0277]: `[std::ops::Range<{integer}>; 2]` is not an iterator LL | for _ in [0..1, 2..3] {} | ^^^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 2]` + = help: the trait `Iterator` is not implemented for `[std::ops::Range<{integer}>; 2]` = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` -error[E0277]: `[std::ops::RangeInclusive<{integer}>; 1]` is not an iterator +error[E0277]: `[RangeInclusive<{integer}>; 1]` is not an iterator --> $DIR/array-of-ranges.rs:21:14 | LL | for _ in [0..=1] {} - | ^^^^^^^ if you meant to iterate between two values, remove the square brackets + | ^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::RangeInclusive<{integer}>; 1]` - = note: `[start..=end]` is an array of one `RangeInclusive`; you might have meant to have a `RangeInclusive` without the brackets: `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `[RangeInclusive<{integer}>; 1]` + = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` + = note: required by `into_iter` error: aborting due to 9 previous errors diff --git a/src/test/ui/iterators/array.stderr b/src/test/ui/iterators/array.stderr index 94731f1c745..f86c82e4917 100644 --- a/src/test/ui/iterators/array.stderr +++ b/src/test/ui/iterators/array.stderr @@ -4,9 +4,9 @@ error[E0277]: `[{integer}; 2]` is not an iterator LL | for _ in [1, 2] {} | ^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[{integer}; 2]` + = help: the trait `Iterator` is not implemented for `[{integer}; 2]` = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `[{integer}; 2]` is not an iterator --> $DIR/array.rs:5:14 @@ -14,9 +14,9 @@ error[E0277]: `[{integer}; 2]` is not an iterator LL | for _ in x {} | ^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[{integer}; 2]` + = help: the trait `Iterator` is not implemented for `[{integer}; 2]` = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `[{float}; 2]` is not an iterator --> $DIR/array.rs:7:14 @@ -24,9 +24,9 @@ error[E0277]: `[{float}; 2]` is not an iterator LL | for _ in [1.0, 2.0] {} | ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it | - = help: the trait `std::iter::Iterator` is not implemented for `[{float}; 2]` + = help: the trait `Iterator` is not implemented for `[{float}; 2]` = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error: aborting due to 3 previous errors diff --git a/src/test/ui/iterators/bound.stderr b/src/test/ui/iterators/bound.stderr index 1a5aad6c36d..eaf2e66d0f8 100644 --- a/src/test/ui/iterators/bound.stderr +++ b/src/test/ui/iterators/bound.stderr @@ -6,7 +6,7 @@ LL | struct S(I); LL | struct T(S); | ^^^^^ `u8` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `u8` + = help: the trait `Iterator` is not implemented for `u8` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` error: aborting due to previous error diff --git a/src/test/ui/iterators/integral.stderr b/src/test/ui/iterators/integral.stderr index 71e1e81e5af..c4c46412611 100644 --- a/src/test/ui/iterators/integral.stderr +++ b/src/test/ui/iterators/integral.stderr @@ -4,9 +4,9 @@ error[E0277]: `{integer}` is not an iterator LL | for _ in 42 {} | ^^ `{integer}` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `{integer}` + = help: the trait `Iterator` is not implemented for `{integer}` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `u8` is not an iterator --> $DIR/integral.rs:4:14 @@ -14,9 +14,9 @@ error[E0277]: `u8` is not an iterator LL | for _ in 42 as u8 {} | ^^^^^^^^ `u8` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `u8` + = help: the trait `Iterator` is not implemented for `u8` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `i8` is not an iterator --> $DIR/integral.rs:6:14 @@ -24,9 +24,9 @@ error[E0277]: `i8` is not an iterator LL | for _ in 42 as i8 {} | ^^^^^^^^ `i8` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `i8` + = help: the trait `Iterator` is not implemented for `i8` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `u16` is not an iterator --> $DIR/integral.rs:8:14 @@ -34,9 +34,9 @@ error[E0277]: `u16` is not an iterator LL | for _ in 42 as u16 {} | ^^^^^^^^^ `u16` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `u16` + = help: the trait `Iterator` is not implemented for `u16` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `i16` is not an iterator --> $DIR/integral.rs:10:14 @@ -44,9 +44,9 @@ error[E0277]: `i16` is not an iterator LL | for _ in 42 as i16 {} | ^^^^^^^^^ `i16` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `i16` + = help: the trait `Iterator` is not implemented for `i16` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `u32` is not an iterator --> $DIR/integral.rs:12:14 @@ -54,9 +54,9 @@ error[E0277]: `u32` is not an iterator LL | for _ in 42 as u32 {} | ^^^^^^^^^ `u32` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `u32` + = help: the trait `Iterator` is not implemented for `u32` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `i32` is not an iterator --> $DIR/integral.rs:14:14 @@ -64,9 +64,9 @@ error[E0277]: `i32` is not an iterator LL | for _ in 42 as i32 {} | ^^^^^^^^^ `i32` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `i32` + = help: the trait `Iterator` is not implemented for `i32` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `u64` is not an iterator --> $DIR/integral.rs:16:14 @@ -74,9 +74,9 @@ error[E0277]: `u64` is not an iterator LL | for _ in 42 as u64 {} | ^^^^^^^^^ `u64` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `u64` + = help: the trait `Iterator` is not implemented for `u64` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `i64` is not an iterator --> $DIR/integral.rs:18:14 @@ -84,9 +84,9 @@ error[E0277]: `i64` is not an iterator LL | for _ in 42 as i64 {} | ^^^^^^^^^ `i64` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `i64` + = help: the trait `Iterator` is not implemented for `i64` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `usize` is not an iterator --> $DIR/integral.rs:20:14 @@ -94,9 +94,9 @@ error[E0277]: `usize` is not an iterator LL | for _ in 42 as usize {} | ^^^^^^^^^^^ `usize` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `usize` + = help: the trait `Iterator` is not implemented for `usize` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `isize` is not an iterator --> $DIR/integral.rs:22:14 @@ -104,9 +104,9 @@ error[E0277]: `isize` is not an iterator LL | for _ in 42 as isize {} | ^^^^^^^^^^^ `isize` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `isize` + = help: the trait `Iterator` is not implemented for `isize` = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = note: required by `into_iter` error[E0277]: `{float}` is not an iterator --> $DIR/integral.rs:24:14 @@ -114,8 +114,8 @@ error[E0277]: `{float}` is not an iterator LL | for _ in 42.0 {} | ^^^^ `{float}` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `{float}` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `{float}` + = note: required by `into_iter` error: aborting due to 12 previous errors diff --git a/src/test/ui/iterators/ranges.stderr b/src/test/ui/iterators/ranges.stderr index e5e2d87879d..0324d5f1a92 100644 --- a/src/test/ui/iterators/ranges.stderr +++ b/src/test/ui/iterators/ranges.stderr @@ -1,22 +1,20 @@ -error[E0277]: `std::ops::RangeTo<{integer}>` is not an iterator +error[E0277]: `RangeTo<{integer}>` is not an iterator --> $DIR/ranges.rs:2:14 | LL | for _ in ..10 {} - | ^^^^ if you meant to iterate until a value, add a starting value + | ^^^^ `RangeTo<{integer}>` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `std::ops::RangeTo<{integer}>` - = note: `..end` is a `RangeTo`, which cannot be iterated on; you might have meant to have a bounded `Range`: `0..end` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `RangeTo<{integer}>` + = note: required by `into_iter` -error[E0277]: `std::ops::RangeToInclusive<{integer}>` is not an iterator +error[E0277]: `RangeToInclusive<{integer}>` is not an iterator --> $DIR/ranges.rs:4:14 | LL | for _ in ..=10 {} - | ^^^^^ if you meant to iterate until a value (including it), add a starting value + | ^^^^^ `RangeToInclusive<{integer}>` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `std::ops::RangeToInclusive<{integer}>` - = note: `..=end` is a `RangeToInclusive`, which cannot be iterated on; you might have meant to have a bounded `RangeInclusive`: `0..=end` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `RangeToInclusive<{integer}>` + = note: required by `into_iter` error: aborting due to 2 previous errors diff --git a/src/test/ui/iterators/string.rs b/src/test/ui/iterators/string.rs index 4373dcaabe5..ad58a463e9b 100644 --- a/src/test/ui/iterators/string.rs +++ b/src/test/ui/iterators/string.rs @@ -1,6 +1,6 @@ fn main() { for _ in "".to_owned() {} - //~^ ERROR `std::string::String` is not an iterator + //~^ ERROR `String` is not an iterator for _ in "" {} //~^ ERROR `&str` is not an iterator } diff --git a/src/test/ui/iterators/string.stderr b/src/test/ui/iterators/string.stderr index 927de952cc8..fecdbd1785f 100644 --- a/src/test/ui/iterators/string.stderr +++ b/src/test/ui/iterators/string.stderr @@ -1,11 +1,11 @@ -error[E0277]: `std::string::String` is not an iterator +error[E0277]: `String` is not an iterator --> $DIR/string.rs:2:14 | LL | for _ in "".to_owned() {} - | ^^^^^^^^^^^^^ `std::string::String` is not an iterator; try calling `.chars()` or `.bytes()` + | ^^^^^^^^^^^^^ `String` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `std::string::String` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `String` + = note: required by `into_iter` error[E0277]: `&str` is not an iterator --> $DIR/string.rs:4:14 @@ -13,8 +13,8 @@ error[E0277]: `&str` is not an iterator LL | for _ in "" {} | ^^ `&str` is not an iterator; try calling `.chars()` or `.bytes()` | - = help: the trait `std::iter::Iterator` is not implemented for `&str` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `&str` + = note: required by `into_iter` error: aborting due to 2 previous errors diff --git a/src/test/ui/json-bom-plus-crlf-multifile.stderr b/src/test/ui/json-bom-plus-crlf-multifile.stderr index 8d3c316e467..b222334eda9 100644 --- a/src/test/ui/json-bom-plus-crlf-multifile.stderr +++ b/src/test/ui/json-bom-plus-crlf-multifile.stderr @@ -16,7 +16,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":612,"byte_end":618,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":612,"byte_end":618,"line_start":17,"line_end":17,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -36,7 +36,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":672,"byte_end":678,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":672,"byte_end":678,"line_start":19,"line_end":19,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -56,7 +56,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":735,"byte_end":741,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":735,"byte_end":741,"line_start":22,"line_end":22,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -76,7 +76,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":792,"byte_end":798,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":792,"byte_end":798,"line_start":25,"line_end":25,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types "} {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/src/test/ui/json-bom-plus-crlf.stderr b/src/test/ui/json-bom-plus-crlf.stderr index ed6b583f329..6041366dbd8 100644 --- a/src/test/ui/json-bom-plus-crlf.stderr +++ b/src/test/ui/json-bom-plus-crlf.stderr @@ -16,7 +16,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":597,"byte_end":603,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":597,"byte_end":603,"line_start":16,"line_end":16,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":606,"byte_end":607,"line_start":16,"line_end":16,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1; // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:16:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -36,7 +36,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":657,"byte_end":663,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":657,"byte_end":663,"line_start":18,"line_end":18,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = 1","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":666,"byte_end":667,"line_start":18,"line_end":18,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":" let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:18:22: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -56,7 +56,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":720,"byte_end":726,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":720,"byte_end":726,"line_start":21,"line_end":21,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String =","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":730,"byte_end":731,"line_start":22,"line_end":22,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1; // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:22:1: error[E0308]: mismatched types "} {"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type. @@ -76,7 +76,7 @@ This error occurs when the compiler is unable to infer the concrete type of a variable. It can occur in several cases, the most common being a mismatch between two types: the type the author explicitly assigned, and the type the compiler inferred. -"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":786,"byte_end":794,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":777,"byte_end":783,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types +"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":786,"byte_end":794,"line_start":24,"line_end":25,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":" let s : String = (","highlight_start":22,"highlight_end":23},{"text":" ); // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `String`, found `()`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":777,"byte_end":783,"line_start":24,"line_end":24,"column_start":13,"column_end":19,"is_primary":false,"text":[{"text":" let s : String = (","highlight_start":13,"highlight_end":19}],"label":"expected due to this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"$DIR/json-bom-plus-crlf.rs:24:22: error[E0308]: mismatched types "} {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors "} diff --git a/src/test/ui/kindck/kindck-copy.rs b/src/test/ui/kindck/kindck-copy.rs index eb18613682f..6df98c230ea 100644 --- a/src/test/ui/kindck/kindck-copy.rs +++ b/src/test/ui/kindck/kindck-copy.rs @@ -24,14 +24,14 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::<&'a [isize]>(); // ...unless they are mutable - assert_copy::<&'static mut isize>(); //~ ERROR : std::marker::Copy` is not satisfied - assert_copy::<&'a mut isize>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::<&'static mut isize>(); //~ ERROR : Copy` is not satisfied + assert_copy::<&'a mut isize>(); //~ ERROR : Copy` is not satisfied // boxes are not ok - assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied - assert_copy::(); //~ ERROR : std::marker::Copy` is not satisfied - assert_copy:: >(); //~ ERROR : std::marker::Copy` is not satisfied - assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::>(); //~ ERROR : Copy` is not satisfied + assert_copy::(); //~ ERROR : Copy` is not satisfied + assert_copy:: >(); //~ ERROR : Copy` is not satisfied + assert_copy::>(); //~ ERROR : Copy` is not satisfied // borrowed object types are generally ok assert_copy::<&'a dyn Dummy>(); @@ -39,11 +39,11 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::<&'static (dyn Dummy + Send)>(); // owned object types are not ok - assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied - assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::>(); //~ ERROR : Copy` is not satisfied + assert_copy::>(); //~ ERROR : Copy` is not satisfied // mutable object types are not ok - assert_copy::<&'a mut (dyn Dummy + Send)>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::<&'a mut (dyn Dummy + Send)>(); //~ ERROR : Copy` is not satisfied // unsafe ptrs are ok assert_copy::<*const isize>(); @@ -61,10 +61,10 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::(); // structs containing non-POD are not ok - assert_copy::(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::(); //~ ERROR : Copy` is not satisfied // ref counted types are not ok - assert_copy::>(); //~ ERROR : std::marker::Copy` is not satisfied + assert_copy::>(); //~ ERROR : Copy` is not satisfied } pub fn main() { diff --git a/src/test/ui/kindck/kindck-copy.stderr b/src/test/ui/kindck/kindck-copy.stderr index 5a7cd458e52..11943045732 100644 --- a/src/test/ui/kindck/kindck-copy.stderr +++ b/src/test/ui/kindck/kindck-copy.stderr @@ -1,107 +1,107 @@ -error[E0277]: the trait bound `&'static mut isize: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `&'static mut isize: Copy` is not satisfied --> $DIR/kindck-copy.rs:27:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::<&'static mut isize>(); - | ^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'static mut isize` + | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'static mut isize` | = help: the following implementations were found: - + -error[E0277]: the trait bound `&'a mut isize: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `&'a mut isize: Copy` is not satisfied --> $DIR/kindck-copy.rs:28:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::<&'a mut isize>(); - | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut isize` + | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'a mut isize` | = help: the following implementations were found: - + -error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Box: Copy` is not satisfied --> $DIR/kindck-copy.rs:31:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` + | ^^^^^^^^^^ the trait `Copy` is not implemented for `Box` -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/kindck-copy.rs:32:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::(); - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | ^^^^^^ the trait `Copy` is not implemented for `String` -error[E0277]: the trait bound `std::vec::Vec: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Vec: Copy` is not satisfied --> $DIR/kindck-copy.rs:33:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy:: >(); - | ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::vec::Vec` + | ^^^^^^^^^^ the trait `Copy` is not implemented for `Vec` -error[E0277]: the trait bound `std::boxed::Box<&'a mut isize>: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Box<&'a mut isize>: Copy` is not satisfied --> $DIR/kindck-copy.rs:34:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<&'a mut isize>` + | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<&'a mut isize>` -error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Box: Copy` is not satisfied --> $DIR/kindck-copy.rs:42:5 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box` -error[E0277]: the trait bound `std::boxed::Box: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Box: Copy` is not satisfied --> $DIR/kindck-copy.rs:43:5 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box` -error[E0277]: the trait bound `&'a mut (dyn Dummy + std::marker::Send + 'a): std::marker::Copy` is not satisfied +error[E0277]: the trait bound `&'a mut (dyn Dummy + Send + 'a): Copy` is not satisfied --> $DIR/kindck-copy.rs:46:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::<&'a mut (dyn Dummy + Send)>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `&'a mut (dyn Dummy + std::marker::Send + 'a)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'a mut (dyn Dummy + Send + 'a)` -error[E0277]: the trait bound `MyNoncopyStruct: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `MyNoncopyStruct: Copy` is not satisfied --> $DIR/kindck-copy.rs:64:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::(); - | ^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `MyNoncopyStruct` + | ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `MyNoncopyStruct` -error[E0277]: the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Rc: Copy` is not satisfied --> $DIR/kindck-copy.rs:67:19 | LL | fn assert_copy() { } | ---- required by this bound in `assert_copy` ... LL | assert_copy::>(); - | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc` + | ^^^^^^^^^ the trait `Copy` is not implemented for `Rc` error: aborting due to 11 previous errors diff --git a/src/test/ui/kindck/kindck-impl-type-params-2.rs b/src/test/ui/kindck/kindck-impl-type-params-2.rs index d5fcc68a759..c08f776dbf2 100644 --- a/src/test/ui/kindck/kindck-impl-type-params-2.rs +++ b/src/test/ui/kindck/kindck-impl-type-params-2.rs @@ -11,5 +11,5 @@ fn take_param(foo: &T) { } fn main() { let x: Box<_> = box 3; take_param(&x); - //~^ ERROR the trait bound `std::boxed::Box<{integer}>: Foo` is not satisfied + //~^ ERROR the trait bound `Box<{integer}>: Foo` is not satisfied } diff --git a/src/test/ui/kindck/kindck-impl-type-params-2.stderr b/src/test/ui/kindck/kindck-impl-type-params-2.stderr index 984960efaee..7e0f6e0b2de 100644 --- a/src/test/ui/kindck/kindck-impl-type-params-2.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params-2.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `std::boxed::Box<{integer}>: Foo` is not satisfied +error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied --> $DIR/kindck-impl-type-params-2.rs:13:16 | LL | fn take_param(foo: &T) { } | --- required by this bound in `take_param` ... LL | take_param(&x); - | ^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` + | ^^ the trait `Copy` is not implemented for `Box<{integer}>` | - = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>` + = note: required because of the requirements on the impl of `Foo` for `Box<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr index eb400cf0615..b01b8258e73 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr @@ -8,21 +8,21 @@ LL | let a = &t as &dyn Gettable; = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn f(val: T) { + | ^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:18:13 | LL | let a = &t as &dyn Gettable; - | ^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^ the trait `Copy` is not implemented for `T` | = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn f(val: T) { + | ^^^^^^ error[E0277]: `T` cannot be sent between threads safely --> $DIR/kindck-impl-type-params.rs:25:31 @@ -34,39 +34,39 @@ LL | let a: &dyn Gettable = &t; = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(val: T) { + | ^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:25:31 | LL | let a: &dyn Gettable = &t; - | ^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^ the trait `Copy` is not implemented for `T` | = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(val: T) { + | ^^^^^^ -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:38:13 | LL | let a = t as Box>; - | ^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | ^ the trait `Copy` is not implemented for `String` | - = note: required because of the requirements on the impl of `Gettable` for `S` - = note: required for the cast to the object type `dyn Gettable` + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` -error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Foo: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:46:37 | LL | let a: Box> = t; - | ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo` + | ^ the trait `Copy` is not implemented for `Foo` | - = note: required because of the requirements on the impl of `Gettable` for `S` - = note: required for the cast to the object type `dyn Gettable` + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` error: aborting due to 6 previous errors diff --git a/src/test/ui/kindck/kindck-impl-type-params.rs b/src/test/ui/kindck/kindck-impl-type-params.rs index c4f90f36acf..4d4d191b6aa 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.rs +++ b/src/test/ui/kindck/kindck-impl-type-params.rs @@ -17,14 +17,14 @@ fn f(val: T) { let t: S = S(marker::PhantomData); let a = &t as &dyn Gettable; //~^ ERROR `T` cannot be sent between threads safely - //~| ERROR : std::marker::Copy` is not satisfied + //~| ERROR : Copy` is not satisfied } fn g(val: T) { let t: S = S(marker::PhantomData); let a: &dyn Gettable = &t; //~^ ERROR `T` cannot be sent between threads safely - //~| ERROR : std::marker::Copy` is not satisfied + //~| ERROR : Copy` is not satisfied } fn foo<'a>() { @@ -36,7 +36,7 @@ fn foo<'a>() { fn foo2<'a>() { let t: Box> = box S(marker::PhantomData); let a = t as Box>; - //~^ ERROR : std::marker::Copy` is not satisfied + //~^ ERROR : Copy` is not satisfied } fn foo3<'a>() { @@ -44,7 +44,7 @@ fn foo3<'a>() { let t: Box> = box S(marker::PhantomData); let a: Box> = t; - //~^ ERROR : std::marker::Copy` is not satisfied + //~^ ERROR : Copy` is not satisfied } fn main() { } diff --git a/src/test/ui/kindck/kindck-impl-type-params.stderr b/src/test/ui/kindck/kindck-impl-type-params.stderr index ab9dfc9b8a7..ddf8adf3637 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.stderr @@ -8,21 +8,21 @@ LL | let a = &t as &dyn Gettable; = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn f(val: T) { + | ^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:18:13 | LL | let a = &t as &dyn Gettable; - | ^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^ the trait `Copy` is not implemented for `T` | = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn f(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn f(val: T) { + | ^^^^^^ error[E0277]: `T` cannot be sent between threads safely --> $DIR/kindck-impl-type-params.rs:25:31 @@ -34,21 +34,21 @@ LL | let a: &dyn Gettable = &t; = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(val: T) { + | ^^^^^^ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:25:31 | LL | let a: &dyn Gettable = &t; - | ^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^ the trait `Copy` is not implemented for `T` | = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` | -LL | fn g(val: T) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn g(val: T) { + | ^^^^^^ error[E0477]: the type `&'a isize` does not fulfill the required lifetime --> $DIR/kindck-impl-type-params.rs:32:13 @@ -58,23 +58,23 @@ LL | let a = &t as &dyn Gettable<&'a isize>; | = note: type must satisfy the static lifetime -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:38:13 | LL | let a = t as Box>; - | ^ the trait `std::marker::Copy` is not implemented for `std::string::String` + | ^ the trait `Copy` is not implemented for `String` | - = note: required because of the requirements on the impl of `Gettable` for `S` - = note: required for the cast to the object type `dyn Gettable` + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` -error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Foo: Copy` is not satisfied --> $DIR/kindck-impl-type-params.rs:46:37 | LL | let a: Box> = t; - | ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo` + | ^ the trait `Copy` is not implemented for `Foo` | - = note: required because of the requirements on the impl of `Gettable` for `S` - = note: required for the cast to the object type `dyn Gettable` + = note: required because of the requirements on the impl of `Gettable` for `S` + = note: required for the cast to the object type `dyn Gettable` error: aborting due to 7 previous errors diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr index 7df98366edb..a6fd44d1743 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `std::boxed::Box<{integer}>: Foo` is not satisfied +error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied --> $DIR/kindck-inherited-copy-bound.rs:21:16 | LL | fn take_param(foo: &T) { } | --- required by this bound in `take_param` ... LL | take_param(&x); - | ^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` + | ^^ the trait `Copy` is not implemented for `Box<{integer}>` | - = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>` + = note: required because of the requirements on the impl of `Foo` for `Box<{integer}>` error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/kindck-inherited-copy-bound.rs:28:19 @@ -31,7 +31,7 @@ LL | trait Foo : Copy { LL | let z = &x as &dyn Foo; | ^^ the trait `Foo` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box<{integer}>` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Foo>` for `&Box<{integer}>` = note: required by cast to type `&dyn Foo` error: aborting due to 3 previous errors diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr index 6b511e0a6e6..bc7448a05e8 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `std::boxed::Box<{integer}>: Foo` is not satisfied +error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied --> $DIR/kindck-inherited-copy-bound.rs:21:16 | LL | fn take_param(foo: &T) { } | --- required by this bound in `take_param` ... LL | take_param(&x); - | ^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>` + | ^^ the trait `Copy` is not implemented for `Box<{integer}>` | - = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>` + = note: required because of the requirements on the impl of `Foo` for `Box<{integer}>` error[E0038]: the trait `Foo` cannot be made into an object --> $DIR/kindck-inherited-copy-bound.rs:28:13 @@ -20,7 +20,7 @@ LL | trait Foo : Copy { LL | let z = &x as &dyn Foo; | ^^ the trait `Foo` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Foo>` for `&Box` = note: required by cast to type `&dyn Foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/kindck/kindck-nonsendable-1.rs b/src/test/ui/kindck/kindck-nonsendable-1.rs index eaff5b1b994..b32fd78624b 100644 --- a/src/test/ui/kindck/kindck-nonsendable-1.rs +++ b/src/test/ui/kindck/kindck-nonsendable-1.rs @@ -7,5 +7,5 @@ fn bar(_: F) { } fn main() { let x = Rc::new(3); bar(move|| foo(x)); - //~^ ERROR `std::rc::Rc` cannot be sent between threads safely + //~^ ERROR `Rc` cannot be sent between threads safely } diff --git a/src/test/ui/kindck/kindck-nonsendable-1.stderr b/src/test/ui/kindck/kindck-nonsendable-1.stderr index c7f9058dd7e..45c767fbe6c 100644 --- a/src/test/ui/kindck/kindck-nonsendable-1.stderr +++ b/src/test/ui/kindck/kindck-nonsendable-1.stderr @@ -1,16 +1,16 @@ -error[E0277]: `std::rc::Rc` cannot be sent between threads safely +error[E0277]: `Rc` cannot be sent between threads safely --> $DIR/kindck-nonsendable-1.rs:9:5 | LL | fn bar(_: F) { } | ---- required by this bound in `bar` ... LL | bar(move|| foo(x)); - | ^^^ ------------- within this `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc]` + | ^^^ ------------- within this `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:Rc]` | | - | `std::rc::Rc` cannot be sent between threads safely + | `Rc` cannot be sent between threads safely | - = help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc` - = note: required because it appears within the type `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:std::rc::Rc]` + = help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:Rc]`, the trait `Send` is not implemented for `Rc` + = note: required because it appears within the type `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:22 x:Rc]` error: aborting due to previous error diff --git a/src/test/ui/kindck/kindck-send-object.stderr b/src/test/ui/kindck/kindck-send-object.stderr index a59a375c6c8..0df7df85371 100644 --- a/src/test/ui/kindck/kindck-send-object.stderr +++ b/src/test/ui/kindck/kindck-send-object.stderr @@ -7,8 +7,8 @@ LL | fn assert_send() { } LL | assert_send::<&'static (dyn Dummy + 'static)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)` - = note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)` + = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)` + = note: required because of the requirements on the impl of `Send` for `&'static (dyn Dummy + 'static)` error[E0277]: `dyn Dummy` cannot be sent between threads safely --> $DIR/kindck-send-object.rs:17:5 @@ -19,9 +19,9 @@ LL | fn assert_send() { } LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `dyn Dummy` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique` - = note: required because it appears within the type `std::boxed::Box` + = help: the trait `Send` is not implemented for `dyn Dummy` + = note: required because of the requirements on the impl of `Send` for `Unique` + = note: required because it appears within the type `Box` error: aborting due to 2 previous errors diff --git a/src/test/ui/kindck/kindck-send-object1.nll.stderr b/src/test/ui/kindck/kindck-send-object1.nll.stderr index 14a6f554f6d..4792914d95e 100644 --- a/src/test/ui/kindck/kindck-send-object1.nll.stderr +++ b/src/test/ui/kindck/kindck-send-object1.nll.stderr @@ -7,8 +7,8 @@ LL | fn assert_send() { } LL | assert_send::<&'a dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)` - = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)` + = help: the trait `Sync` is not implemented for `(dyn Dummy + 'a)` + = note: required because of the requirements on the impl of `Send` for `&'a (dyn Dummy + 'a)` error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely --> $DIR/kindck-send-object1.rs:29:5 @@ -19,9 +19,9 @@ LL | fn assert_send() { } LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>` - = note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>` + = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)` + = note: required because of the requirements on the impl of `Send` for `Unique<(dyn Dummy + 'a)>` + = note: required because it appears within the type `Box<(dyn Dummy + 'a)>` error: aborting due to 2 previous errors diff --git a/src/test/ui/kindck/kindck-send-object1.stderr b/src/test/ui/kindck/kindck-send-object1.stderr index b6d82e3195e..aa72fda3670 100644 --- a/src/test/ui/kindck/kindck-send-object1.stderr +++ b/src/test/ui/kindck/kindck-send-object1.stderr @@ -7,10 +7,10 @@ LL | fn assert_send() { } LL | assert_send::<&'a dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)` - = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)` + = help: the trait `Sync` is not implemented for `(dyn Dummy + 'a)` + = note: required because of the requirements on the impl of `Send` for `&'a (dyn Dummy + 'a)` -error[E0477]: the type `&'a (dyn Dummy + std::marker::Sync + 'a)` does not fulfill the required lifetime +error[E0477]: the type `&'a (dyn Dummy + Sync + 'a)` does not fulfill the required lifetime --> $DIR/kindck-send-object1.rs:14:5 | LL | assert_send::<&'a (dyn Dummy + Sync)>(); @@ -27,9 +27,9 @@ LL | fn assert_send() { } LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>` - = note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>` + = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)` + = note: required because of the requirements on the impl of `Send` for `Unique<(dyn Dummy + 'a)>` + = note: required because it appears within the type `Box<(dyn Dummy + 'a)>` error: aborting due to 3 previous errors diff --git a/src/test/ui/kindck/kindck-send-object2.stderr b/src/test/ui/kindck/kindck-send-object2.stderr index e6daf987c8c..f7fb32ac04c 100644 --- a/src/test/ui/kindck/kindck-send-object2.stderr +++ b/src/test/ui/kindck/kindck-send-object2.stderr @@ -7,8 +7,8 @@ LL | fn assert_send() { } LL | assert_send::<&'static dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'static)` - = note: required because of the requirements on the impl of `std::marker::Send` for `&'static (dyn Dummy + 'static)` + = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)` + = note: required because of the requirements on the impl of `Send` for `&'static (dyn Dummy + 'static)` error[E0277]: `dyn Dummy` cannot be sent between threads safely --> $DIR/kindck-send-object2.rs:12:5 @@ -19,9 +19,9 @@ LL | fn assert_send() { } LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `dyn Dummy` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique` - = note: required because it appears within the type `std::boxed::Box` + = help: the trait `Send` is not implemented for `dyn Dummy` + = note: required because of the requirements on the impl of `Send` for `Unique` + = note: required because it appears within the type `Box` error: aborting due to 2 previous errors diff --git a/src/test/ui/kindck/kindck-send-owned.stderr b/src/test/ui/kindck/kindck-send-owned.stderr index 2c6c2c6267d..d6664ec24f9 100644 --- a/src/test/ui/kindck/kindck-send-owned.stderr +++ b/src/test/ui/kindck/kindck-send-owned.stderr @@ -7,9 +7,9 @@ LL | fn assert_send() { } LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `*mut u8` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<*mut u8>` - = note: required because it appears within the type `std::boxed::Box<*mut u8>` + = help: the trait `Send` is not implemented for `*mut u8` + = note: required because of the requirements on the impl of `Send` for `Unique<*mut u8>` + = note: required because it appears within the type `Box<*mut u8>` error: aborting due to previous error diff --git a/src/test/ui/kindck/kindck-send-unsafe.stderr b/src/test/ui/kindck/kindck-send-unsafe.stderr index 34f98218193..069e8dc67f6 100644 --- a/src/test/ui/kindck/kindck-send-unsafe.stderr +++ b/src/test/ui/kindck/kindck-send-unsafe.stderr @@ -7,7 +7,7 @@ LL | fn assert_send() { } LL | assert_send::<*mut &'a isize>(); | ^^^^^^^^^^^^^^ `*mut &'a isize` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `*mut &'a isize` + = help: the trait `Send` is not implemented for `*mut &'a isize` error: aborting due to previous error diff --git a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr index 98bf9923823..5a6c86d133b 100644 --- a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr +++ b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr @@ -5,7 +5,7 @@ LL | pub const fn sof() -> usize { | - required by this bound in `sof` ... LL | fn test() { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let _: [u8; sof::()]; | ^ doesn't have a size known at compile-time | diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr index 93160a1c5e5..91cdc0205d8 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr +++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | ref_obj(x) | ^ lifetime mismatch | - = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` - found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` + = note: expected reference `&Box<(dyn Fn() + 'static)>` + found reference `&Box<(dyn Fn() + 'a)>` note: the lifetime `'a` as defined on the function body at 32:10... --> $DIR/lifetime-bound-will-change-warning.rs:32:10 | @@ -19,8 +19,8 @@ error[E0308]: mismatched types LL | lib::ref_obj(x) | ^ lifetime mismatch | - = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>` - found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>` + = note: expected reference `&Box<(dyn Fn() + 'static)>` + found reference `&Box<(dyn Fn() + 'a)>` note: the lifetime `'a` as defined on the function body at 37:12... --> $DIR/lifetime-bound-will-change-warning.rs:37:12 | diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr index 735f7a0dfc6..1622ce42290 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn foo(x: &mut Vec>, y: Ref) { | - - has type `Ref<'1, i32>` | | - | has type `&mut std::vec::Vec>` + | has type `&mut Vec>` LL | x.push(y); | ^^^^^^^^^ argument requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr index f9c33c24806..9630729d0ee 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr +++ b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | fn foo(mut x: Vec, y: Ref) { | ----- - has type `Ref<'1>` | | - | has type `std::vec::Vec>` + | has type `Vec>` LL | x.push(y); | ^^^^^^^^^ argument requires that `'1` must outlive `'2` diff --git a/src/test/ui/lint/clashing-extern-fn.stderr b/src/test/ui/lint/clashing-extern-fn.stderr index 0a18f05ba29..a48b0d008f9 100644 --- a/src/test/ui/lint/clashing-extern-fn.stderr +++ b/src/test/ui/lint/clashing-extern-fn.stderr @@ -90,8 +90,8 @@ LL | fn weigh_banana(count: *const Banana) -> u64; LL | fn weigh_banana(count: *const Banana) -> u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration | - = note: expected `unsafe extern "C" fn(*const banana::one::Banana) -> u64` - found `unsafe extern "C" fn(*const banana::three::Banana) -> u64` + = note: expected `unsafe extern "C" fn(*const one::Banana) -> u64` + found `unsafe extern "C" fn(*const three::Banana) -> u64` warning: `draw_point` redeclared with a different signature --> $DIR/clashing-extern-fn.rs:171:13 @@ -126,7 +126,7 @@ LL | fn transparent_incorrect() -> T; LL | fn transparent_incorrect() -> isize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration | - = note: expected `unsafe extern "C" fn() -> transparent::T` + = note: expected `unsafe extern "C" fn() -> T` found `unsafe extern "C" fn() -> isize` warning: `missing_return_type` redeclared with a different signature @@ -150,7 +150,7 @@ LL | fn non_zero_usize() -> core::num::NonZeroUsize; LL | fn non_zero_usize() -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration | - = note: expected `unsafe extern "C" fn() -> std::num::NonZeroUsize` + = note: expected `unsafe extern "C" fn() -> NonZeroUsize` found `unsafe extern "C" fn() -> usize` warning: `non_null_ptr` redeclared with a different signature @@ -162,7 +162,7 @@ LL | fn non_null_ptr() -> core::ptr::NonNull; LL | fn non_null_ptr() -> *const usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this signature doesn't match the previous declaration | - = note: expected `unsafe extern "C" fn() -> std::ptr::NonNull` + = note: expected `unsafe extern "C" fn() -> NonNull` found `unsafe extern "C" fn() -> *const usize` warning: `option_non_zero_usize_incorrect` redeclared with a different signature diff --git a/src/test/ui/lint/lint-ctypes-enum.rs b/src/test/ui/lint/lint-ctypes-enum.rs index ccda005575c..17cb7053731 100644 --- a/src/test/ui/lint/lint-ctypes-enum.rs +++ b/src/test/ui/lint/lint-ctypes-enum.rs @@ -46,7 +46,7 @@ extern { fn option_fn(x: Option); fn nonnull(x: Option>); fn unique(x: Option>); - //~^ ERROR `extern` block uses type `std::option::Option>` + //~^ ERROR `extern` block uses type `Option>` fn nonzero_u8(x: Option); fn nonzero_u16(x: Option); fn nonzero_u32(x: Option); diff --git a/src/test/ui/lint/lint-ctypes-enum.stderr b/src/test/ui/lint/lint-ctypes-enum.stderr index 297ac2237a5..3d02cda7d3e 100644 --- a/src/test/ui/lint/lint-ctypes-enum.stderr +++ b/src/test/ui/lint/lint-ctypes-enum.stderr @@ -45,7 +45,7 @@ note: the type is defined here LL | enum T { E, F, G } | ^^^^^^^^^^^^^^^^^^ -error: `extern` block uses type `std::option::Option>`, which is not FFI-safe +error: `extern` block uses type `Option>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:48:17 | LL | fn unique(x: Option>); @@ -70,7 +70,7 @@ LL | fn nonzero_i128(x: Option); | = note: 128-bit integers don't currently have a known stable ABI -error: `extern` block uses type `std::option::Option>`, which is not FFI-safe +error: `extern` block uses type `Option>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:66:28 | LL | fn transparent_union(x: Option>); @@ -79,7 +79,7 @@ LL | fn transparent_union(x: Option>); = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum = note: enum has no representation hint -error: `extern` block uses type `std::option::Option>`, which is not FFI-safe +error: `extern` block uses type `Option>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:68:20 | LL | fn repr_rust(x: Option>); @@ -88,7 +88,7 @@ LL | fn repr_rust(x: Option>); = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum = note: enum has no representation hint -error: `extern` block uses type `std::result::Result<(), std::num::NonZeroI32>`, which is not FFI-safe +error: `extern` block uses type `std::result::Result<(), NonZeroI32>`, which is not FFI-safe --> $DIR/lint-ctypes-enum.rs:69:20 | LL | fn no_result(x: Result<(), num::NonZeroI32>); diff --git a/src/test/ui/lint/lint-ctypes-fn.rs b/src/test/ui/lint/lint-ctypes-fn.rs index aa02e578663..170a04efb07 100644 --- a/src/test/ui/lint/lint-ctypes-fn.rs +++ b/src/test/ui/lint/lint-ctypes-fn.rs @@ -96,7 +96,7 @@ pub extern "C" fn zero_size_phantom(p: ZeroSizeWithPhantomData) { } //~^ ERROR uses type `ZeroSizeWithPhantomData` pub extern "C" fn zero_size_phantom_toplevel() -> PhantomData { -//~^ ERROR uses type `std::marker::PhantomData` +//~^ ERROR uses type `PhantomData` Default::default() } @@ -158,7 +158,7 @@ pub extern "C" fn good2(size: *const libc::c_uint) { } pub extern "C" fn unused_generic1(size: *const Foo) { } pub extern "C" fn unused_generic2() -> PhantomData { -//~^ ERROR uses type `std::marker::PhantomData` +//~^ ERROR uses type `PhantomData` Default::default() } @@ -171,10 +171,10 @@ pub extern "C" fn used_generic3() -> T { } pub extern "C" fn used_generic4(x: Vec) { } -//~^ ERROR: uses type `std::vec::Vec` +//~^ ERROR: uses type `Vec` pub extern "C" fn used_generic5() -> Vec { -//~^ ERROR: uses type `std::vec::Vec` +//~^ ERROR: uses type `Vec` Default::default() } diff --git a/src/test/ui/lint/lint-ctypes-fn.stderr b/src/test/ui/lint/lint-ctypes-fn.stderr index d0a449514e5..e6a0778ddb2 100644 --- a/src/test/ui/lint/lint-ctypes-fn.stderr +++ b/src/test/ui/lint/lint-ctypes-fn.stderr @@ -91,7 +91,7 @@ note: the type is defined here LL | pub struct ZeroSizeWithPhantomData(PhantomData); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `extern` fn uses type `std::marker::PhantomData`, which is not FFI-safe +error: `extern` fn uses type `PhantomData`, which is not FFI-safe --> $DIR/lint-ctypes-fn.rs:98:51 | LL | pub extern "C" fn zero_size_phantom_toplevel() -> PhantomData { @@ -134,7 +134,7 @@ LL | pub extern "C" fn transparent_str(p: TransparentStr) { } = help: consider using `*const u8` and a length instead = note: string slices have no C equivalent -error: `extern` fn uses type `std::marker::PhantomData`, which is not FFI-safe +error: `extern` fn uses type `PhantomData`, which is not FFI-safe --> $DIR/lint-ctypes-fn.rs:160:43 | LL | pub extern "C" fn unused_generic2() -> PhantomData { @@ -142,7 +142,7 @@ LL | pub extern "C" fn unused_generic2() -> PhantomData { | = note: composed only of `PhantomData` -error: `extern` fn uses type `std::vec::Vec`, which is not FFI-safe +error: `extern` fn uses type `Vec`, which is not FFI-safe --> $DIR/lint-ctypes-fn.rs:173:39 | LL | pub extern "C" fn used_generic4(x: Vec) { } @@ -151,7 +151,7 @@ LL | pub extern "C" fn used_generic4(x: Vec) { } = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct = note: this struct has unspecified layout -error: `extern` fn uses type `std::vec::Vec`, which is not FFI-safe +error: `extern` fn uses type `Vec`, which is not FFI-safe --> $DIR/lint-ctypes-fn.rs:176:41 | LL | pub extern "C" fn used_generic5() -> Vec { diff --git a/src/test/ui/lint/lint-ctypes.rs b/src/test/ui/lint/lint-ctypes.rs index f485766bcd3..e8a90bca7d3 100644 --- a/src/test/ui/lint/lint-ctypes.rs +++ b/src/test/ui/lint/lint-ctypes.rs @@ -48,9 +48,9 @@ extern { pub fn ptr_type2(size: *const Foo); //~ ERROR: uses type `Foo` pub fn slice_type(p: &[u32]); //~ ERROR: uses type `[u32]` pub fn str_type(p: &str); //~ ERROR: uses type `str` - pub fn box_type(p: Box); //~ ERROR uses type `std::boxed::Box` + pub fn box_type(p: Box); //~ ERROR uses type `Box` pub fn opt_box_type(p: Option>); - //~^ ERROR uses type `std::option::Option>` + //~^ ERROR uses type `Option>` pub fn char_type(p: char); //~ ERROR uses type `char` pub fn i128_type(p: i128); //~ ERROR uses type `i128` pub fn u128_type(p: u128); //~ ERROR uses type `u128` @@ -61,13 +61,13 @@ extern { pub fn zero_size_phantom(p: ZeroSizeWithPhantomData); //~^ ERROR uses type `ZeroSizeWithPhantomData` pub fn zero_size_phantom_toplevel() - -> ::std::marker::PhantomData; //~ ERROR uses type `std::marker::PhantomData` + -> ::std::marker::PhantomData; //~ ERROR uses type `PhantomData` pub fn fn_type(p: RustFn); //~ ERROR uses type `fn()` pub fn fn_type2(p: fn()); //~ ERROR uses type `fn()` - pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `std::boxed::Box` + pub fn fn_contained(p: RustBadRet); //~ ERROR: uses type `Box` pub fn transparent_i128(p: TransparentI128); //~ ERROR: uses type `i128` pub fn transparent_str(p: TransparentStr); //~ ERROR: uses type `str` - pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `std::boxed::Box` + pub fn transparent_fn(p: TransparentBadFn); //~ ERROR: uses type `Box` pub fn raw_array(arr: [u8; 8]); //~ ERROR: uses type `[u8; 8]` pub static static_u128_type: u128; //~ ERROR: uses type `u128` diff --git a/src/test/ui/lint/lint-ctypes.stderr b/src/test/ui/lint/lint-ctypes.stderr index a54226a7fc4..6a968fca922 100644 --- a/src/test/ui/lint/lint-ctypes.stderr +++ b/src/test/ui/lint/lint-ctypes.stderr @@ -49,7 +49,7 @@ LL | pub fn str_type(p: &str); = help: consider using `*const u8` and a length instead = note: string slices have no C equivalent -error: `extern` block uses type `std::boxed::Box`, which is not FFI-safe +error: `extern` block uses type `Box`, which is not FFI-safe --> $DIR/lint-ctypes.rs:51:24 | LL | pub fn box_type(p: Box); @@ -58,7 +58,7 @@ LL | pub fn box_type(p: Box); = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct = note: this struct has unspecified layout -error: `extern` block uses type `std::option::Option>`, which is not FFI-safe +error: `extern` block uses type `Option>`, which is not FFI-safe --> $DIR/lint-ctypes.rs:52:28 | LL | pub fn opt_box_type(p: Option>); @@ -145,7 +145,7 @@ note: the type is defined here LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: `extern` block uses type `std::marker::PhantomData`, which is not FFI-safe +error: `extern` block uses type `PhantomData`, which is not FFI-safe --> $DIR/lint-ctypes.rs:64:12 | LL | -> ::std::marker::PhantomData; @@ -171,7 +171,7 @@ LL | pub fn fn_type2(p: fn()); = help: consider using an `extern fn(...) -> ...` function pointer instead = note: this function pointer has Rust-specific calling convention -error: `extern` block uses type `std::boxed::Box`, which is not FFI-safe +error: `extern` block uses type `Box`, which is not FFI-safe --> $DIR/lint-ctypes.rs:67:28 | LL | pub fn fn_contained(p: RustBadRet); @@ -197,7 +197,7 @@ LL | pub fn transparent_str(p: TransparentStr); = help: consider using `*const u8` and a length instead = note: string slices have no C equivalent -error: `extern` block uses type `std::boxed::Box`, which is not FFI-safe +error: `extern` block uses type `Box`, which is not FFI-safe --> $DIR/lint-ctypes.rs:70:30 | LL | pub fn transparent_fn(p: TransparentBadFn); diff --git a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr index 5308bba440e..f50af38fe6b 100644 --- a/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr +++ b/src/test/ui/lint/lint-incoherent-auto-trait-objects.stderr @@ -1,36 +1,36 @@ -error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + 'static)`: (E0119) +error: conflicting implementations of trait `Foo` for type `(dyn Send + 'static)`: (E0119) --> $DIR/lint-incoherent-auto-trait-objects.rs:5:1 | LL | impl Foo for dyn Send {} | --------------------- first implementation here LL | LL | impl Foo for dyn Send + Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + 'static)` | = note: `#[deny(order_dependent_trait_objects)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #56484 -error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) +error: conflicting implementations of trait `Foo` for type `(dyn Send + Sync + 'static)`: (E0119) --> $DIR/lint-incoherent-auto-trait-objects.rs:11:1 | LL | impl Foo for dyn Send + Sync {} | ---------------------------- first implementation here LL | LL | impl Foo for dyn Sync + Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #56484 -error: conflicting implementations of trait `Foo` for type `(dyn std::marker::Send + std::marker::Sync + 'static)`: (E0119) +error: conflicting implementations of trait `Foo` for type `(dyn Send + Sync + 'static)`: (E0119) --> $DIR/lint-incoherent-auto-trait-objects.rs:15:1 | LL | impl Foo for dyn Sync + Send {} | ---------------------------- first implementation here ... LL | impl Foo for dyn Send + Sync + Send {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn std::marker::Send + std::marker::Sync + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(dyn Send + Sync + 'static)` | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #56484 diff --git a/src/test/ui/lint/lint-owned-heap-memory.stderr b/src/test/ui/lint/lint-owned-heap-memory.stderr index 2c6b47e494a..40310f93874 100644 --- a/src/test/ui/lint/lint-owned-heap-memory.stderr +++ b/src/test/ui/lint/lint-owned-heap-memory.stderr @@ -1,4 +1,4 @@ -error: type uses owned (Box type) pointers: std::boxed::Box +error: type uses owned (Box type) pointers: Box --> $DIR/lint-owned-heap-memory.rs:6:5 | LL | x: Box @@ -10,7 +10,7 @@ note: the lint level is defined here LL | #![forbid(box_pointers)] | ^^^^^^^^^^^^ -error: type uses owned (Box type) pointers: std::boxed::Box +error: type uses owned (Box type) pointers: Box --> $DIR/lint-owned-heap-memory.rs:10:29 | LL | let _x : Foo = Foo {x : box 10}; diff --git a/src/test/ui/lint/lint-uppercase-variables.rs b/src/test/ui/lint/lint-uppercase-variables.rs index a98b4f2fd44..b590fa697ad 100644 --- a/src/test/ui/lint/lint-uppercase-variables.rs +++ b/src/test/ui/lint/lint-uppercase-variables.rs @@ -21,18 +21,18 @@ fn main() { match foo::Foo::Foo { Foo => {} //~^ ERROR variable `Foo` should have a snake case name -//~^^ WARN `Foo` is named the same as one of the variants of the type `foo::Foo` +//~^^ WARN `Foo` is named the same as one of the variants of the type `Foo` //~^^^ WARN unused variable: `Foo` } let Foo = foo::Foo::Foo; //~^ ERROR variable `Foo` should have a snake case name - //~^^ WARN `Foo` is named the same as one of the variants of the type `foo::Foo` + //~^^ WARN `Foo` is named the same as one of the variants of the type `Foo` //~^^^ WARN unused variable: `Foo` fn in_param(Foo: foo::Foo) {} //~^ ERROR variable `Foo` should have a snake case name - //~^^ WARN `Foo` is named the same as one of the variants of the type `foo::Foo` + //~^^ WARN `Foo` is named the same as one of the variants of the type `Foo` //~^^^ WARN unused variable: `Foo` test(1); diff --git a/src/test/ui/lint/lint-uppercase-variables.stderr b/src/test/ui/lint/lint-uppercase-variables.stderr index d476d856e24..71b24a835bc 100644 --- a/src/test/ui/lint/lint-uppercase-variables.stderr +++ b/src/test/ui/lint/lint-uppercase-variables.stderr @@ -1,22 +1,22 @@ -warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo` +warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo` --> $DIR/lint-uppercase-variables.rs:22:9 | LL | Foo => {} - | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo` + | ^^^ help: to match on the variant, qualify the path: `Foo::Foo` | = note: `#[warn(bindings_with_variant_name)]` on by default -warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo` +warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo` --> $DIR/lint-uppercase-variables.rs:28:9 | LL | let Foo = foo::Foo::Foo; - | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo` + | ^^^ help: to match on the variant, qualify the path: `Foo::Foo` -warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo` +warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo` --> $DIR/lint-uppercase-variables.rs:33:17 | LL | fn in_param(Foo: foo::Foo) {} - | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo` + | ^^^ help: to match on the variant, qualify the path: `Foo::Foo` warning: unused variable: `Foo` --> $DIR/lint-uppercase-variables.rs:22:9 diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.rs b/src/test/ui/lint/opaque-ty-ffi-unsafe.rs index 3cbc084ecae..4ceb0c3da08 100644 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.rs +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.rs @@ -9,7 +9,7 @@ pub fn ret_closure() -> A { extern "C" { pub fn a(_: A); -//~^ ERROR `extern` block uses type `impl std::ops::Fn<()>`, which is not FFI-safe +//~^ ERROR `extern` block uses type `impl Fn<()>`, which is not FFI-safe } fn main() {} diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr b/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr index 06dfb7b8fbe..9d46f6d936e 100644 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr @@ -1,4 +1,4 @@ -error: `extern` block uses type `impl std::ops::Fn<()>`, which is not FFI-safe +error: `extern` block uses type `impl Fn<()>`, which is not FFI-safe --> $DIR/opaque-ty-ffi-unsafe.rs:11:17 | LL | pub fn a(_: A); diff --git a/src/test/ui/lint/uninitialized-zeroed.stderr b/src/test/ui/lint/uninitialized-zeroed.stderr index 3bf8a66ab0a..715c5d0704e 100644 --- a/src/test/ui/lint/uninitialized-zeroed.stderr +++ b/src/test/ui/lint/uninitialized-zeroed.stderr @@ -285,7 +285,7 @@ note: references must be non-null (in this struct field) LL | struct RefPair((&'static i32, i32)); | ^^^^^^^^^^^^^^^^^^^ -error: the type `std::ptr::NonNull` does not permit zero-initialization +error: the type `NonNull` does not permit zero-initialization --> $DIR/uninitialized-zeroed.rs:79:34 | LL | let _val: NonNull = mem::zeroed(); @@ -294,9 +294,9 @@ LL | let _val: NonNull = mem::zeroed(); | this code causes undefined behavior when executed | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done | - = note: `std::ptr::NonNull` must be non-null + = note: `NonNull` must be non-null -error: the type `std::ptr::NonNull` does not permit being left uninitialized +error: the type `NonNull` does not permit being left uninitialized --> $DIR/uninitialized-zeroed.rs:80:34 | LL | let _val: NonNull = mem::uninitialized(); @@ -305,9 +305,9 @@ LL | let _val: NonNull = mem::uninitialized(); | this code causes undefined behavior when executed | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done | - = note: `std::ptr::NonNull` must be non-null + = note: `NonNull` must be non-null -error: the type `*const dyn std::marker::Send` does not permit zero-initialization +error: the type `*const dyn Send` does not permit zero-initialization --> $DIR/uninitialized-zeroed.rs:82:37 | LL | let _val: *const dyn Send = mem::zeroed(); @@ -318,7 +318,7 @@ LL | let _val: *const dyn Send = mem::zeroed(); | = note: the vtable of a wide raw pointer must be non-null -error: the type `*const dyn std::marker::Send` does not permit being left uninitialized +error: the type `*const dyn Send` does not permit being left uninitialized --> $DIR/uninitialized-zeroed.rs:83:37 | LL | let _val: *const dyn Send = mem::uninitialized(); @@ -406,7 +406,7 @@ LL | let _val: &'static [i32] = mem::transmute((0usize, 0usize)); | = note: references must be non-null -error: the type `std::num::NonZeroU32` does not permit zero-initialization +error: the type `NonZeroU32` does not permit zero-initialization --> $DIR/uninitialized-zeroed.rs:101:32 | LL | let _val: NonZeroU32 = mem::transmute(0); @@ -415,9 +415,9 @@ LL | let _val: NonZeroU32 = mem::transmute(0); | this code causes undefined behavior when executed | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done | - = note: `std::num::NonZeroU32` must be non-null + = note: `NonZeroU32` must be non-null -error: the type `std::ptr::NonNull` does not permit zero-initialization +error: the type `NonNull` does not permit zero-initialization --> $DIR/uninitialized-zeroed.rs:104:34 | LL | let _val: NonNull = MaybeUninit::zeroed().assume_init(); @@ -426,9 +426,9 @@ LL | let _val: NonNull = MaybeUninit::zeroed().assume_init(); | this code causes undefined behavior when executed | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done | - = note: `std::ptr::NonNull` must be non-null + = note: `NonNull` must be non-null -error: the type `std::ptr::NonNull` does not permit being left uninitialized +error: the type `NonNull` does not permit being left uninitialized --> $DIR/uninitialized-zeroed.rs:105:34 | LL | let _val: NonNull = MaybeUninit::uninit().assume_init(); @@ -437,7 +437,7 @@ LL | let _val: NonNull = MaybeUninit::uninit().assume_init(); | this code causes undefined behavior when executed | help: use `MaybeUninit` instead, and only call `assume_init` after initialization is done | - = note: `std::ptr::NonNull` must be non-null + = note: `NonNull` must be non-null error: the type `bool` does not permit being left uninitialized --> $DIR/uninitialized-zeroed.rs:106:26 diff --git a/src/test/ui/liveness/liveness-move-call-arg.stderr b/src/test/ui/liveness/liveness-move-call-arg.stderr index ab4460a3268..5ea5c40f2ac 100644 --- a/src/test/ui/liveness/liveness-move-call-arg.stderr +++ b/src/test/ui/liveness/liveness-move-call-arg.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/liveness-move-call-arg.rs:9:14 | LL | let x: Box = box 25; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | loop { LL | take(x); | ^ value moved here, in previous iteration of loop diff --git a/src/test/ui/liveness/liveness-move-in-loop.stderr b/src/test/ui/liveness/liveness-move-in-loop.stderr index 150c1ec82b8..66b6373e450 100644 --- a/src/test/ui/liveness/liveness-move-in-loop.stderr +++ b/src/test/ui/liveness/liveness-move-in-loop.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `y` --> $DIR/liveness-move-in-loop.rs:11:25 | LL | let y: Box = box 42; - | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `y` has type `Box`, which does not implement the `Copy` trait ... LL | x = y; | ^ value moved here, in previous iteration of loop diff --git a/src/test/ui/liveness/liveness-move-in-while.stderr b/src/test/ui/liveness/liveness-move-in-while.stderr index 45c00e8d6d3..92e0f372521 100644 --- a/src/test/ui/liveness/liveness-move-in-while.stderr +++ b/src/test/ui/liveness/liveness-move-in-while.stderr @@ -22,7 +22,7 @@ error[E0382]: borrow of moved value: `y` --> $DIR/liveness-move-in-while.rs:7:24 | LL | let y: Box = box 42; - | - move occurs because `y` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `y` has type `Box`, which does not implement the `Copy` trait ... LL | println!("{}", y); | ^ value borrowed here after move diff --git a/src/test/ui/liveness/liveness-use-after-move.stderr b/src/test/ui/liveness/liveness-use-after-move.stderr index 383b89afaa7..3977a3f4136 100644 --- a/src/test/ui/liveness/liveness-use-after-move.stderr +++ b/src/test/ui/liveness/liveness-use-after-move.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/liveness-use-after-move.rs:6:20 | LL | let x: Box<_> = box 5; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | let y = x; | - value moved here LL | println!("{}", *x); diff --git a/src/test/ui/liveness/liveness-use-after-send.stderr b/src/test/ui/liveness/liveness-use-after-send.stderr index ccf9499f644..50ae98ca9be 100644 --- a/src/test/ui/liveness/liveness-use-after-send.stderr +++ b/src/test/ui/liveness/liveness-use-after-send.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `message` --> $DIR/liveness-use-after-send.rs:16:20 | LL | fn test00_start(ch: Chan>, message: Box, _count: Box) { - | ------- move occurs because `message` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ------- move occurs because `message` has type `Box`, which does not implement the `Copy` trait LL | send(ch, message); | ------- value moved here LL | println!("{}", message); diff --git a/src/test/ui/malformed/malformed-derive-entry.stderr b/src/test/ui/malformed/malformed-derive-entry.stderr index 587fc5a5aec..63be8f9ca14 100644 --- a/src/test/ui/malformed/malformed-derive-entry.stderr +++ b/src/test/ui/malformed/malformed-derive-entry.stderr @@ -16,29 +16,29 @@ error: malformed `derive` attribute input LL | #[derive] | ^^^^^^^^^ help: missing traits to be derived: `#[derive(Trait1, Trait2, ...)]` -error[E0277]: the trait bound `Test1: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Test1: Clone` is not satisfied --> $DIR/malformed-derive-entry.rs:1:10 | LL | #[derive(Copy(Bad))] - | ^^^^ the trait `std::clone::Clone` is not implemented for `Test1` + | ^^^^ the trait `Clone` is not implemented for `Test1` | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub trait Copy: Clone { - | ----- required by this bound in `std::marker::Copy` + | ----- required by this bound in `Copy` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Test2: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Test2: Clone` is not satisfied --> $DIR/malformed-derive-entry.rs:6:10 | LL | #[derive(Copy="bad")] - | ^^^^ the trait `std::clone::Clone` is not implemented for `Test2` + | ^^^^ the trait `Clone` is not implemented for `Test2` | ::: $SRC_DIR/core/src/marker.rs:LL:COL | LL | pub trait Copy: Clone { - | ----- required by this bound in `std::marker::Copy` + | ----- required by this bound in `Copy` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/map-types.rs b/src/test/ui/map-types.rs index c355a0e420f..89b57087507 100644 --- a/src/test/ui/map-types.rs +++ b/src/test/ui/map-types.rs @@ -15,5 +15,5 @@ fn main() { let x: Box> = box HashMap::new(); let x: Box> = x; let y: Box> = Box::new(x); - //~^ ERROR `std::boxed::Box>: Map` is not satisfied + //~^ ERROR `Box>: Map` is not satisfied } diff --git a/src/test/ui/map-types.stderr b/src/test/ui/map-types.stderr index 21dac1ab1ed..71006e1f4e2 100644 --- a/src/test/ui/map-types.stderr +++ b/src/test/ui/map-types.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `std::boxed::Box>: Map` is not satisfied +error[E0277]: the trait bound `Box>: Map` is not satisfied --> $DIR/map-types.rs:17:41 | LL | let y: Box> = Box::new(x); - | ^^^^^^^^^^^ the trait `Map` is not implemented for `std::boxed::Box>` + | ^^^^^^^^^^^ the trait `Map` is not implemented for `Box>` | = note: required for the cast to the object type `dyn Map` diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr index f3f3c476809..33e8282c9d2 100644 --- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr +++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr @@ -1,10 +1,10 @@ -error[E0282]: type annotations needed for `std::vec::Vec` +error[E0282]: type annotations needed for `Vec` --> $DIR/method-ambig-one-trait-unknown-int-type.rs:24:17 | LL | let mut x = Vec::new(); | ----- ^^^^^^^^ cannot infer type for type parameter `T` | | - | consider giving `x` the explicit type `std::vec::Vec`, where the type parameter `T` is specified + | consider giving `x` the explicit type `Vec`, where the type parameter `T` is specified error[E0308]: mismatched types --> $DIR/method-ambig-one-trait-unknown-int-type.rs:33:20 diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr index 1b354fc697a..42802ba1d0f 100644 --- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr +++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr @@ -9,15 +9,15 @@ note: candidate #1 is defined in an impl of the trait `Me2` for the type `usize` | LL | impl Me2 for usize { fn me(&self) -> usize { *self } } | ^^^^^^^^^^^^^^^^^^^^^ - = note: candidate #2 is defined in an impl of the trait `ambig_impl_2_lib::Me` for the type `usize` + = note: candidate #2 is defined in an impl of the trait `Me` for the type `usize` help: disambiguate the associated function for candidate #1 | LL | fn main() { Me2::me(&1_usize); } | ^^^^^^^^^^^^^^^^^ help: disambiguate the associated function for candidate #2 | -LL | fn main() { ambig_impl_2_lib::Me::me(&1_usize); } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn main() { Me::me(&1_usize); } + | ^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr index 4678642dd6d..b0d1bb9823b 100644 --- a/src/test/ui/methods/method-call-err-msg.stderr +++ b/src/test/ui/methods/method-call-err-msg.stderr @@ -38,17 +38,17 @@ LL | pub struct Foo; | --------------- | | | method `take` not found for this - | doesn't satisfy `Foo: std::iter::Iterator` + | doesn't satisfy `Foo: Iterator` ... LL | .take() | ^^^^ method not found in `Foo` | = note: the method `take` exists but the following trait bounds were not satisfied: - `Foo: std::iter::Iterator` - which is required by `&mut Foo: std::iter::Iterator` + `Foo: Iterator` + which is required by `&mut Foo: Iterator` = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `take`, perhaps you need to implement it: - candidate #1: `std::iter::Iterator` + candidate #1: `Iterator` error[E0061]: this function takes 3 arguments but 0 arguments were supplied --> $DIR/method-call-err-msg.rs:21:7 diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr index 1bc7f30d04d..08be7ee155e 100644 --- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr +++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr @@ -20,12 +20,12 @@ error[E0034]: multiple applicable items in scope LL | let z = x.foo(); | ^^^ multiple `foo` found | -note: candidate #1 is defined in an impl of the trait `internal::X` for the type `T` +note: candidate #1 is defined in an impl of the trait `X` for the type `T` --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:43:9 | LL | fn foo(self: Smaht) -> u64 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: candidate #2 is defined in an impl of the trait `nuisance_foo::NuisanceFoo` for the type `T` +note: candidate #2 is defined in an impl of the trait `NuisanceFoo` for the type `T` --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:70:9 | LL | fn foo(self) {} @@ -37,12 +37,12 @@ LL | fn foo(&self) -> u8; | ^^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function for candidate #1 | -LL | let z = internal::X::foo(x); - | ^^^^^^^^^^^^^^^^^^^ +LL | let z = X::foo(x); + | ^^^^^^^^^ help: disambiguate the associated function for candidate #2 | -LL | let z = nuisance_foo::NuisanceFoo::foo(x); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | let z = NuisanceFoo::foo(x); + | ^^^^^^^^^^^^^^^^^^^ help: disambiguate the associated function for candidate #3 | LL | let z = FinalFoo::foo(x); diff --git a/src/test/ui/methods/method-missing-call.stderr b/src/test/ui/methods/method-missing-call.stderr index bc8a1c85e56..241c50d7ced 100644 --- a/src/test/ui/methods/method-missing-call.stderr +++ b/src/test/ui/methods/method-missing-call.stderr @@ -9,7 +9,7 @@ help: use parentheses to call the method LL | .get_x(); | ^^ -error[E0615]: attempted to take value of method `filter_map` on type `std::iter::Filter, [closure@$DIR/method-missing-call.rs:27:20: 27:25]>, [closure@$DIR/method-missing-call.rs:28:23: 28:35]>` +error[E0615]: attempted to take value of method `filter_map` on type `Filter, [closure@$DIR/method-missing-call.rs:27:20: 27:25]>, [closure@$DIR/method-missing-call.rs:28:23: 28:35]>` --> $DIR/method-missing-call.rs:29:16 | LL | .filter_map; diff --git a/src/test/ui/minus-string.rs b/src/test/ui/minus-string.rs index 946c587ce43..018f0ef9ac5 100644 --- a/src/test/ui/minus-string.rs +++ b/src/test/ui/minus-string.rs @@ -1,3 +1,3 @@ -// error-pattern:cannot apply unary operator `-` to type `std::string::String` +// error-pattern:cannot apply unary operator `-` to type `String` fn main() { -"foo".to_string(); } diff --git a/src/test/ui/minus-string.stderr b/src/test/ui/minus-string.stderr index 3fbec7c89c9..b429ad3046e 100644 --- a/src/test/ui/minus-string.stderr +++ b/src/test/ui/minus-string.stderr @@ -1,4 +1,4 @@ -error[E0600]: cannot apply unary operator `-` to type `std::string::String` +error[E0600]: cannot apply unary operator `-` to type `String` --> $DIR/minus-string.rs:3:13 | LL | fn main() { -"foo".to_string(); } diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr index c73130643db..b7564686cd5 100644 --- a/src/test/ui/mismatched_types/abridged.stderr +++ b/src/test/ui/mismatched_types/abridged.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | fn a() -> Foo { | --- expected `Foo` because of return type LL | Some(Foo { bar: 1 }) - | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option` + | ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `Option` | = note: expected struct `Foo` - found enum `std::option::Option` + found enum `Option` error[E0308]: mismatched types --> $DIR/abridged.rs:20:5 @@ -24,14 +24,14 @@ error[E0308]: mismatched types --> $DIR/abridged.rs:24:5 | LL | fn b() -> Option { - | ----------- expected `std::option::Option` because of return type + | ----------- expected `Option` because of return type LL | Foo { bar: 1 } | ^^^^^^^^^^^^^^ | | - | expected enum `std::option::Option`, found struct `Foo` + | expected enum `Option`, found struct `Foo` | help: try using a variant of the expected enum: `Some(Foo { bar: 1 })` | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found struct `Foo` error[E0308]: mismatched types @@ -52,46 +52,46 @@ error[E0308]: mismatched types --> $DIR/abridged.rs:39:5 | LL | fn d() -> X, String> { - | ---------------------------- expected `X, std::string::String>` because of return type + | ---------------------------- expected `X, String>` because of return type ... LL | x - | ^ expected struct `std::string::String`, found integer + | ^ expected struct `String`, found integer | - = note: expected struct `X, std::string::String>` + = note: expected struct `X, String>` found struct `X, {integer}>` error[E0308]: mismatched types --> $DIR/abridged.rs:50:5 | LL | fn e() -> X, String> { - | ---------------------------- expected `X, std::string::String>` because of return type + | ---------------------------- expected `X, String>` because of return type ... LL | x - | ^ expected struct `std::string::String`, found integer + | ^ expected struct `String`, found integer | - = note: expected struct `X, _>` + = note: expected struct `X, _>` found struct `X, _>` error[E0308]: mismatched types --> $DIR/abridged.rs:54:5 | LL | fn f() -> String { - | ------ expected `std::string::String` because of return type + | ------ expected `String` because of return type LL | 1+2 | ^^^ | | - | expected struct `std::string::String`, found integer + | expected struct `String`, found integer | help: try using a conversion method: `(1+2).to_string()` error[E0308]: mismatched types --> $DIR/abridged.rs:59:5 | LL | fn g() -> String { - | ------ expected `std::string::String` because of return type + | ------ expected `String` because of return type LL | -2 | ^^ | | - | expected struct `std::string::String`, found integer + | expected struct `String`, found integer | help: try using a conversion method: `(-2).to_string()` error: aborting due to 8 previous errors diff --git a/src/test/ui/mismatched_types/binops.rs b/src/test/ui/mismatched_types/binops.rs index 621599ddb8f..12d4826649d 100644 --- a/src/test/ui/mismatched_types/binops.rs +++ b/src/test/ui/mismatched_types/binops.rs @@ -1,8 +1,8 @@ fn main() { - 1 + Some(1); //~ ERROR cannot add `std::option::Option<{integer}>` to `{integer}` - 2 as usize - Some(1); //~ ERROR cannot subtract `std::option::Option<{integer}>` from `usize` + 1 + Some(1); //~ ERROR cannot add `Option<{integer}>` to `{integer}` + 2 as usize - Some(1); //~ ERROR cannot subtract `Option<{integer}>` from `usize` 3 * (); //~ ERROR cannot multiply `()` to `{integer}` 4 / ""; //~ ERROR cannot divide `{integer}` by `&str` - 5 < String::new(); //~ ERROR can't compare `{integer}` with `std::string::String` + 5 < String::new(); //~ ERROR can't compare `{integer}` with `String` 6 == Ok(1); //~ ERROR can't compare `{integer}` with `std::result::Result<{integer}, _>` } diff --git a/src/test/ui/mismatched_types/binops.stderr b/src/test/ui/mismatched_types/binops.stderr index 9dda44a8568..227c7887fb0 100644 --- a/src/test/ui/mismatched_types/binops.stderr +++ b/src/test/ui/mismatched_types/binops.stderr @@ -1,18 +1,18 @@ -error[E0277]: cannot add `std::option::Option<{integer}>` to `{integer}` +error[E0277]: cannot add `Option<{integer}>` to `{integer}` --> $DIR/binops.rs:2:7 | LL | 1 + Some(1); - | ^ no implementation for `{integer} + std::option::Option<{integer}>` + | ^ no implementation for `{integer} + Option<{integer}>` | - = help: the trait `std::ops::Add>` is not implemented for `{integer}` + = help: the trait `Add>` is not implemented for `{integer}` -error[E0277]: cannot subtract `std::option::Option<{integer}>` from `usize` +error[E0277]: cannot subtract `Option<{integer}>` from `usize` --> $DIR/binops.rs:3:16 | LL | 2 as usize - Some(1); - | ^ no implementation for `usize - std::option::Option<{integer}>` + | ^ no implementation for `usize - Option<{integer}>` | - = help: the trait `std::ops::Sub>` is not implemented for `usize` + = help: the trait `Sub>` is not implemented for `usize` error[E0277]: cannot multiply `()` to `{integer}` --> $DIR/binops.rs:4:7 @@ -20,7 +20,7 @@ error[E0277]: cannot multiply `()` to `{integer}` LL | 3 * (); | ^ no implementation for `{integer} * ()` | - = help: the trait `std::ops::Mul<()>` is not implemented for `{integer}` + = help: the trait `Mul<()>` is not implemented for `{integer}` error[E0277]: cannot divide `{integer}` by `&str` --> $DIR/binops.rs:5:7 @@ -28,15 +28,15 @@ error[E0277]: cannot divide `{integer}` by `&str` LL | 4 / ""; | ^ no implementation for `{integer} / &str` | - = help: the trait `std::ops::Div<&str>` is not implemented for `{integer}` + = help: the trait `Div<&str>` is not implemented for `{integer}` -error[E0277]: can't compare `{integer}` with `std::string::String` +error[E0277]: can't compare `{integer}` with `String` --> $DIR/binops.rs:6:7 | LL | 5 < String::new(); - | ^ no implementation for `{integer} < std::string::String` and `{integer} > std::string::String` + | ^ no implementation for `{integer} < String` and `{integer} > String` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `{integer}` + = help: the trait `PartialOrd` is not implemented for `{integer}` error[E0277]: can't compare `{integer}` with `std::result::Result<{integer}, _>` --> $DIR/binops.rs:7:7 @@ -44,7 +44,7 @@ error[E0277]: can't compare `{integer}` with `std::result::Result<{integer}, _>` LL | 6 == Ok(1); | ^^ no implementation for `{integer} == std::result::Result<{integer}, _>` | - = help: the trait `std::cmp::PartialEq>` is not implemented for `{integer}` + = help: the trait `PartialEq>` is not implemented for `{integer}` error: aborting due to 6 previous errors diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index 71abda52065..388c978d038 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -44,7 +44,7 @@ error[E0605]: non-primitive cast: `*const u8` as `(u32,)` LL | let _ = v as (u32,); | ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object -error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u8` +error[E0605]: non-primitive cast: `Option<&*const u8>` as `*const u8` --> $DIR/cast-rfc0401.rs:33:13 | LL | let _ = Some(&v) as *const u8; @@ -208,7 +208,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | let _ = fat_v as *const dyn Foo; | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: required for the cast to the object type `dyn Foo` error[E0277]: the size for values of type `str` cannot be known at compilation time @@ -217,7 +217,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | let _ = a as *const dyn Foo; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: required for the cast to the object type `dyn Foo` error[E0606]: casting `&{float}` as `f32` is invalid 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 664fa4bcaf3..0af44d21196 100644 --- a/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-arg-type-mismatch.stderr @@ -28,8 +28,8 @@ error[E0308]: mismatched types LL | baz(f); | ^^^ one type is more general than the other | - = note: expected type `for<'r> std::ops::Fn<(*mut &'r u32,)>` - found type `std::ops::Fn<(*mut &'a u32,)>` + = note: expected type `for<'r> Fn<(*mut &'r u32,)>` + found type `Fn<(*mut &'a u32,)>` error[E0308]: mismatched types --> $DIR/closure-arg-type-mismatch.rs:10:5 @@ -37,8 +37,8 @@ error[E0308]: mismatched types LL | baz(f); | ^^^ one type is more general than the other | - = note: expected type `std::ops::FnOnce<(*mut &u32,)>` - found type `std::ops::FnOnce<(*mut &'a u32,)>` + = note: expected type `FnOnce<(*mut &u32,)>` + found type `FnOnce<(*mut &'a u32,)>` error[E0308]: mismatched types --> $DIR/closure-arg-type-mismatch.rs:10:5 @@ -46,8 +46,8 @@ error[E0308]: mismatched types LL | baz(f); | ^^^ one type is more general than the other | - = note: expected type `for<'r> std::ops::Fn<(*mut &'r u32,)>` - found type `std::ops::Fn<(*mut &'a u32,)>` + = note: expected type `for<'r> Fn<(*mut &'r u32,)>` + found type `Fn<(*mut &'a u32,)>` error[E0308]: mismatched types --> $DIR/closure-arg-type-mismatch.rs:10:5 @@ -55,8 +55,8 @@ error[E0308]: mismatched types LL | baz(f); | ^^^ one type is more general than the other | - = note: expected type `std::ops::FnOnce<(*mut &u32,)>` - found type `std::ops::FnOnce<(*mut &'a u32,)>` + = note: expected type `FnOnce<(*mut &u32,)>` + found type `FnOnce<(*mut &'a u32,)>` error: aborting due to 7 previous errors diff --git a/src/test/ui/mismatched_types/closure-mismatch.stderr b/src/test/ui/mismatched_types/closure-mismatch.stderr index d6c17d125cf..149f505dc6f 100644 --- a/src/test/ui/mismatched_types/closure-mismatch.stderr +++ b/src/test/ui/mismatched_types/closure-mismatch.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | baz(|_| ()); | ^^^ one type is more general than the other | - = note: expected type `for<'r> std::ops::Fn<(&'r (),)>` - found type `std::ops::Fn<(&(),)>` + = note: expected type `for<'r> Fn<(&'r (),)>` + found type `Fn<(&(),)>` error: aborting due to previous error diff --git a/src/test/ui/mismatched_types/issue-36053-2.stderr b/src/test/ui/mismatched_types/issue-36053-2.stderr index 213b61bc6ff..63c04bcd7ba 100644 --- a/src/test/ui/mismatched_types/issue-36053-2.stderr +++ b/src/test/ui/mismatched_types/issue-36053-2.stderr @@ -1,24 +1,24 @@ -error[E0599]: no method named `count` found for struct `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` in the current scope +error[E0599]: no method named `count` found for struct `Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` in the current scope --> $DIR/issue-36053-2.rs:7:55 | LL | once::<&str>("str").fuse().filter(|a: &str| true).count(); - | -------------- ^^^^^ method not found in `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` + | -------------- ^^^^^ method not found in `Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>` | | - | doesn't satisfy `<_ as std::ops::FnOnce<(&&str,)>>::Output = bool` - | doesn't satisfy `_: std::ops::FnMut<(&&str,)>` + | doesn't satisfy `<_ as FnOnce<(&&str,)>>::Output = bool` + | doesn't satisfy `_: FnMut<(&&str,)>` | ::: $SRC_DIR/core/src/iter/adapters/mod.rs:LL:COL | LL | pub struct Filter { - | ----------------------- doesn't satisfy `_: std::iter::Iterator` + | ----------------------- doesn't satisfy `_: Iterator` | = note: the method `count` exists but the following trait bounds were not satisfied: - `<[closure@$DIR/issue-36053-2.rs:7:39: 7:53] as std::ops::FnOnce<(&&str,)>>::Output = bool` - which is required by `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator` - `[closure@$DIR/issue-36053-2.rs:7:39: 7:53]: std::ops::FnMut<(&&str,)>` - which is required by `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator` - `std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator` - which is required by `&mut std::iter::Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: std::iter::Iterator` + `<[closure@$DIR/issue-36053-2.rs:7:39: 7:53] as FnOnce<(&&str,)>>::Output = bool` + which is required by `Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` + `[closure@$DIR/issue-36053-2.rs:7:39: 7:53]: FnMut<(&&str,)>` + which is required by `Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` + `Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` + which is required by `&mut Filter>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>: Iterator` error[E0631]: type mismatch in closure arguments --> $DIR/issue-36053-2.rs:7:32 diff --git a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr b/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr index d260addef48..5df35fa571c 100644 --- a/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr +++ b/src/test/ui/mismatched_types/issue-74918-missing-lifetime.stderr @@ -13,15 +13,15 @@ error: `impl` item signature doesn't match `trait` item signature --> $DIR/issue-74918-missing-lifetime.rs:11:5 | LL | fn next(&mut self) -> Option> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&mut ChunkingIterator) -> std::option::Option>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&mut ChunkingIterator) -> Option>` | ::: $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL | LL | fn next(&mut self) -> Option; - | ----------------------------------------- expected `fn(&mut ChunkingIterator) -> std::option::Option>` + | ----------------------------------------- expected `fn(&mut ChunkingIterator) -> Option>` | - = note: expected `fn(&mut ChunkingIterator) -> std::option::Option>` - found `fn(&mut ChunkingIterator) -> std::option::Option>` + = note: expected `fn(&mut ChunkingIterator) -> Option>` + found `fn(&mut ChunkingIterator) -> Option>` = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output diff --git a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr b/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr index 5be7f5271de..4b86a1fede1 100644 --- a/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr +++ b/src/test/ui/mismatched_types/issue-75361-mismatched-impl.stderr @@ -2,13 +2,13 @@ error: `impl` item signature doesn't match `trait` item signature --> $DIR/issue-75361-mismatched-impl.rs:18:3 | LL | fn adjacent_edges(&self) -> Box>; - | --------------------------------------------------------------------- expected `fn(&T) -> std::boxed::Box<(dyn MyTrait + 'static)>` + | --------------------------------------------------------------------- expected `fn(&T) -> Box<(dyn MyTrait + 'static)>` ... LL | fn adjacent_edges(&self) -> Box + '_> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&T) -> std::boxed::Box>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&T) -> Box>` | - = note: expected `fn(&T) -> std::boxed::Box<(dyn MyTrait + 'static)>` - found `fn(&T) -> std::boxed::Box>` + = note: expected `fn(&T) -> Box<(dyn MyTrait + 'static)>` + found `fn(&T) -> Box>` help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` --> $DIR/issue-75361-mismatched-impl.rs:12:55 | 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 5ab191b9270..67f79a8147b 100644 --- a/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr +++ b/src/test/ui/mismatched_types/method-help-unsatisfied-bound.stderr @@ -2,13 +2,13 @@ error[E0599]: no method named `unwrap` found for enum `std::result::Result<(), F --> $DIR/method-help-unsatisfied-bound.rs:5:7 | LL | struct Foo; - | ----------- doesn't satisfy `Foo: std::fmt::Debug` + | ----------- doesn't satisfy `Foo: Debug` ... LL | a.unwrap(); | ^^^^^^ method not found in `std::result::Result<(), Foo>` | = note: the method `unwrap` exists but the following trait bounds were not satisfied: - `Foo: std::fmt::Debug` + `Foo: Debug` error: aborting due to previous error 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 d9dd186624f..485fae6d4d9 100644 --- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr +++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/trait-bounds-cant-coerce.rs:13:7 | LL | a(x); - | ^ expected trait `Foo + std::marker::Send`, found trait `Foo` + | ^ expected trait `Foo + Send`, found trait `Foo` | - = note: expected struct `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` - found struct `std::boxed::Box<(dyn Foo + 'static)>` + = note: expected struct `Box<(dyn Foo + Send + 'static)>` + found struct `Box<(dyn Foo + 'static)>` error: aborting due to previous error diff --git a/src/test/ui/missing/missing-items/m2.stderr b/src/test/ui/missing/missing-items/m2.stderr index 64e9530e613..d18fb443aa4 100644 --- a/src/test/ui/missing/missing-items/m2.stderr +++ b/src/test/ui/missing/missing-items/m2.stderr @@ -6,11 +6,11 @@ LL | impl m1::X for X { | = help: implement the missing item: `const CONSTANT: u32 = 42;` = help: implement the missing item: `type Type = Type;` - = help: implement the missing item: `fn method(&self, _: std::string::String) -> ::Type { todo!() }` - = help: implement the missing item: `fn method2(self: std::boxed::Box, _: std::string::String) -> ::Type { todo!() }` - = help: implement the missing item: `fn method3(_: &Self, _: std::string::String) -> ::Type { todo!() }` + = help: implement the missing item: `fn method(&self, _: String) -> ::Type { todo!() }` + = help: implement the missing item: `fn method2(self: Box, _: String) -> ::Type { todo!() }` + = help: implement the missing item: `fn method3(_: &Self, _: String) -> ::Type { todo!() }` = help: implement the missing item: `fn method4(&self, _: &Self) -> ::Type { todo!() }` - = help: implement the missing item: `fn method5(self: &std::boxed::Box) -> ::Type { todo!() }` + = help: implement the missing item: `fn method5(self: &Box) -> ::Type { todo!() }` error: aborting due to previous error diff --git a/src/test/ui/missing_debug_impls.rs b/src/test/ui/missing_debug_impls.rs index 72fcba51588..dc4dacfc468 100644 --- a/src/test/ui/missing_debug_impls.rs +++ b/src/test/ui/missing_debug_impls.rs @@ -4,7 +4,7 @@ use std::fmt; -pub enum A {} //~ ERROR type does not implement `std::fmt::Debug` +pub enum A {} //~ ERROR type does not implement `Debug` #[derive(Debug)] pub enum B {} @@ -17,7 +17,7 @@ impl fmt::Debug for C { } } -pub struct Foo; //~ ERROR type does not implement `std::fmt::Debug` +pub struct Foo; //~ ERROR type does not implement `Debug` #[derive(Debug)] pub struct Bar; diff --git a/src/test/ui/missing_debug_impls.stderr b/src/test/ui/missing_debug_impls.stderr index 51c65589b0c..0538f207b44 100644 --- a/src/test/ui/missing_debug_impls.stderr +++ b/src/test/ui/missing_debug_impls.stderr @@ -1,4 +1,4 @@ -error: type does not implement `std::fmt::Debug`; consider adding `#[derive(Debug)]` or a manual implementation +error: type does not implement `Debug`; consider adding `#[derive(Debug)]` or a manual implementation --> $DIR/missing_debug_impls.rs:7:1 | LL | pub enum A {} @@ -10,7 +10,7 @@ note: the lint level is defined here LL | #![deny(missing_debug_implementations)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: type does not implement `std::fmt::Debug`; consider adding `#[derive(Debug)]` or a manual implementation +error: type does not implement `Debug`; consider adding `#[derive(Debug)]` or a manual implementation --> $DIR/missing_debug_impls.rs:20:1 | LL | pub struct Foo; diff --git a/src/test/ui/moves/issue-46099-move-in-macro.stderr b/src/test/ui/moves/issue-46099-move-in-macro.stderr index 83c99db8709..db4c3979e3a 100644 --- a/src/test/ui/moves/issue-46099-move-in-macro.stderr +++ b/src/test/ui/moves/issue-46099-move-in-macro.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `b` --> $DIR/issue-46099-move-in-macro.rs:14:12 | LL | let b = Box::new(true); - | - move occurs because `b` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `b` has type `Box`, which does not implement the `Copy` trait LL | test!({b}); | ^ | | diff --git a/src/test/ui/moves/move-fn-self-receiver.stderr b/src/test/ui/moves/move-fn-self-receiver.stderr index 671d07a281d..dd263c1e906 100644 --- a/src/test/ui/moves/move-fn-self-receiver.stderr +++ b/src/test/ui/moves/move-fn-self-receiver.stderr @@ -11,7 +11,7 @@ note: this function consumes the receiver `self` by taking ownership of it, whic | LL | fn into_iter(self) -> Self::IntoIter; | ^^^^ - = note: move occurs because `val.0` has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because `val.0` has type `Vec`, which does not implement the `Copy` trait error[E0382]: use of moved value: `foo` --> $DIR/move-fn-self-receiver.rs:34:5 @@ -43,7 +43,7 @@ error[E0382]: use of moved value: `boxed_foo` --> $DIR/move-fn-self-receiver.rs:42:5 | LL | let boxed_foo = Box::new(Foo); - | --------- move occurs because `boxed_foo` has type `std::boxed::Box`, which does not implement the `Copy` trait + | --------- move occurs because `boxed_foo` has type `Box`, which does not implement the `Copy` trait LL | boxed_foo.use_box_self(); | -------------- `boxed_foo` moved due to this method call LL | boxed_foo; @@ -59,7 +59,7 @@ error[E0382]: use of moved value: `pin_box_foo` --> $DIR/move-fn-self-receiver.rs:46:5 | LL | let pin_box_foo = Box::pin(Foo); - | ----------- move occurs because `pin_box_foo` has type `std::pin::Pin>`, which does not implement the `Copy` trait + | ----------- move occurs because `pin_box_foo` has type `Pin>`, which does not implement the `Copy` trait LL | pin_box_foo.use_pin_box_self(); | ------------------ `pin_box_foo` moved due to this method call LL | pin_box_foo; @@ -85,7 +85,7 @@ error[E0382]: use of moved value: `rc_foo` --> $DIR/move-fn-self-receiver.rs:55:5 | LL | let rc_foo = Rc::new(Foo); - | ------ move occurs because `rc_foo` has type `std::rc::Rc`, which does not implement the `Copy` trait + | ------ move occurs because `rc_foo` has type `Rc`, which does not implement the `Copy` trait LL | rc_foo.use_rc_self(); | ------------- `rc_foo` moved due to this method call LL | rc_foo; @@ -117,7 +117,7 @@ error[E0382]: use of moved value: `implicit_into_iter` --> $DIR/move-fn-self-receiver.rs:63:5 | LL | let implicit_into_iter = vec![true]; - | ------------------ move occurs because `implicit_into_iter` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ------------------ move occurs because `implicit_into_iter` has type `Vec`, which does not implement the `Copy` trait LL | for _val in implicit_into_iter {} | ------------------ | | @@ -130,7 +130,7 @@ error[E0382]: use of moved value: `explicit_into_iter` --> $DIR/move-fn-self-receiver.rs:67:5 | LL | let explicit_into_iter = vec![true]; - | ------------------ move occurs because `explicit_into_iter` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ------------------ move occurs because `explicit_into_iter` has type `Vec`, which does not implement the `Copy` trait LL | for _val in explicit_into_iter.into_iter() {} | ----------- `explicit_into_iter` moved due to this method call LL | explicit_into_iter; diff --git a/src/test/ui/moves/move-guard-same-consts.stderr b/src/test/ui/moves/move-guard-same-consts.stderr index 0945fbe68a0..5fc8a549932 100644 --- a/src/test/ui/moves/move-guard-same-consts.stderr +++ b/src/test/ui/moves/move-guard-same-consts.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/move-guard-same-consts.rs:20:24 | LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait ... LL | (1, 2) if take(x) => (), | - value moved here diff --git a/src/test/ui/moves/move-in-guard-1.stderr b/src/test/ui/moves/move-in-guard-1.stderr index 542fd169863..d894209f517 100644 --- a/src/test/ui/moves/move-in-guard-1.stderr +++ b/src/test/ui/moves/move-in-guard-1.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/move-in-guard-1.rs:10:24 | LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait ... LL | (1, _) if take(x) => (), | - value moved here diff --git a/src/test/ui/moves/move-in-guard-2.stderr b/src/test/ui/moves/move-in-guard-2.stderr index 00d89f55071..a067d433893 100644 --- a/src/test/ui/moves/move-in-guard-2.stderr +++ b/src/test/ui/moves/move-in-guard-2.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/move-in-guard-2.rs:10:24 | LL | let x: Box<_> = box 1; - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait ... LL | (_, 2) if take(x) => (), | ^ diff --git a/src/test/ui/moves/move-out-of-tuple-field.stderr b/src/test/ui/moves/move-out-of-tuple-field.stderr index 888ef3352e2..bb4eb76772a 100644 --- a/src/test/ui/moves/move-out-of-tuple-field.stderr +++ b/src/test/ui/moves/move-out-of-tuple-field.stderr @@ -6,7 +6,7 @@ LL | let y = x.0; LL | let z = x.0; | ^^^ value used here after move | - = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.0` has type `Box`, which does not implement the `Copy` trait error[E0382]: use of moved value: `x.0` --> $DIR/move-out-of-tuple-field.rs:12:13 @@ -16,7 +16,7 @@ LL | let y = x.0; LL | let z = x.0; | ^^^ value used here after move | - = note: move occurs because `x.0` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `x.0` has type `Box`, which does not implement the `Copy` trait error: aborting due to 2 previous errors diff --git a/src/test/ui/moves/moves-based-on-type-access-to-field.stderr b/src/test/ui/moves/moves-based-on-type-access-to-field.stderr index aa0e9c7f681..11e94569580 100644 --- a/src/test/ui/moves/moves-based-on-type-access-to-field.stderr +++ b/src/test/ui/moves/moves-based-on-type-access-to-field.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-access-to-field.rs:11:12 | LL | let x = vec!["hi".to_string()]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Vec`, which does not implement the `Copy` trait LL | consume(x.into_iter().next().unwrap()); | ----------- `x` moved due to this method call LL | touch(&x[0]); diff --git a/src/test/ui/moves/moves-based-on-type-block-bad.stderr b/src/test/ui/moves/moves-based-on-type-block-bad.stderr index 12b87c54b9c..a9ac9d63a95 100644 --- a/src/test/ui/moves/moves-based-on-type-block-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-block-bad.stderr @@ -8,7 +8,7 @@ LL | box E::Bar(x) => println!("{}", x.to_string()), | - | | | data moved here - | move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because `x` has type `Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr index 3a05a1305be..acb0932f6d6 100644 --- a/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr +++ b/src/test/ui/moves/moves-based-on-type-capture-clause-bad.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-capture-clause-bad.rs:8:20 | LL | let x = "Hello world!".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | thread::spawn(move|| { | ------ value moved into closure here LL | println!("{}", x); diff --git a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr index 49964e2a947..f7e17815b67 100644 --- a/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr +++ b/src/test/ui/moves/moves-based-on-type-cyclic-types-issue-4821.stderr @@ -7,7 +7,7 @@ LL | Some(right) => consume(right), LL | consume(node) + r | ^^^^ value used here after partial move | - = note: partial move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: partial move occurs because value has type `Box`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving `node.next.0` | LL | Some(ref right) => consume(right), diff --git a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs index 0b44ca56ced..d256e18b6ca 100644 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs +++ b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.rs @@ -6,7 +6,7 @@ fn touch(_a: &A) {} fn f00() { let x = "hi".to_string(); - //~^ NOTE move occurs because `x` has type `std::string::String` + //~^ NOTE move occurs because `x` has type `String` let _y = Foo { f:x }; //~^ NOTE value moved here touch(&x); //~ ERROR borrow of moved value: `x` @@ -15,7 +15,7 @@ fn f00() { fn f05() { let x = "hi".to_string(); - //~^ NOTE move occurs because `x` has type `std::string::String` + //~^ NOTE move occurs because `x` has type `String` let _y = Foo { f:(((x))) }; //~^ NOTE value moved here touch(&x); //~ ERROR borrow of moved value: `x` diff --git a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr index d7a7ceabf85..ee7971691a4 100644 --- a/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr +++ b/src/test/ui/moves/moves-based-on-type-distribute-copy-over-paren.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:12:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | LL | let _y = Foo { f:x }; | - value moved here @@ -14,7 +14,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:21:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | LL | let _y = Foo { f:(((x))) }; | ------- value moved here diff --git a/src/test/ui/moves/moves-based-on-type-exprs.stderr b/src/test/ui/moves/moves-based-on-type-exprs.stderr index 95a591b225f..46940cf4936 100644 --- a/src/test/ui/moves/moves-based-on-type-exprs.stderr +++ b/src/test/ui/moves/moves-based-on-type-exprs.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:12:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let _y = Foo { f:x }; | - value moved here LL | touch(&x); @@ -12,7 +12,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:18:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let _y = (x, 3); | - value moved here LL | touch(&x); @@ -22,7 +22,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:35:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait ... LL | x | - value moved here @@ -34,7 +34,7 @@ error[E0382]: borrow of moved value: `y` --> $DIR/moves-based-on-type-exprs.rs:36:11 | LL | let y = "ho".to_string(); - | - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `y` has type `String`, which does not implement the `Copy` trait ... LL | y | - value moved here @@ -46,7 +46,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:46:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait ... LL | true => x, | - value moved here @@ -58,7 +58,7 @@ error[E0382]: borrow of moved value: `y` --> $DIR/moves-based-on-type-exprs.rs:47:11 | LL | let y = "ho".to_string(); - | - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `y` has type `String`, which does not implement the `Copy` trait ... LL | false => y | - value moved here @@ -70,7 +70,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:58:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait ... LL | _ if guard(x) => 10, | - value moved here @@ -82,7 +82,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:65:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let _y = [x]; | - value moved here LL | touch(&x); @@ -92,7 +92,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:71:11 | LL | let x = "hi".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let _y = vec![x]; | - value moved here LL | touch(&x); @@ -102,7 +102,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:77:11 | LL | let x = vec!["hi".to_string()]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Vec`, which does not implement the `Copy` trait LL | let _y = x.into_iter().next().unwrap(); | ----------- `x` moved due to this method call LL | touch(&x); @@ -118,7 +118,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/moves-based-on-type-exprs.rs:83:11 | LL | let x = vec!["hi".to_string()]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Vec`, which does not implement the `Copy` trait LL | let _y = [x.into_iter().next().unwrap(); 1]; | ----------- `x` moved due to this method call LL | touch(&x); diff --git a/src/test/ui/moves/moves-based-on-type-match-bindings.rs b/src/test/ui/moves/moves-based-on-type-match-bindings.rs index 75fc6085f0a..4fb9b40e875 100644 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.rs +++ b/src/test/ui/moves/moves-based-on-type-match-bindings.rs @@ -15,7 +15,7 @@ fn f10() { touch(&x); //~ ERROR borrow of partially moved value: `x` //~^ value borrowed here after partial move - //~| partial move occurs because `x.f` has type `std::string::String` + //~| partial move occurs because `x.f` has type `String` } fn main() {} diff --git a/src/test/ui/moves/moves-based-on-type-match-bindings.stderr b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr index 2ee8d8d0b75..ad1a2db8b52 100644 --- a/src/test/ui/moves/moves-based-on-type-match-bindings.stderr +++ b/src/test/ui/moves/moves-based-on-type-match-bindings.stderr @@ -7,7 +7,7 @@ LL | Foo {f} => {} LL | touch(&x); | ^^ value borrowed here after partial move | - = note: partial move occurs because `x.f` has type `std::string::String`, which does not implement the `Copy` trait + = note: partial move occurs because `x.f` has type `String`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr index fafd377c12b..462bbd7be58 100644 --- a/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr +++ b/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `i`, a captured variable in an `Fn` closure LL | let i = box 3; | - captured outer variable LL | let _f = to_fn(|| test(i)); - | ^ move occurs because `i` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `i` has type `Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/moves/moves-based-on-type-tuple.stderr b/src/test/ui/moves/moves-based-on-type-tuple.stderr index 2e1ddbdf57f..a52c023e202 100644 --- a/src/test/ui/moves/moves-based-on-type-tuple.stderr +++ b/src/test/ui/moves/moves-based-on-type-tuple.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/moves-based-on-type-tuple.rs:4:13 | LL | fn dup(x: Box) -> Box<(Box,Box)> { - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | box (x, x) | - ^ value used here after move | | diff --git a/src/test/ui/moves/moves-sru-moved-field.stderr b/src/test/ui/moves/moves-sru-moved-field.stderr index a012c2d9b7b..cf7213637ce 100644 --- a/src/test/ui/moves/moves-sru-moved-field.stderr +++ b/src/test/ui/moves/moves-sru-moved-field.stderr @@ -6,7 +6,7 @@ LL | let _b = Foo {noncopyable: g, ..f}; LL | let _c = Foo {noncopyable: h, ..f}; | ^^^^^^^^^^^^^^^^^^^^^^^^^ value used here after move | - = note: move occurs because `f.moved` has type `std::boxed::Box`, which does not implement the `Copy` trait + = note: move occurs because `f.moved` has type `Box`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/mut/mut-cross-borrowing.stderr b/src/test/ui/mut/mut-cross-borrowing.stderr index c262d1336a2..b77813f8af0 100644 --- a/src/test/ui/mut/mut-cross-borrowing.stderr +++ b/src/test/ui/mut/mut-cross-borrowing.stderr @@ -4,11 +4,11 @@ error[E0308]: mismatched types LL | f(x) | ^ | | - | expected `&mut isize`, found struct `std::boxed::Box` + | expected `&mut isize`, found struct `Box` | help: consider mutably borrowing here: `&mut x` | = note: expected mutable reference `&mut isize` - found struct `std::boxed::Box<{integer}>` + found struct `Box<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/mut/mutable-enum-indirect.stderr b/src/test/ui/mut/mutable-enum-indirect.stderr index 9decba790d2..3be6acb41a9 100644 --- a/src/test/ui/mut/mutable-enum-indirect.stderr +++ b/src/test/ui/mut/mutable-enum-indirect.stderr @@ -7,7 +7,7 @@ LL | fn bar(_: T) {} LL | bar(&x); | ^^^ `NoSync` cannot be shared between threads safely | - = help: within `&Foo`, the trait `std::marker::Sync` is not implemented for `NoSync` + = help: within `&Foo`, the trait `Sync` is not implemented for `NoSync` = note: required because it appears within the type `Foo` = note: required because it appears within the type `&Foo` diff --git a/src/test/ui/mutexguard-sync.rs b/src/test/ui/mutexguard-sync.rs index 8e1370041dd..b5641838318 100644 --- a/src/test/ui/mutexguard-sync.rs +++ b/src/test/ui/mutexguard-sync.rs @@ -9,5 +9,5 @@ fn main() let m = Mutex::new(Cell::new(0i32)); let guard = m.lock().unwrap(); test_sync(guard); - //~^ ERROR `std::cell::Cell` cannot be shared between threads safely [E0277] + //~^ ERROR `Cell` cannot be shared between threads safely [E0277] } diff --git a/src/test/ui/mutexguard-sync.stderr b/src/test/ui/mutexguard-sync.stderr index 8b5362490bf..588c32a755e 100644 --- a/src/test/ui/mutexguard-sync.stderr +++ b/src/test/ui/mutexguard-sync.stderr @@ -1,14 +1,14 @@ -error[E0277]: `std::cell::Cell` cannot be shared between threads safely +error[E0277]: `Cell` cannot be shared between threads safely --> $DIR/mutexguard-sync.rs:11:15 | LL | fn test_sync(_t: T) {} | ---- required by this bound in `test_sync` ... LL | test_sync(guard); - | ^^^^^ `std::cell::Cell` cannot be shared between threads safely + | ^^^^^ `Cell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell` - = note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::MutexGuard<'_, std::cell::Cell>` + = help: the trait `Sync` is not implemented for `Cell` + = note: required because of the requirements on the impl of `Sync` for `MutexGuard<'_, Cell>` error: aborting due to previous error diff --git a/src/test/ui/never_type/issue-13352.stderr b/src/test/ui/never_type/issue-13352.stderr index 58ac74be3e3..93c792a72ec 100644 --- a/src/test/ui/never_type/issue-13352.stderr +++ b/src/test/ui/never_type/issue-13352.stderr @@ -4,7 +4,7 @@ error[E0277]: cannot add `()` to `usize` LL | 2_usize + (loop {}); | ^ no implementation for `usize + ()` | - = help: the trait `std::ops::Add<()>` is not implemented for `usize` + = help: the trait `Add<()>` is not implemented for `usize` error: aborting due to previous error diff --git a/src/test/ui/never_type/issue-2149.stderr b/src/test/ui/never_type/issue-2149.stderr index 3cdd6372ec1..58fe2edb1e4 100644 --- a/src/test/ui/never_type/issue-2149.stderr +++ b/src/test/ui/never_type/issue-2149.stderr @@ -1,10 +1,10 @@ -error[E0277]: cannot add `std::vec::Vec` to `()` +error[E0277]: cannot add `Vec` to `()` --> $DIR/issue-2149.rs:8:33 | LL | for elt in self { r = r + f(*elt); } - | ^ no implementation for `() + std::vec::Vec` + | ^ no implementation for `() + Vec` | - = help: the trait `std::ops::Add>` is not implemented for `()` + = help: the trait `Add>` is not implemented for `()` error[E0599]: no method named `bind` found for array `[&str; 1]` in the current scope --> $DIR/issue-2149.rs:13:12 diff --git a/src/test/ui/never_type/issue-51506.stderr b/src/test/ui/never_type/issue-51506.stderr index 73865a9b5a0..c54cbe9b4d1 100644 --- a/src/test/ui/never_type/issue-51506.stderr +++ b/src/test/ui/never_type/issue-51506.stderr @@ -7,7 +7,7 @@ LL | type Out: Iterator; LL | default type Out = !; | ^^^^^^^^^^^^^^^^^^^^^ `!` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `!` + = help: the trait `Iterator` is not implemented for `!` error: aborting due to previous error diff --git a/src/test/ui/nll/cannot-move-block-spans.stderr b/src/test/ui/nll/cannot-move-block-spans.stderr index 7db5d731acd..56a5cdff073 100644 --- a/src/test/ui/nll/cannot-move-block-spans.stderr +++ b/src/test/ui/nll/cannot-move-block-spans.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `*r` which is behind a shared reference LL | let x = { *r }; | ^^ | | - | move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `*r` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*r` error[E0507]: cannot move out of `*r` which is behind a shared reference @@ -13,7 +13,7 @@ error[E0507]: cannot move out of `*r` which is behind a shared reference LL | let y = unsafe { *r }; | ^^ | | - | move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `*r` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*r` error[E0507]: cannot move out of `*r` which is behind a shared reference @@ -22,37 +22,37 @@ error[E0507]: cannot move out of `*r` which is behind a shared reference LL | let z = loop { break *r; }; | ^^ | | - | move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `*r` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*r` -error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array +error[E0508]: cannot move out of type `[String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:11:15 | LL | let x = { arr[0] }; | ^^^^^^ | | | cannot move out of here - | move occurs because `arr[_]` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&arr[0]` -error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array +error[E0508]: cannot move out of type `[String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:12:22 | LL | let y = unsafe { arr[0] }; | ^^^^^^ | | | cannot move out of here - | move occurs because `arr[_]` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&arr[0]` -error[E0508]: cannot move out of type `[std::string::String; 2]`, a non-copy array +error[E0508]: cannot move out of type `[String; 2]`, a non-copy array --> $DIR/cannot-move-block-spans.rs:13:26 | LL | let z = loop { break arr[0]; }; | ^^^^^^ | | | cannot move out of here - | move occurs because `arr[_]` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `arr[_]` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&arr[0]` error[E0507]: cannot move out of `*r` which is behind a shared reference @@ -61,7 +61,7 @@ error[E0507]: cannot move out of `*r` which is behind a shared reference LL | let x = { let mut u = 0; u += 1; *r }; | ^^ | | - | move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `*r` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*r` error[E0507]: cannot move out of `*r` which is behind a shared reference @@ -70,7 +70,7 @@ error[E0507]: cannot move out of `*r` which is behind a shared reference LL | let y = unsafe { let mut u = 0; u += 1; *r }; | ^^ | | - | move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `*r` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*r` error[E0507]: cannot move out of `*r` which is behind a shared reference @@ -79,7 +79,7 @@ error[E0507]: cannot move out of `*r` which is behind a shared reference LL | let z = loop { let mut u = 0; u += 1; break *r; u += 2; }; | ^^ | | - | move occurs because `*r` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `*r` has type `String`, which does not implement the `Copy` trait | help: consider borrowing here: `&*r` error: aborting due to 9 previous errors diff --git a/src/test/ui/nll/closure-access-spans.stderr b/src/test/ui/nll/closure-access-spans.stderr index 4a8086905b7..ccc043a1890 100644 --- a/src/test/ui/nll/closure-access-spans.stderr +++ b/src/test/ui/nll/closure-access-spans.stderr @@ -60,7 +60,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/closure-access-spans.rs:35:5 | LL | fn closure_imm_capture_moved(mut x: String) { - | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ----- move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here LL | || x.len(); @@ -72,7 +72,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/closure-access-spans.rs:40:5 | LL | fn closure_mut_capture_moved(mut x: String) { - | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ----- move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here LL | || x = String::new(); @@ -84,7 +84,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/closure-access-spans.rs:45:5 | LL | fn closure_unique_capture_moved(x: &mut String) { - | - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `&mut String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here LL | || *x = String::new(); @@ -96,7 +96,7 @@ error[E0382]: use of moved value: `x` --> $DIR/closure-access-spans.rs:50:5 | LL | fn closure_move_capture_moved(x: &mut String) { - | - move occurs because `x` has type `&mut std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `&mut String`, which does not implement the `Copy` trait LL | let r = x; | - value moved here LL | || x; diff --git a/src/test/ui/nll/closure-move-spans.stderr b/src/test/ui/nll/closure-move-spans.stderr index 972dbc6a61d..0446ef7b066 100644 --- a/src/test/ui/nll/closure-move-spans.stderr +++ b/src/test/ui/nll/closure-move-spans.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/closure-move-spans.rs:5:13 | LL | fn move_after_move(x: String) { - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | || x; | -- - variable moved due to use in closure | | @@ -14,7 +14,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/closure-move-spans.rs:10:13 | LL | fn borrow_after_move(x: String) { - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | || x; | -- - variable moved due to use in closure | | @@ -26,7 +26,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/closure-move-spans.rs:15:13 | LL | fn borrow_mut_after_move(mut x: String) { - | ----- move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | ----- move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | || x; | -- - variable moved due to use in closure | | 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 549ebb78d78..25a730a0808 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 @@ -21,9 +21,9 @@ error: lifetime may not live long enough --> $DIR/propagate-approximated-fail-no-postdom.rs:46:13 | LL | |_outlives1, _outlives2, _outlives3, x, y| { - | ---------- ---------- has type `std::cell::Cell<&'2 &'_#3r u32>` + | ---------- ---------- has type `Cell<&'2 &'_#3r u32>` | | - | has type `std::cell::Cell<&'_#1r &'1 u32>` + | has type `Cell<&'_#1r &'1 u32>` ... LL | demand_y(x, y, p) | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` 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 5c156d0d1e3..4b1dba47d92 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 @@ -21,9 +21,9 @@ error: lifetime may not live long enough --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:37:9 | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { - | --------- - has type `&'_#7r std::cell::Cell<&'1 u32>` + | --------- - has type `&'_#7r Cell<&'1 u32>` | | - | has type `&'_#5r std::cell::Cell<&'2 &'_#1r u32>` + | has type `&'_#5r Cell<&'2 &'_#1r u32>` LL | // Only works if 'x: 'y: LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` 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 46e3f2e75f4..b0fb6d66845 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 @@ -21,9 +21,9 @@ error: lifetime may not live long enough --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:41:9 | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { - | ---------- ---------- has type `&'_#8r std::cell::Cell<&'2 &'_#2r u32>` + | ---------- ---------- has type `&'_#8r Cell<&'2 &'_#2r u32>` | | - | has type `&'_#6r std::cell::Cell<&'1 &'_#1r u32>` + | has type `&'_#6r Cell<&'1 &'_#1r u32>` LL | // Only works if 'x: 'y: LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` diff --git a/src/test/ui/nll/closures-in-loops.stderr b/src/test/ui/nll/closures-in-loops.stderr index 0b15d9bcfe6..37638a93d77 100644 --- a/src/test/ui/nll/closures-in-loops.stderr +++ b/src/test/ui/nll/closures-in-loops.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/closures-in-loops.rs:6:9 | LL | fn repreated_move(x: String) { - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | for i in 0..10 { LL | || x; | ^^ - use occurs due to use in closure diff --git a/src/test/ui/nll/guarantor-issue-46974.stderr b/src/test/ui/nll/guarantor-issue-46974.stderr index 80df3935987..361466c4d54 100644 --- a/src/test/ui/nll/guarantor-issue-46974.stderr +++ b/src/test/ui/nll/guarantor-issue-46974.stderr @@ -13,7 +13,7 @@ error[E0621]: explicit lifetime required in the type of `s` --> $DIR/guarantor-issue-46974.rs:15:5 | LL | fn bar(s: &Box<(i32,)>) -> &'static i32 { - | ------------ help: add explicit lifetime `'static` to the type of `s`: `&'static std::boxed::Box<(i32,)>` + | ------------ help: add explicit lifetime `'static` to the type of `s`: `&'static Box<(i32,)>` LL | // FIXME(#46983): error message should be better LL | &s.0 | ^^^^ lifetime `'static` required diff --git a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr b/src/test/ui/nll/issue-21232-partial-init-and-use.stderr index 9e69262b389..77fa484c21d 100644 --- a/src/test/ui/nll/issue-21232-partial-init-and-use.stderr +++ b/src/test/ui/nll/issue-21232-partial-init-and-use.stderr @@ -16,7 +16,7 @@ error[E0382]: assign to part of moved value: `s` LL | let mut s: S = S::new(); drop(s); | ----- - value moved here | | - | move occurs because `s` has type `S>`, which does not implement the `Copy` trait + | move occurs because `s` has type `S>`, which does not implement the `Copy` trait LL | s.x = 10; s.y = Box::new(20); | ^^^^^^^^ value partially assigned here after move @@ -26,7 +26,7 @@ error[E0382]: assign to part of moved value: `t` LL | let mut t: T = (0, Box::new(0)); drop(t); | ----- - value moved here | | - | move occurs because `t` has type `(u32, std::boxed::Box)`, which does not implement the `Copy` trait + | move occurs because `t` has type `(u32, Box)`, which does not implement the `Copy` trait LL | t.0 = 10; t.1 = Box::new(20); | ^^^^^^^^ value partially assigned here after move @@ -48,7 +48,7 @@ error[E0382]: assign to part of moved value: `s` LL | let mut s: S = S::new(); drop(s); | ----- - value moved here | | - | move occurs because `s` has type `S>`, which does not implement the `Copy` trait + | move occurs because `s` has type `S>`, which does not implement the `Copy` trait LL | s.x = 10; | ^^^^^^^^ value partially assigned here after move @@ -58,7 +58,7 @@ error[E0382]: assign to part of moved value: `t` LL | let mut t: T = (0, Box::new(0)); drop(t); | ----- - value moved here | | - | move occurs because `t` has type `(u32, std::boxed::Box)`, which does not implement the `Copy` trait + | move occurs because `t` has type `(u32, Box)`, which does not implement the `Copy` trait LL | t.0 = 10; | ^^^^^^^^ value partially assigned here after move @@ -94,7 +94,7 @@ LL | let mut q: Q> = Q::new(S::new()); drop(q.r); LL | q.r.f.x = 10; q.r.f.y = Box::new(20); | ^^^^^^^^^^^^ value partially assigned here after move | - = note: move occurs because `q.r` has type `R>>`, which does not implement the `Copy` trait + = note: move occurs because `q.r` has type `R>>`, which does not implement the `Copy` trait error[E0382]: assign to part of moved value: `q.r` --> $DIR/issue-21232-partial-init-and-use.rs:197:5 @@ -104,7 +104,7 @@ LL | let mut q: Q = Q::new((0, Box::new(0))); drop(q.r); LL | q.r.f.0 = 10; q.r.f.1 = Box::new(20); | ^^^^^^^^^^^^ value partially assigned here after move | - = note: move occurs because `q.r` has type `R<(u32, std::boxed::Box)>`, which does not implement the `Copy` trait + = note: move occurs because `q.r` has type `R<(u32, Box)>`, which does not implement the `Copy` trait error[E0381]: assign to part of possibly-uninitialized variable: `q` --> $DIR/issue-21232-partial-init-and-use.rs:204:5 @@ -126,7 +126,7 @@ LL | let mut q: Q> = Q::new(S::new()); drop(q.r); LL | q.r.f.x = 10; | ^^^^^^^^^^^^ value partially assigned here after move | - = note: move occurs because `q.r` has type `R>>`, which does not implement the `Copy` trait + = note: move occurs because `q.r` has type `R>>`, which does not implement the `Copy` trait error[E0382]: assign to part of moved value: `q.r` --> $DIR/issue-21232-partial-init-and-use.rs:225:5 @@ -136,7 +136,7 @@ LL | let mut q: Q = Q::new((0, Box::new(0))); drop(q.r); LL | q.r.f.0 = 10; | ^^^^^^^^^^^^ value partially assigned here after move | - = note: move occurs because `q.r` has type `R<(u32, std::boxed::Box)>`, which does not implement the `Copy` trait + = note: move occurs because `q.r` has type `R<(u32, Box)>`, which does not implement the `Copy` trait error[E0381]: assign to part of possibly-uninitialized variable: `q` --> $DIR/issue-21232-partial-init-and-use.rs:232:5 @@ -154,7 +154,7 @@ error[E0382]: assign to part of moved value: `c` --> $DIR/issue-21232-partial-init-and-use.rs:257:13 | LL | let mut c = (1, "".to_owned()); - | ----- move occurs because `c` has type `(i32, std::string::String)`, which does not implement the `Copy` trait + | ----- move occurs because `c` has type `(i32, String)`, which does not implement the `Copy` trait LL | match c { LL | c2 => { | -- value moved here @@ -165,7 +165,7 @@ error[E0382]: assign to part of moved value: `c` --> $DIR/issue-21232-partial-init-and-use.rs:267:13 | LL | let mut c = (1, (1, "".to_owned())); - | ----- move occurs because `c` has type `(i32, (i32, std::string::String))`, which does not implement the `Copy` trait + | ----- move occurs because `c` has type `(i32, (i32, String))`, which does not implement the `Copy` trait LL | match c { LL | c2 => { | -- value moved here @@ -180,7 +180,7 @@ LL | c2 => { LL | ((c.1).1).0 = 3; | ^^^^^^^^^^^^^^^ value partially assigned here after move | - = note: move occurs because `c.1` has type `(i32, (i32, std::string::String))`, which does not implement the `Copy` trait + = note: move occurs because `c.1` has type `(i32, (i32, String))`, which does not implement the `Copy` trait error: aborting due to 23 previous errors diff --git a/src/test/ui/nll/issue-50716.stderr b/src/test/ui/nll/issue-50716.stderr index 74c33df37a0..3dee3345db6 100644 --- a/src/test/ui/nll/issue-50716.stderr +++ b/src/test/ui/nll/issue-50716.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | let _x = *s; | ^^ lifetime mismatch | - = note: expected type `std::marker::Sized` - found type `std::marker::Sized` + = note: expected type `Sized` + found type `Sized` note: the lifetime `'a` as defined on the function body at 9:8... --> $DIR/issue-50716.rs:9:8 | diff --git a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr b/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr index 1a1250ff935..c0a17a67ee2 100644 --- a/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr +++ b/src/test/ui/nll/issue-52059-report-when-borrow-and-drop-conflict.stderr @@ -35,7 +35,7 @@ LL | let p = s.url; p | ^^^^^ | | | cannot move out of here - | move occurs because `s.url` has type `&mut std::string::String`, which does not implement the `Copy` trait + | move occurs because `s.url` has type `&mut String`, which does not implement the `Copy` trait | help: consider borrowing here: `&s.url` error: aborting due to 4 previous errors diff --git a/src/test/ui/nll/issue-52086.stderr b/src/test/ui/nll/issue-52086.stderr index e9aa7939f77..3b2dae9b72b 100644 --- a/src/test/ui/nll/issue-52086.stderr +++ b/src/test/ui/nll/issue-52086.stderr @@ -2,13 +2,13 @@ error[E0507]: cannot move out of an `Rc` --> $DIR/issue-52086.rs:8:10 | LL | drop(x.field); - | ^^^^^^^ move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^^^^^^ move occurs because value has type `Vec`, which does not implement the `Copy` trait error[E0507]: cannot move out of an `Arc` --> $DIR/issue-52086.rs:12:10 | LL | drop(y.field); - | ^^^^^^^ move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^^^^^^ move occurs because value has type `Vec`, which does not implement the `Copy` trait error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr b/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr index 57b9dc1f0be..67115a5ccdd 100644 --- a/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr +++ b/src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` LL | let x = (vec![22], vec![44]); | - captured outer variable LL | expect_fn(|| drop(x.0)); - | ^^^ move occurs because `x.0` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^^^ move occurs because `x.0` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/nll/issue-53807.stderr b/src/test/ui/nll/issue-53807.stderr index 4f36a4ccab2..6767f7cd616 100644 --- a/src/test/ui/nll/issue-53807.stderr +++ b/src/test/ui/nll/issue-53807.stderr @@ -4,7 +4,7 @@ error[E0382]: use of moved value LL | if let Some(thing) = maybe { | ^^^^^ value moved here, in previous iteration of loop | - = note: move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: move occurs because value has type `Vec`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving `maybe.0` | LL | if let Some(ref thing) = maybe { diff --git a/src/test/ui/nll/issue-54556-stephaneyfx.stderr b/src/test/ui/nll/issue-54556-stephaneyfx.stderr index 77065f0b8d2..bfb0eb74a56 100644 --- a/src/test/ui/nll/issue-54556-stephaneyfx.stderr +++ b/src/test/ui/nll/issue-54556-stephaneyfx.stderr @@ -10,7 +10,7 @@ LL | } | - | | | `stmt` dropped here while still borrowed - | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::iter::Map, [closure@$DIR/issue-54556-stephaneyfx.rs:28:14: 28:23]>` + | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Map, [closure@$DIR/issue-54556-stephaneyfx.rs:28:14: 28:23]>` | = note: the temporary is part of an expression at the end of a block; consider forcing this temporary to be dropped sooner, before the block's local variables are dropped diff --git a/src/test/ui/nll/match-cfg-fake-edges.stderr b/src/test/ui/nll/match-cfg-fake-edges.stderr index 06fe564ac69..4b3817929fd 100644 --- a/src/test/ui/nll/match-cfg-fake-edges.stderr +++ b/src/test/ui/nll/match-cfg-fake-edges.stderr @@ -8,7 +8,7 @@ error[E0382]: use of moved value: `x` --> $DIR/match-cfg-fake-edges.rs:35:13 | LL | let x = String::new(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait ... LL | false if { drop(x); true } => 1, | - value moved here diff --git a/src/test/ui/nll/match-guards-always-borrow.stderr b/src/test/ui/nll/match-guards-always-borrow.stderr index 15f94043b43..df6d65056ac 100644 --- a/src/test/ui/nll/match-guards-always-borrow.stderr +++ b/src/test/ui/nll/match-guards-always-borrow.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `foo` in pattern guard LL | (|| { let bar = foo; bar.take() })(); | ^^ --- | | | - | | move occurs because `foo` has type `&mut std::option::Option<&i32>`, which does not implement the `Copy` trait + | | move occurs because `foo` has type `&mut Option<&i32>`, which does not implement the `Copy` trait | | move occurs due to use in closure | move out of `foo` occurs here | diff --git a/src/test/ui/nll/move-errors.stderr b/src/test/ui/nll/move-errors.stderr index d4a0e45648c..0df326425ad 100644 --- a/src/test/ui/nll/move-errors.stderr +++ b/src/test/ui/nll/move-errors.stderr @@ -52,7 +52,7 @@ LL | let A(s) = *a; | - ^^ help: consider borrowing here: `&*a` | | | data moved here - | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `s` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `D`, which implements the `Drop` trait --> $DIR/move-errors.rs:44:19 @@ -61,7 +61,7 @@ LL | let C(D(s)) = c; | - ^ cannot move out of here | | | data moved here - | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `s` has type `String`, which does not implement the `Copy` trait error[E0507]: cannot move out of `*a` which is behind a shared reference --> $DIR/move-errors.rs:51:9 @@ -95,7 +95,7 @@ LL | B::U(D(s)) => (), | - | | | data moved here - | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `s` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `D`, which implements the `Drop` trait --> $DIR/move-errors.rs:92:11 @@ -107,7 +107,7 @@ LL | (D(s), &t) => (), | - | | | data moved here - | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `s` has type `String`, which does not implement the `Copy` trait error[E0507]: cannot move out of `*x.1` which is behind a shared reference --> $DIR/move-errors.rs:92:11 @@ -119,7 +119,7 @@ LL | (D(s), &t) => (), | - | | | data moved here - | move occurs because `t` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `t` has type `String`, which does not implement the `Copy` trait error[E0509]: cannot move out of type `F`, which implements the `Drop` trait --> $DIR/move-errors.rs:102:11 @@ -144,7 +144,7 @@ LL | Ok(s) | Err(s) => (), | - | | | data moved here - | move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait + | move occurs because `s` has type `String`, which does not implement the `Copy` trait error: aborting due to 14 previous errors diff --git a/src/test/ui/nll/move-subpaths-moves-root.stderr b/src/test/ui/nll/move-subpaths-moves-root.stderr index d86801cf296..ae9287f9226 100644 --- a/src/test/ui/nll/move-subpaths-moves-root.stderr +++ b/src/test/ui/nll/move-subpaths-moves-root.stderr @@ -6,7 +6,7 @@ LL | drop(x.0); LL | drop(x); | ^ value used here after partial move | - = note: partial move occurs because `x.0` has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: partial move occurs because `x.0` has type `Vec`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/nll/trait-associated-constant.stderr b/src/test/ui/nll/trait-associated-constant.stderr index 5158420c737..2af5b2a2e00 100644 --- a/src/test/ui/nll/trait-associated-constant.stderr +++ b/src/test/ui/nll/trait-associated-constant.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | const AC: Option<&'c str> = None; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | - = note: expected enum `std::option::Option<&'b str>` - found enum `std::option::Option<&'c str>` + = note: expected enum `Option<&'b str>` + found enum `Option<&'c str>` note: the lifetime `'c` as defined on the impl at 20:18... --> $DIR/trait-associated-constant.rs:20:18 | diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs index 20af0fbdc8e..28010e198d6 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs @@ -23,7 +23,7 @@ where T: Iterator, { with_signature(x, |mut y| Box::new(y.next())) - //~^ ERROR the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } #[rustc_regions] @@ -40,7 +40,7 @@ where T: 'b + Iterator, { with_signature(x, |mut y| Box::new(y.next())) - //~^ ERROR the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } #[rustc_regions] 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 38e59ae3e26..50e7a81bb1f 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 @@ -26,13 +26,13 @@ LL | | } | = note: defining type: no_region::<'_#1r, T> -error[E0309]: the associated type `::Item` may not live long enough +error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-closure.rs:25:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `::Item: 'a`... + = help: consider adding an explicit lifetime bound `::Item: 'a`... note: external requirements --> $DIR/projection-no-regions-closure.rs:34:23 @@ -89,13 +89,13 @@ LL | | } | = note: defining type: wrong_region::<'_#1r, '_#2r, T> -error[E0309]: the associated type `::Item` may not live long enough +error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-closure.rs:42:23 | LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `::Item: 'a`... + = help: consider adding an explicit lifetime bound `::Item: 'a`... note: external requirements --> $DIR/projection-no-regions-closure.rs:52:23 diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs index 64073bec8ae..c9989fb426b 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-fn.rs @@ -11,7 +11,7 @@ where T: Iterator, { Box::new(x.next()) - //~^ ERROR the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } fn correct_region<'a, T>(mut x: T) -> Box @@ -26,7 +26,7 @@ where T: 'b + Iterator, { Box::new(x.next()) - //~^ ERROR the associated type `::Item` may not live long enough + //~^ ERROR the associated type `::Item` may not live long enough } fn outlives_region<'a, 'b, T>(mut x: T) -> Box 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 b0338de9333..c4df04b99b5 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,18 +1,18 @@ -error[E0309]: the associated type `::Item` may not live long enough +error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:13:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `::Item: 'a`... + = help: consider adding an explicit lifetime bound `::Item: 'a`... -error[E0309]: the associated type `::Item` may not live long enough +error[E0309]: the associated type `::Item` may not live long enough --> $DIR/projection-no-regions-fn.rs:28:5 | LL | Box::new(x.next()) | ^^^^^^^^^^^^^^^^^^ | - = help: consider adding an explicit lifetime bound `::Item: 'a`... + = help: consider adding an explicit lifetime bound `::Item: 'a`... error: aborting due to 2 previous errors diff --git a/src/test/ui/nll/type-alias-free-regions.nll.stderr b/src/test/ui/nll/type-alias-free-regions.nll.stderr index 235bf4167d5..bde73b05894 100644 --- a/src/test/ui/nll/type-alias-free-regions.nll.stderr +++ b/src/test/ui/nll/type-alias-free-regions.nll.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | impl<'a> FromBox<'a> for C<'a> { | -- lifetime `'a` defined here LL | fn from_box(b: Box) -> Self { - | - has type `std::boxed::Box>` + | - has type `Box>` LL | C { f: b } | ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` @@ -14,7 +14,7 @@ error: lifetime may not live long enough LL | impl<'a> FromTuple<'a> for C<'a> { | -- lifetime `'a` defined here LL | fn from_tuple(b: (B,)) -> Self { - | - has type `(std::boxed::Box<&'1 isize>,)` + | - has type `(Box<&'1 isize>,)` LL | C { f: Box::new(b.0) } | ^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'a` diff --git a/src/test/ui/nll/type-alias-free-regions.stderr b/src/test/ui/nll/type-alias-free-regions.stderr index 65ce0581121..38e3e05d1cb 100644 --- a/src/test/ui/nll/type-alias-free-regions.stderr +++ b/src/test/ui/nll/type-alias-free-regions.stderr @@ -14,8 +14,8 @@ note: ...so that the expression is assignable | LL | C { f: b } | ^ - = note: expected `std::boxed::Box>` - found `std::boxed::Box>` + = note: expected `Box>` + found `Box>` note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 15:6... --> $DIR/type-alias-free-regions.rs:15:6 | @@ -45,8 +45,8 @@ note: ...so that the expression is assignable | LL | C { f: Box::new(b.0) } | ^^^ - = note: expected `std::boxed::Box<&isize>` - found `std::boxed::Box<&isize>` + = note: expected `Box<&isize>` + found `Box<&isize>` note: but, the lifetime must be valid for the lifetime `'a` as defined on the impl at 25:6... --> $DIR/type-alias-free-regions.rs:25:6 | diff --git a/src/test/ui/no-capture-arc.stderr b/src/test/ui/no-capture-arc.stderr index 476b6f75abb..0081841fec0 100644 --- a/src/test/ui/no-capture-arc.stderr +++ b/src/test/ui/no-capture-arc.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `arc_v` --> $DIR/no-capture-arc.rs:14:18 | LL | let arc_v = Arc::new(v); - | ----- move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait + | ----- move occurs because `arc_v` has type `Arc>`, which does not implement the `Copy` trait LL | LL | thread::spawn(move|| { | ------ value moved into closure here diff --git a/src/test/ui/no-reuse-move-arc.stderr b/src/test/ui/no-reuse-move-arc.stderr index 3f7169e6fcb..bb4e0871224 100644 --- a/src/test/ui/no-reuse-move-arc.stderr +++ b/src/test/ui/no-reuse-move-arc.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `arc_v` --> $DIR/no-reuse-move-arc.rs:12:18 | LL | let arc_v = Arc::new(v); - | ----- move occurs because `arc_v` has type `std::sync::Arc>`, which does not implement the `Copy` trait + | ----- move occurs because `arc_v` has type `Arc>`, which does not implement the `Copy` trait LL | LL | thread::spawn(move|| { | ------ value moved into closure here diff --git a/src/test/ui/no-send-res-ports.rs b/src/test/ui/no-send-res-ports.rs index e10f447365e..1bac5868e73 100644 --- a/src/test/ui/no-send-res-ports.rs +++ b/src/test/ui/no-send-res-ports.rs @@ -23,7 +23,7 @@ fn main() { let x = foo(Port(Rc::new(()))); thread::spawn(move|| { - //~^ ERROR `std::rc::Rc<()>` cannot be sent between threads safely + //~^ ERROR `Rc<()>` cannot be sent between threads safely let y = x; println!("{:?}", y); }); diff --git a/src/test/ui/no-send-res-ports.stderr b/src/test/ui/no-send-res-ports.stderr index dbe1fde964f..6bd4537240c 100644 --- a/src/test/ui/no-send-res-ports.stderr +++ b/src/test/ui/no-send-res-ports.stderr @@ -1,25 +1,25 @@ -error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely +error[E0277]: `Rc<()>` cannot be sent between threads safely --> $DIR/no-send-res-ports.rs:25:5 | LL | thread::spawn(move|| { | _____^^^^^^^^^^^^^_- | | | - | | `std::rc::Rc<()>` cannot be sent between threads safely + | | `Rc<()>` cannot be sent between threads safely LL | | LL | | let y = x; LL | | println!("{:?}", y); LL | | }); - | |_____- within this `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]` + | |_____- within this `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:Foo]` | ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL | LL | F: Send + 'static, - | ---- required by this bound in `std::thread::spawn` + | ---- required by this bound in `spawn` | - = help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` + = help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:Foo]`, the trait `Send` is not implemented for `Rc<()>` = note: required because it appears within the type `Port<()>` - = note: required because it appears within the type `main::Foo` - = note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:main::Foo]` + = note: required because it appears within the type `Foo` + = note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6 x:Foo]` error: aborting due to previous error diff --git a/src/test/ui/no_send-enum.stderr b/src/test/ui/no_send-enum.stderr index 95a0d77676d..b617fe410fa 100644 --- a/src/test/ui/no_send-enum.stderr +++ b/src/test/ui/no_send-enum.stderr @@ -7,7 +7,7 @@ LL | fn bar(_: T) {} LL | bar(x); | ^^^ `NoSend` cannot be sent between threads safely | - = help: within `Foo`, the trait `std::marker::Send` is not implemented for `NoSend` + = help: within `Foo`, the trait `Send` is not implemented for `NoSend` = note: required because it appears within the type `Foo` error: aborting due to previous error diff --git a/src/test/ui/no_send-rc.rs b/src/test/ui/no_send-rc.rs index 6ed0286ef18..f31db15ef2e 100644 --- a/src/test/ui/no_send-rc.rs +++ b/src/test/ui/no_send-rc.rs @@ -5,5 +5,5 @@ fn bar(_: T) {} fn main() { let x = Rc::new(5); bar(x); - //~^ ERROR `std::rc::Rc<{integer}>` cannot be sent between threads safely + //~^ ERROR `Rc<{integer}>` cannot be sent between threads safely } diff --git a/src/test/ui/no_send-rc.stderr b/src/test/ui/no_send-rc.stderr index 1eb2edb14b8..713dd753663 100644 --- a/src/test/ui/no_send-rc.stderr +++ b/src/test/ui/no_send-rc.stderr @@ -1,13 +1,13 @@ -error[E0277]: `std::rc::Rc<{integer}>` cannot be sent between threads safely +error[E0277]: `Rc<{integer}>` cannot be sent between threads safely --> $DIR/no_send-rc.rs:7:9 | LL | fn bar(_: T) {} | ---- required by this bound in `bar` ... LL | bar(x); - | ^ `std::rc::Rc<{integer}>` cannot be sent between threads safely + | ^ `Rc<{integer}>` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<{integer}>` + = help: the trait `Send` is not implemented for `Rc<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/no_send-struct.stderr b/src/test/ui/no_send-struct.stderr index 4e8801a58bf..a28a5e6d3d5 100644 --- a/src/test/ui/no_send-struct.stderr +++ b/src/test/ui/no_send-struct.stderr @@ -7,7 +7,7 @@ LL | fn bar(_: T) {} LL | bar(x); | ^ `Foo` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `Foo` + = help: the trait `Send` is not implemented for `Foo` error: aborting due to previous error diff --git a/src/test/ui/no_share-enum.stderr b/src/test/ui/no_share-enum.stderr index 40996aef702..4a93edc100e 100644 --- a/src/test/ui/no_share-enum.stderr +++ b/src/test/ui/no_share-enum.stderr @@ -7,7 +7,7 @@ LL | fn bar(_: T) {} LL | bar(x); | ^^^ `NoSync` cannot be shared between threads safely | - = help: within `Foo`, the trait `std::marker::Sync` is not implemented for `NoSync` + = help: within `Foo`, the trait `Sync` is not implemented for `NoSync` = note: required because it appears within the type `Foo` error: aborting due to previous error diff --git a/src/test/ui/no_share-struct.stderr b/src/test/ui/no_share-struct.stderr index f14b06835f9..a35271a8b78 100644 --- a/src/test/ui/no_share-struct.stderr +++ b/src/test/ui/no_share-struct.stderr @@ -7,7 +7,7 @@ LL | fn bar(_: T) {} LL | bar(x); | ^ `Foo` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `Foo` + = help: the trait `Sync` is not implemented for `Foo` error: aborting due to previous error diff --git a/src/test/ui/noexporttypeexe.rs b/src/test/ui/noexporttypeexe.rs index 0a8b40b08fe..964ac9a300e 100644 --- a/src/test/ui/noexporttypeexe.rs +++ b/src/test/ui/noexporttypeexe.rs @@ -10,6 +10,6 @@ fn main() { let x: isize = noexporttypelib::foo(); //~^ ERROR mismatched types //~| expected type `isize` - //~| found enum `std::option::Option` - //~| expected `isize`, found enum `std::option::Option` + //~| found enum `Option` + //~| expected `isize`, found enum `Option` } diff --git a/src/test/ui/noexporttypeexe.stderr b/src/test/ui/noexporttypeexe.stderr index e80fcd13685..7fc239613e2 100644 --- a/src/test/ui/noexporttypeexe.stderr +++ b/src/test/ui/noexporttypeexe.stderr @@ -2,12 +2,12 @@ error[E0308]: mismatched types --> $DIR/noexporttypeexe.rs:10:18 | LL | let x: isize = noexporttypelib::foo(); - | ----- ^^^^^^^^^^^^^^^^^^^^^^ expected `isize`, found enum `std::option::Option` + | ----- ^^^^^^^^^^^^^^^^^^^^^^ expected `isize`, found enum `Option` | | | expected due to this | = note: expected type `isize` - found enum `std::option::Option` + found enum `Option` error: aborting due to previous error diff --git a/src/test/ui/non-copyable-void.stderr b/src/test/ui/non-copyable-void.stderr index 9b0277186c4..8395a3a0563 100644 --- a/src/test/ui/non-copyable-void.stderr +++ b/src/test/ui/non-copyable-void.stderr @@ -1,16 +1,16 @@ -error[E0599]: no method named `clone` found for enum `libc::c_void` in the current scope +error[E0599]: no method named `clone` found for enum `c_void` in the current scope --> $DIR/non-copyable-void.rs:11:23 | LL | let _z = (*y).clone(); - | ^^^^^ method not found in `libc::c_void` + | ^^^^^ method not found in `c_void` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc` here - | the method is available for `std::rc::Rc` here + | the method is available for `Arc` here + | the method is available for `Rc` here error: aborting due to previous error diff --git a/src/test/ui/non-integer-atomic.rs b/src/test/ui/non-integer-atomic.rs index 26d7e66ae3f..00a7f368a0f 100644 --- a/src/test/ui/non-integer-atomic.rs +++ b/src/test/ui/non-integer-atomic.rs @@ -53,22 +53,22 @@ pub unsafe fn test_Foo_cxchg(p: &mut Foo, v: Foo) { pub unsafe fn test_Bar_load(p: &mut Bar, v: Bar) { intrinsics::atomic_load(p); - //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()` + //~^ ERROR expected basic integer type, found `&dyn Fn()` } pub unsafe fn test_Bar_store(p: &mut Bar, v: Bar) { intrinsics::atomic_store(p, v); - //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()` + //~^ ERROR expected basic integer type, found `&dyn Fn()` } pub unsafe fn test_Bar_xchg(p: &mut Bar, v: Bar) { intrinsics::atomic_xchg(p, v); - //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()` + //~^ ERROR expected basic integer type, found `&dyn Fn()` } pub unsafe fn test_Bar_cxchg(p: &mut Bar, v: Bar) { intrinsics::atomic_cxchg(p, v, v); - //~^ ERROR expected basic integer type, found `&dyn std::ops::Fn()` + //~^ ERROR expected basic integer type, found `&dyn Fn()` } pub unsafe fn test_Quux_load(p: &mut Quux, v: Quux) { diff --git a/src/test/ui/non-integer-atomic.stderr b/src/test/ui/non-integer-atomic.stderr index 468e76da666..ee485c21cd6 100644 --- a/src/test/ui/non-integer-atomic.stderr +++ b/src/test/ui/non-integer-atomic.stderr @@ -46,25 +46,25 @@ error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected bas LL | intrinsics::atomic_cxchg(p, v, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` +error[E0511]: invalid monomorphization of `atomic_load` intrinsic: expected basic integer type, found `&dyn Fn()` --> $DIR/non-integer-atomic.rs:55:5 | LL | intrinsics::atomic_load(p); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` +error[E0511]: invalid monomorphization of `atomic_store` intrinsic: expected basic integer type, found `&dyn Fn()` --> $DIR/non-integer-atomic.rs:60:5 | LL | intrinsics::atomic_store(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` +error[E0511]: invalid monomorphization of `atomic_xchg` intrinsic: expected basic integer type, found `&dyn Fn()` --> $DIR/non-integer-atomic.rs:65:5 | LL | intrinsics::atomic_xchg(p, v); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `&dyn std::ops::Fn()` +error[E0511]: invalid monomorphization of `atomic_cxchg` intrinsic: expected basic integer type, found `&dyn Fn()` --> $DIR/non-integer-atomic.rs:70:5 | LL | intrinsics::atomic_cxchg(p, v, v); diff --git a/src/test/ui/noncopyable-class.stderr b/src/test/ui/noncopyable-class.stderr index 75009ec1305..b8e467d8402 100644 --- a/src/test/ui/noncopyable-class.stderr +++ b/src/test/ui/noncopyable-class.stderr @@ -12,12 +12,12 @@ LL | let _y = x.clone(); LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc` here - | the method is available for `std::rc::Rc` here + | the method is available for `Arc` here + | the method is available for `Rc` here | = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `clone`, perhaps you need to implement it: - candidate #1: `std::clone::Clone` + candidate #1: `Clone` error: aborting due to previous error diff --git a/src/test/ui/not-clone-closure.rs b/src/test/ui/not-clone-closure.rs index 134d52c495c..25635bc8331 100644 --- a/src/test/ui/not-clone-closure.rs +++ b/src/test/ui/not-clone-closure.rs @@ -8,5 +8,5 @@ fn main() { println!("Hello {}", a.0); }; - let hello = hello.clone(); //~ ERROR the trait bound `S: std::clone::Clone` is not satisfied + let hello = hello.clone(); //~ ERROR the trait bound `S: Clone` is not satisfied } diff --git a/src/test/ui/not-clone-closure.stderr b/src/test/ui/not-clone-closure.stderr index 20c7f81cf5e..f54a69e1902 100644 --- a/src/test/ui/not-clone-closure.stderr +++ b/src/test/ui/not-clone-closure.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: std::clone::Clone` is not satisfied in `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]` +error[E0277]: the trait bound `S: Clone` is not satisfied in `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]` --> $DIR/not-clone-closure.rs:11:23 | LL | let hello = move || { @@ -8,7 +8,7 @@ LL | | }; | |_____- within this `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]` LL | LL | let hello = hello.clone(); - | ^^^^^ within `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]`, the trait `std::clone::Clone` is not implemented for `S` + | ^^^^^ within `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]`, the trait `Clone` is not implemented for `S` | = note: required because it appears within the type `[closure@$DIR/not-clone-closure.rs:7:17: 9:6 a:S]` diff --git a/src/test/ui/not-panic/not-panic-safe-2.rs b/src/test/ui/not-panic/not-panic-safe-2.rs index cd074281d00..f3faa704329 100644 --- a/src/test/ui/not-panic/not-panic-safe-2.rs +++ b/src/test/ui/not-panic/not-panic-safe-2.rs @@ -8,6 +8,6 @@ fn assert() {} fn main() { assert::>>(); - //~^ ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a - //~| ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a + //~^ ERROR the type `UnsafeCell` may contain interior mutability and a + //~| ERROR the type `UnsafeCell` may contain interior mutability and a } diff --git a/src/test/ui/not-panic/not-panic-safe-2.stderr b/src/test/ui/not-panic/not-panic-safe-2.stderr index c52d5b9adee..6deb1e7d6fe 100644 --- a/src/test/ui/not-panic/not-panic-safe-2.stderr +++ b/src/test/ui/not-panic/not-panic-safe-2.stderr @@ -1,29 +1,29 @@ -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-2.rs:10:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::rc::Rc>` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `Rc>` -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-2.rs:10:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::Cell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::rc::Rc>` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `Cell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `Rc>` error: aborting due to 2 previous errors diff --git a/src/test/ui/not-panic/not-panic-safe-3.rs b/src/test/ui/not-panic/not-panic-safe-3.rs index b0ba3781f34..21f0c099312 100644 --- a/src/test/ui/not-panic/not-panic-safe-3.rs +++ b/src/test/ui/not-panic/not-panic-safe-3.rs @@ -8,6 +8,6 @@ fn assert() {} fn main() { assert::>>(); - //~^ ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a - //~| ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a + //~^ ERROR the type `UnsafeCell` may contain interior mutability and a + //~| ERROR the type `UnsafeCell` may contain interior mutability and a } diff --git a/src/test/ui/not-panic/not-panic-safe-3.stderr b/src/test/ui/not-panic/not-panic-safe-3.stderr index 711346b7b1c..ef1cf548df0 100644 --- a/src/test/ui/not-panic/not-panic-safe-3.stderr +++ b/src/test/ui/not-panic/not-panic-safe-3.stderr @@ -1,29 +1,29 @@ -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-3.rs:10:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc>` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `Arc>` -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-3.rs:10:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::>>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::Cell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `std::sync::Arc>` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `Cell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `Arc>` error: aborting due to 2 previous errors diff --git a/src/test/ui/not-panic/not-panic-safe-4.rs b/src/test/ui/not-panic/not-panic-safe-4.rs index ed2760576d8..ba93af5c0aa 100644 --- a/src/test/ui/not-panic/not-panic-safe-4.rs +++ b/src/test/ui/not-panic/not-panic-safe-4.rs @@ -7,6 +7,6 @@ fn assert() {} fn main() { assert::<&RefCell>(); - //~^ ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a - //~| ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a + //~^ ERROR the type `UnsafeCell` may contain interior mutability and a + //~| ERROR the type `UnsafeCell` may contain interior mutability and a } diff --git a/src/test/ui/not-panic/not-panic-safe-4.stderr b/src/test/ui/not-panic/not-panic-safe-4.stderr index ada22fe9a77..2f86b96540c 100644 --- a/src/test/ui/not-panic/not-panic-safe-4.stderr +++ b/src/test/ui/not-panic/not-panic-safe-4.stderr @@ -1,29 +1,29 @@ -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-4.rs:9:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::<&RefCell>(); - | ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::RefCell` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `&RefCell` -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-4.rs:9:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::<&RefCell>(); - | ^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::Cell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::RefCell` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `Cell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `&RefCell` error: aborting due to 2 previous errors diff --git a/src/test/ui/not-panic/not-panic-safe-5.stderr b/src/test/ui/not-panic/not-panic-safe-5.stderr index c987ca7c088..c9f407a7f77 100644 --- a/src/test/ui/not-panic/not-panic-safe-5.stderr +++ b/src/test/ui/not-panic/not-panic-safe-5.stderr @@ -1,14 +1,14 @@ -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-5.rs:9:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::<*const UnsafeCell>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*const std::cell::UnsafeCell` + = help: the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `*const UnsafeCell` error: aborting due to previous error diff --git a/src/test/ui/not-panic/not-panic-safe-6.rs b/src/test/ui/not-panic/not-panic-safe-6.rs index a42e337ad93..4915096dc3b 100644 --- a/src/test/ui/not-panic/not-panic-safe-6.rs +++ b/src/test/ui/not-panic/not-panic-safe-6.rs @@ -7,6 +7,6 @@ fn assert() {} fn main() { assert::<*mut RefCell>(); - //~^ ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a - //~| ERROR the type `std::cell::UnsafeCell` may contain interior mutability and a + //~^ ERROR the type `UnsafeCell` may contain interior mutability and a + //~| ERROR the type `UnsafeCell` may contain interior mutability and a } diff --git a/src/test/ui/not-panic/not-panic-safe-6.stderr b/src/test/ui/not-panic/not-panic-safe-6.stderr index f184a459b82..cf75c89f27e 100644 --- a/src/test/ui/not-panic/not-panic-safe-6.stderr +++ b/src/test/ui/not-panic/not-panic-safe-6.stderr @@ -1,29 +1,29 @@ -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-6.rs:9:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::<*mut RefCell>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*mut std::cell::RefCell` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `*mut RefCell` -error[E0277]: the type `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary +error[E0277]: the type `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary --> $DIR/not-panic-safe-6.rs:9:5 | LL | fn assert() {} | ---------- required by this bound in `assert` ... LL | assert::<*mut RefCell>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary | - = help: within `std::cell::RefCell`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell` - = note: required because it appears within the type `std::cell::Cell` - = note: required because it appears within the type `std::cell::RefCell` - = note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `*mut std::cell::RefCell` + = help: within `RefCell`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell` + = note: required because it appears within the type `Cell` + = note: required because it appears within the type `RefCell` + = note: required because of the requirements on the impl of `UnwindSafe` for `*mut RefCell` error: aborting due to 2 previous errors diff --git a/src/test/ui/not-panic/not-panic-safe.stderr b/src/test/ui/not-panic/not-panic-safe.stderr index b254a041666..1aaf17b1cd8 100644 --- a/src/test/ui/not-panic/not-panic-safe.stderr +++ b/src/test/ui/not-panic/not-panic-safe.stderr @@ -7,8 +7,8 @@ LL | fn assert() {} LL | assert::<&mut i32>(); | ^^^^^^^^^^^^^^^^^^ `&mut i32` may not be safely transferred across an unwind boundary | - = help: the trait `std::panic::UnwindSafe` is not implemented for `&mut i32` - = note: `std::panic::UnwindSafe` is implemented for `&i32`, but not for `&mut i32` + = help: the trait `UnwindSafe` is not implemented for `&mut i32` + = note: `UnwindSafe` is implemented for `&i32`, but not for `&mut i32` error: aborting due to previous error diff --git a/src/test/ui/not-sync.rs b/src/test/ui/not-sync.rs index 70ba1fc5809..f4648994fa9 100644 --- a/src/test/ui/not-sync.rs +++ b/src/test/ui/not-sync.rs @@ -6,17 +6,17 @@ fn test() {} fn main() { test::>(); - //~^ ERROR `std::cell::Cell` cannot be shared between threads safely [E0277] + //~^ ERROR `Cell` cannot be shared between threads safely [E0277] test::>(); - //~^ ERROR `std::cell::RefCell` cannot be shared between threads safely [E0277] + //~^ ERROR `RefCell` cannot be shared between threads safely [E0277] test::>(); - //~^ ERROR `std::rc::Rc` cannot be shared between threads safely [E0277] + //~^ ERROR `Rc` cannot be shared between threads safely [E0277] test::>(); //~^ ERROR `std::rc::Weak` cannot be shared between threads safely [E0277] test::>(); //~^ ERROR `std::sync::mpsc::Receiver` cannot be shared between threads safely [E0277] test::>(); - //~^ ERROR `std::sync::mpsc::Sender` cannot be shared between threads safely [E0277] + //~^ ERROR `Sender` cannot be shared between threads safely [E0277] } diff --git a/src/test/ui/not-sync.stderr b/src/test/ui/not-sync.stderr index 25f1a66062b..85d3599da05 100644 --- a/src/test/ui/not-sync.stderr +++ b/src/test/ui/not-sync.stderr @@ -1,35 +1,35 @@ -error[E0277]: `std::cell::Cell` cannot be shared between threads safely +error[E0277]: `Cell` cannot be shared between threads safely --> $DIR/not-sync.rs:8:12 | LL | fn test() {} | ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^ `std::cell::Cell` cannot be shared between threads safely + | ^^^^^^^^^ `Cell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::Cell` + = help: the trait `Sync` is not implemented for `Cell` -error[E0277]: `std::cell::RefCell` cannot be shared between threads safely +error[E0277]: `RefCell` cannot be shared between threads safely --> $DIR/not-sync.rs:10:12 | LL | fn test() {} | ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^^ `std::cell::RefCell` cannot be shared between threads safely + | ^^^^^^^^^^^^ `RefCell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::RefCell` + = help: the trait `Sync` is not implemented for `RefCell` -error[E0277]: `std::rc::Rc` cannot be shared between threads safely +error[E0277]: `Rc` cannot be shared between threads safely --> $DIR/not-sync.rs:13:12 | LL | fn test() {} | ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^ `std::rc::Rc` cannot be shared between threads safely + | ^^^^^^^ `Rc` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc` + = help: the trait `Sync` is not implemented for `Rc` error[E0277]: `std::rc::Weak` cannot be shared between threads safely --> $DIR/not-sync.rs:15:12 @@ -40,7 +40,7 @@ LL | fn test() {} LL | test::>(); | ^^^^^^^^^ `std::rc::Weak` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::rc::Weak` + = help: the trait `Sync` is not implemented for `std::rc::Weak` error[E0277]: `std::sync::mpsc::Receiver` cannot be shared between threads safely --> $DIR/not-sync.rs:18:12 @@ -51,18 +51,18 @@ LL | fn test() {} LL | test::>(); | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver` + = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver` -error[E0277]: `std::sync::mpsc::Sender` cannot be shared between threads safely +error[E0277]: `Sender` cannot be shared between threads safely --> $DIR/not-sync.rs:20:12 | LL | fn test() {} | ---- required by this bound in `test` ... LL | test::>(); - | ^^^^^^^^^^^ `std::sync::mpsc::Sender` cannot be shared between threads safely + | ^^^^^^^^^^^ `Sender` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender` + = help: the trait `Sync` is not implemented for `Sender` error: aborting due to 6 previous errors diff --git a/src/test/ui/object-does-not-impl-trait.rs b/src/test/ui/object-does-not-impl-trait.rs index 104e7b2e215..b3b679813c9 100644 --- a/src/test/ui/object-does-not-impl-trait.rs +++ b/src/test/ui/object-does-not-impl-trait.rs @@ -4,5 +4,5 @@ trait Foo {} fn take_foo(f: F) {} fn take_object(f: Box) { take_foo(f); } -//~^ ERROR `std::boxed::Box: Foo` is not satisfied +//~^ ERROR `Box: Foo` is not satisfied fn main() {} diff --git a/src/test/ui/object-does-not-impl-trait.stderr b/src/test/ui/object-does-not-impl-trait.stderr index 1d3675bf1c1..44424bc4ae7 100644 --- a/src/test/ui/object-does-not-impl-trait.stderr +++ b/src/test/ui/object-does-not-impl-trait.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `std::boxed::Box: Foo` is not satisfied +error[E0277]: the trait bound `Box: Foo` is not satisfied --> $DIR/object-does-not-impl-trait.rs:6:44 | LL | fn take_foo(f: F) {} | --- required by this bound in `take_foo` LL | fn take_object(f: Box) { take_foo(f); } - | ^ the trait `Foo` is not implemented for `std::boxed::Box` + | ^ the trait `Foo` is not implemented for `Box` error: aborting due to previous error diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr index 9563c0dff36..ae02c58d080 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.nll.stderr @@ -11,7 +11,7 @@ error[E0507]: cannot move out of `ss.r` which is behind a mutable reference --> $DIR/object-lifetime-default-from-box-error.rs:18:5 | LL | ss.r - | ^^^^ move occurs because `ss.r` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^^^^ move occurs because `ss.r` has type `Box`, which does not implement the `Copy` trait error[E0621]: explicit lifetime required in the type of `ss` --> $DIR/object-lifetime-default-from-box-error.rs:31:5 diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr index 86ec58d3f06..a789c4906ef 100644 --- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr +++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | ss.t = t; | ^ lifetime mismatch | - = note: expected reference `&'a std::boxed::Box<(dyn Test + 'static)>` - found reference `&'a std::boxed::Box<(dyn Test + 'a)>` + = note: expected reference `&'a Box<(dyn Test + 'static)>` + found reference `&'a Box<(dyn Test + 'a)>` note: the lifetime `'a` as defined on the function body at 14:6... --> $DIR/object-lifetime-default-from-rptr-box-error.rs:14:6 | diff --git a/src/test/ui/object-pointer-types.stderr b/src/test/ui/object-pointer-types.stderr index 021aa8670f7..a477425edc8 100644 --- a/src/test/ui/object-pointer-types.stderr +++ b/src/test/ui/object-pointer-types.stderr @@ -16,11 +16,11 @@ LL | fn owned(self: Box); LL | x.owned(); | ^^^^^ method not found in `&mut dyn Foo` -error[E0599]: no method named `managed` found for struct `std::boxed::Box<(dyn Foo + 'static)>` in the current scope +error[E0599]: no method named `managed` found for struct `Box<(dyn Foo + 'static)>` in the current scope --> $DIR/object-pointer-types.rs:23:7 | LL | x.managed(); - | ^^^^^^^ method not found in `std::boxed::Box<(dyn Foo + 'static)>` + | ^^^^^^^ method not found in `Box<(dyn Foo + 'static)>` error: aborting due to 3 previous errors diff --git a/src/test/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr index e2a95d95a13..c32038b5a27 100644 --- a/src/test/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-associated-consts.object_safe_for_dispatch.stderr @@ -10,7 +10,7 @@ LL | t | ^ the trait `Bar` cannot be made into an object | = help: consider moving `X` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Bar>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` = note: required by cast to type `&dyn Bar` error: aborting due to previous error diff --git a/src/test/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr index 7443d38470c..7c104fa158d 100644 --- a/src/test/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-generics.object_safe_for_dispatch.stderr @@ -10,7 +10,7 @@ LL | t | ^ the trait `Bar` cannot be made into an object | = help: consider moving `bar` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Bar>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` = note: required by cast to type `&dyn Bar` error[E0038]: the trait `Bar` cannot be made into an object @@ -25,7 +25,7 @@ LL | t as &dyn Bar | ^ the trait `Bar` cannot be made into an object | = help: consider moving `bar` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Bar>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` = note: required by cast to type `&dyn Bar` error: aborting due to 2 previous errors diff --git a/src/test/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr index 89b273fb8ad..ced26889ba0 100644 --- a/src/test/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-mentions-Self.object_safe_for_dispatch.stderr @@ -10,7 +10,7 @@ LL | t | ^ the trait `Bar` cannot be made into an object | = help: consider moving `bar` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Bar>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` = note: required by cast to type `&dyn Bar` error[E0038]: the trait `Baz` cannot be made into an object @@ -25,7 +25,7 @@ LL | t | ^ the trait `Baz` cannot be made into an object | = help: consider moving `baz` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Baz>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Baz>` for `&T` = note: required by cast to type `&dyn Baz` error: aborting due to 2 previous errors diff --git a/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr index de56843962b..8e920697d8f 100644 --- a/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr @@ -9,8 +9,8 @@ LL | fn foo() {} LL | let b: Box = Box::new(Bar); | ^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::boxed::Box` - = note: required by cast to type `std::boxed::Box` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Box` + = note: required by cast to type `Box` help: consider turning `foo` into a method by giving it a `&self` argument or constraining it so it does not apply to trait objects | LL | fn foo() where Self: Sized {} diff --git a/src/test/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr index 2f1f06f4cf5..cc0463f5d87 100644 --- a/src/test/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-sized-2.object_safe_for_dispatch.stderr @@ -9,7 +9,7 @@ LL | where Self : Sized LL | t | ^ the trait `Bar` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Bar>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` = note: required by cast to type `&dyn Bar` error: aborting due to previous error diff --git a/src/test/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr b/src/test/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr index 58c2b772147..aceacac2db3 100644 --- a/src/test/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr +++ b/src/test/ui/object-safety/object-safety-sized.object_safe_for_dispatch.stderr @@ -9,7 +9,7 @@ LL | trait Bar : Sized { LL | t | ^ the trait `Bar` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Bar>` for `&T` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Bar>` for `&T` = note: required by cast to type `&dyn Bar` error: aborting due to previous error diff --git a/src/test/ui/on-unimplemented/no-debug.rs b/src/test/ui/on-unimplemented/no-debug.rs index 45c9ea46fa2..bdc80c5b357 100644 --- a/src/test/ui/on-unimplemented/no-debug.rs +++ b/src/test/ui/on-unimplemented/no-debug.rs @@ -10,7 +10,7 @@ fn main() { println!("{:?} {:?}", Foo, Bar); println!("{} {}", Foo, Bar); } -//~^^^ ERROR `Foo` doesn't implement `std::fmt::Debug` -//~| ERROR `no_debug::Bar` doesn't implement `std::fmt::Debug` +//~^^^ ERROR `Foo` doesn't implement `Debug` +//~| ERROR `Bar` doesn't implement `Debug` //~^^^^ ERROR `Foo` doesn't implement `std::fmt::Display` -//~| ERROR `no_debug::Bar` doesn't implement `std::fmt::Display` +//~| ERROR `Bar` doesn't implement `std::fmt::Display` diff --git a/src/test/ui/on-unimplemented/no-debug.stderr b/src/test/ui/on-unimplemented/no-debug.stderr index 4f9d428546b..2382fd84843 100644 --- a/src/test/ui/on-unimplemented/no-debug.stderr +++ b/src/test/ui/on-unimplemented/no-debug.stderr @@ -1,21 +1,21 @@ -error[E0277]: `Foo` doesn't implement `std::fmt::Debug` +error[E0277]: `Foo` doesn't implement `Debug` --> $DIR/no-debug.rs:10:27 | LL | println!("{:?} {:?}", Foo, Bar); | ^^^ `Foo` cannot be formatted using `{:?}` | - = help: the trait `std::fmt::Debug` is not implemented for `Foo` - = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` + = help: the trait `Debug` is not implemented for `Foo` + = note: add `#[derive(Debug)]` or manually implement `Debug` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Debug` +error[E0277]: `Bar` doesn't implement `Debug` --> $DIR/no-debug.rs:10:32 | LL | println!("{:?} {:?}", Foo, Bar); - | ^^^ `no_debug::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^ `Bar` cannot be formatted using `{:?}` because it doesn't implement `Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `no_debug::Bar` + = help: the trait `Debug` is not implemented for `Bar` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -30,13 +30,13 @@ LL | println!("{} {}", Foo, Bar); = note: required by `std::fmt::Display::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: `no_debug::Bar` doesn't implement `std::fmt::Display` +error[E0277]: `Bar` doesn't implement `std::fmt::Display` --> $DIR/no-debug.rs:11:28 | LL | println!("{} {}", Foo, Bar); - | ^^^ `no_debug::Bar` cannot be formatted with the default formatter + | ^^^ `Bar` cannot be formatted with the default formatter | - = help: the trait `std::fmt::Display` is not implemented for `no_debug::Bar` + = help: the trait `std::fmt::Display` is not implemented for `Bar` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: required by `std::fmt::Display::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/on-unimplemented/on-trait.stderr b/src/test/ui/on-unimplemented/on-trait.stderr index be8efbf2ce4..00c8492abc6 100644 --- a/src/test/ui/on-unimplemented/on-trait.stderr +++ b/src/test/ui/on-unimplemented/on-trait.stderr @@ -1,24 +1,24 @@ -error[E0277]: the trait bound `std::option::Option>: MyFromIterator<&u8>` is not satisfied +error[E0277]: the trait bound `Option>: MyFromIterator<&u8>` is not satisfied --> $DIR/on-trait.rs:28:30 | LL | fn collect, B: MyFromIterator>(it: I) -> B { | ----------------- required by this bound in `collect` ... LL | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() - | ^^^^^^^ a collection of type `std::option::Option>` cannot be built from an iterator over elements of type `&u8` + | ^^^^^^^ a collection of type `Option>` cannot be built from an iterator over elements of type `&u8` | - = help: the trait `MyFromIterator<&u8>` is not implemented for `std::option::Option>` + = help: the trait `MyFromIterator<&u8>` is not implemented for `Option>` -error[E0277]: the trait bound `std::string::String: Bar::Foo` is not satisfied +error[E0277]: the trait bound `String: Foo` is not satisfied --> $DIR/on-trait.rs:31:21 | LL | fn foobar>() -> T { | --------------- required by this bound in `foobar` ... LL | let x: String = foobar(); - | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo` + | ^^^^^^ test error `String` with `u8` `_` `u32` in `Foo` | - = help: the trait `Bar::Foo` is not implemented for `std::string::String` + = help: the trait `Foo` is not implemented for `String` error: aborting due to 2 previous errors diff --git a/src/test/ui/on-unimplemented/slice-index.stderr b/src/test/ui/on-unimplemented/slice-index.stderr index 25a65460071..44b8b0d8d84 100644 --- a/src/test/ui/on-unimplemented/slice-index.stderr +++ b/src/test/ui/on-unimplemented/slice-index.stderr @@ -4,17 +4,17 @@ error[E0277]: the type `[i32]` cannot be indexed by `i32` LL | x[1i32]; | ^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `i32` - = note: required because of the requirements on the impl of `std::ops::Index` for `[i32]` + = help: the trait `SliceIndex<[i32]>` is not implemented for `i32` + = note: required because of the requirements on the impl of `Index` for `[i32]` -error[E0277]: the type `[i32]` cannot be indexed by `std::ops::RangeTo` +error[E0277]: the type `[i32]` cannot be indexed by `RangeTo` --> $DIR/slice-index.rs:9:5 | LL | x[..1i32]; | ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize` | - = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `std::ops::RangeTo` - = note: required because of the requirements on the impl of `std::ops::Index>` for `[i32]` + = help: the trait `SliceIndex<[i32]>` is not implemented for `RangeTo` + = note: required because of the requirements on the impl of `Index>` for `[i32]` error: aborting due to 2 previous errors diff --git a/src/test/ui/option-to-result.stderr b/src/test/ui/option-to-result.stderr index 5fa06778389..551b9f4650a 100644 --- a/src/test/ui/option-to-result.stderr +++ b/src/test/ui/option-to-result.stderr @@ -5,26 +5,26 @@ LL | fn test_result() -> Result<(),()> { | ------------- expected `()` because of this LL | let a:Option<()> = Some(()); LL | a?; - | ^ the trait `std::convert::From` is not implemented for `()` + | ^ the trait `From` is not implemented for `()` | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait - = note: required by `std::convert::From::from` + = note: required by `from` help: consider converting the `Option` into a `Result` using `Option::ok_or` or `Option::ok_or_else` | LL | a.ok_or_else(|| /* error value */)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `?` couldn't convert the error to `std::option::NoneError` +error[E0277]: `?` couldn't convert the error to `NoneError` --> $DIR/option-to-result.rs:11:6 | LL | fn test_option() -> Option{ - | ----------- expected `std::option::NoneError` because of this + | ----------- expected `NoneError` because of this LL | let a:Result = Ok(5); LL | a?; - | ^ the trait `std::convert::From` is not implemented for `std::option::NoneError` + | ^ the trait `From` is not implemented for `NoneError` | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait - = note: required by `std::convert::From::from` + = note: required by `from` help: consider converting the `Result` into an `Option` using `Result::ok` | LL | a.ok()?; diff --git a/src/test/ui/or-patterns/exhaustiveness-non-exhaustive.stderr b/src/test/ui/or-patterns/exhaustiveness-non-exhaustive.stderr index 7e8bb731907..d3ae798ead5 100644 --- a/src/test/ui/or-patterns/exhaustiveness-non-exhaustive.stderr +++ b/src/test/ui/or-patterns/exhaustiveness-non-exhaustive.stderr @@ -23,7 +23,7 @@ LL | match (Some(0u8),) { | ^^^^^^^^^^^^ pattern `(Some(2_u8..=u8::MAX))` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `(std::option::Option,)` + = note: the matched value is of type `(Option,)` error: aborting due to 3 previous errors diff --git a/src/test/ui/or-patterns/or-patterns-binding-type-mismatch.stderr b/src/test/ui/or-patterns/or-patterns-binding-type-mismatch.stderr index 1dabb7c9754..00dba053a59 100644 --- a/src/test/ui/or-patterns/or-patterns-binding-type-mismatch.stderr +++ b/src/test/ui/or-patterns/or-patterns-binding-type-mismatch.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:13:39 | LL | match Blah::A(1, 1, 2) { - | ---------------- this expression has type `main::Blah` + | ---------------- this expression has type `Blah` LL | Blah::A(_, x, y) | Blah::B(x, y) => {} | - ^ expected `usize`, found `isize` | | @@ -14,7 +14,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:17:44 | LL | match Some(Blah::A(1, 1, 2)) { - | ---------------------- this expression has type `std::option::Option` + | ---------------------- this expression has type `Option` LL | Some(Blah::A(_, x, y) | Blah::B(x, y)) => {} | - ^ expected `usize`, found `isize` | | @@ -50,7 +50,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:26:41 | LL | match Some((0u8, Some((1u16, 2u32)))) { - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} | - ^ expected `u16`, found `u8` | | @@ -62,7 +62,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:26:50 | LL | match Some((0u8, Some((1u16, 2u32)))) { - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} | - ^ expected `u8`, found `u16` | | @@ -74,7 +74,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:26:59 | LL | match Some((0u8, Some((1u16, 2u32)))) { - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} | - ^ expected `u32`, found `u16` | | @@ -86,7 +86,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:26:62 | LL | match Some((0u8, Some((1u16, 2u32)))) { - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` LL | Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) => {} | - first introduced with type `u8` here ^ expected `u8`, found `u32` | @@ -96,7 +96,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:34:42 | LL | if let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2) { - | - ^ ---------------- this expression has type `main::Blah` + | - ^ ---------------- this expression has type `Blah` | | | | | expected `usize`, found `isize` | first introduced with type `usize` here @@ -107,7 +107,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:38:47 | LL | if let Some(Blah::A(_, x, y) | Blah::B(x, y)) = Some(Blah::A(1, 1, 2)) { - | - ^ ---------------------- this expression has type `std::option::Option` + | - ^ ---------------------- this expression has type `Option` | | | | | expected `usize`, found `isize` | first introduced with type `usize` here @@ -145,7 +145,7 @@ LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) | first introduced with type `u16` here ... LL | = Some((0u8, Some((1u16, 2u32)))) - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` | = note: a binding must have the same type in all alternatives @@ -158,7 +158,7 @@ LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) | first introduced with type `u8` here ... LL | = Some((0u8, Some((1u16, 2u32)))) - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` | = note: a binding must have the same type in all alternatives @@ -171,7 +171,7 @@ LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) | first introduced with type `u32` here ... LL | = Some((0u8, Some((1u16, 2u32)))) - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` | = note: a binding must have the same type in all alternatives @@ -182,7 +182,7 @@ LL | if let Some((x, Some((y, z)))) | Some((y, Some((x, z) | (z, x)))) | - first introduced with type `u8` here ^ expected `u8`, found `u32` ... LL | = Some((0u8, Some((1u16, 2u32)))) - | ------------------------------- this expression has type `std::option::Option<(u8, std::option::Option<(u16, u32)>)>` + | ------------------------------- this expression has type `Option<(u8, Option<(u16, u32)>)>` | = note: a binding must have the same type in all alternatives @@ -190,7 +190,7 @@ error[E0308]: mismatched types --> $DIR/or-patterns-binding-type-mismatch.rs:55:39 | LL | let Blah::A(_, x, y) | Blah::B(x, y) = Blah::A(1, 1, 2); - | - ^ ---------------- this expression has type `main::Blah` + | - ^ ---------------- this expression has type `Blah` | | | | | expected `usize`, found `isize` | first introduced with type `usize` here diff --git a/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr b/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr index 6cbb59dc220..861d274ab5c 100644 --- a/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr +++ b/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr @@ -112,7 +112,7 @@ error[E0308]: mismatched types LL | let recovery_witness: String = 0; | ------ ^ | | | - | | expected struct `std::string::String`, found integer + | | expected struct `String`, found integer | | help: try using a conversion method: `0.to_string()` | expected due to this diff --git a/src/test/ui/paren-span.rs b/src/test/ui/paren-span.rs index 24fadb24de2..c8cb63d5190 100644 --- a/src/test/ui/paren-span.rs +++ b/src/test/ui/paren-span.rs @@ -16,6 +16,6 @@ mod m { fn main() { let s = m::make(); - paren!(s.x); //~ ERROR field `x` of struct `m::S` is private + paren!(s.x); //~ ERROR field `x` of struct `S` is private // ^^^ highlight here } diff --git a/src/test/ui/paren-span.stderr b/src/test/ui/paren-span.stderr index ca22401f45b..fc313715765 100644 --- a/src/test/ui/paren-span.stderr +++ b/src/test/ui/paren-span.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `x` of struct `m::S` is private +error[E0616]: field `x` of struct `S` is private --> $DIR/paren-span.rs:19:14 | LL | paren!(s.x); diff --git a/src/test/ui/parser/fn-header-semantic-fail.stderr b/src/test/ui/parser/fn-header-semantic-fail.stderr index d6b36fbb714..4193b3ee695 100644 --- a/src/test/ui/parser/fn-header-semantic-fail.stderr +++ b/src/test/ui/parser/fn-header-semantic-fail.stderr @@ -178,7 +178,7 @@ LL | async fn ft1() {} | expected `()`, found opaque type | = note: expected fn pointer `fn()` - found fn pointer `fn() -> impl std::future::Future` + found fn pointer `fn() -> impl Future` error[E0053]: method `ft5` has an incompatible type for trait --> $DIR/fn-header-semantic-fail.rs:34:48 @@ -193,7 +193,7 @@ LL | const async unsafe extern "C" fn ft5() {} | expected `()`, found opaque type | = note: expected fn pointer `unsafe extern "C" fn()` - found fn pointer `unsafe extern "C" fn() -> impl std::future::Future` + found fn pointer `unsafe extern "C" fn() -> impl Future` error: aborting due to 20 previous errors diff --git a/src/test/ui/parser/lex-bad-char-literals-6.stderr b/src/test/ui/parser/lex-bad-char-literals-6.stderr index 82c46ad82c7..48b8fc6a729 100644 --- a/src/test/ui/parser/lex-bad-char-literals-6.stderr +++ b/src/test/ui/parser/lex-bad-char-literals-6.stderr @@ -37,7 +37,7 @@ error[E0277]: can't compare `&str` with `char` LL | if x == y {} | ^^ no implementation for `&str == char` | - = help: the trait `std::cmp::PartialEq` is not implemented for `&str` + = help: the trait `PartialEq` is not implemented for `&str` error[E0308]: mismatched types --> $DIR/lex-bad-char-literals-6.rs:15:20 @@ -53,7 +53,7 @@ error[E0277]: can't compare `&str` with `char` LL | if x == z {} | ^^ no implementation for `&str == char` | - = help: the trait `std::cmp::PartialEq` is not implemented for `&str` + = help: the trait `PartialEq` is not implemented for `&str` error: aborting due to 6 previous errors diff --git a/src/test/ui/parser/removed-syntax-with-2.rs b/src/test/ui/parser/removed-syntax-with-2.rs index f666da49696..8a489e71990 100644 --- a/src/test/ui/parser/removed-syntax-with-2.rs +++ b/src/test/ui/parser/removed-syntax-with-2.rs @@ -7,5 +7,5 @@ fn main() { let a = S { foo: (), bar: () }; let b = S { foo: (), with a }; //~^ ERROR expected one of `,` or `}`, found `a` - //~| ERROR missing field `bar` in initializer of `main::S` + //~| ERROR missing field `bar` in initializer of `S` } diff --git a/src/test/ui/parser/removed-syntax-with-2.stderr b/src/test/ui/parser/removed-syntax-with-2.stderr index 024c97cc9c1..2c96dceb587 100644 --- a/src/test/ui/parser/removed-syntax-with-2.stderr +++ b/src/test/ui/parser/removed-syntax-with-2.stderr @@ -6,7 +6,7 @@ LL | let b = S { foo: (), with a }; | | | while parsing this struct -error[E0063]: missing field `bar` in initializer of `main::S` +error[E0063]: missing field `bar` in initializer of `S` --> $DIR/removed-syntax-with-2.rs:8:13 | LL | let b = S { foo: (), with a }; diff --git a/src/test/ui/parser/struct-literal-in-for.stderr b/src/test/ui/parser/struct-literal-in-for.stderr index 2e59914864a..42f5f1e7e73 100644 --- a/src/test/ui/parser/struct-literal-in-for.stderr +++ b/src/test/ui/parser/struct-literal-in-for.stderr @@ -23,8 +23,8 @@ LL | | x: 3 LL | | }.hi() { | |__________^ `bool` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `bool` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `bool` + = note: required by `into_iter` error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr index a32a27bf987..d63a50034c5 100644 --- a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr +++ b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr @@ -18,7 +18,7 @@ LL | let _: usize = unclosed_delim_mod::new(); | expected due to this | = note: expected type `usize` - found enum `std::result::Result` + found enum `std::result::Result` error: aborting due to 2 previous errors diff --git a/src/test/ui/partialeq_help.stderr b/src/test/ui/partialeq_help.stderr index 6acc09b62c8..6decbef1af4 100644 --- a/src/test/ui/partialeq_help.stderr +++ b/src/test/ui/partialeq_help.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `&T` with `T` LL | a == b; | ^^ no implementation for `&T == T` | - = help: the trait `std::cmp::PartialEq` is not implemented for `&T` + = help: the trait `PartialEq` is not implemented for `&T` error: aborting due to previous error diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr index 56613ee7618..d28edd11e12 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-move-and-move.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:14:13 | LL | let a @ b = U; - | ----^ - move occurs because value has type `main::U`, which does not implement the `Copy` trait + | ----^ - move occurs because value has type `U`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -11,7 +11,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:16:17 | LL | let a @ (b, c) = (U, U); - | --------^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait + | --------^- ------ move occurs because value has type `(U, U)`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -20,7 +20,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:18:17 | LL | let a @ (b, c) = (u(), u()); - | --------^- ---------- move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait + | --------^- ---------- move occurs because value has type `(U, U)`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -29,7 +29,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:21:16 | LL | match Ok(U) { - | ----- move occurs because value has type `std::result::Result`, which does not implement the `Copy` trait + | ----- move occurs because value has type `std::result::Result`, which does not implement the `Copy` trait LL | a @ Ok(b) | a @ Err(b) => {} | -------^- | | | @@ -40,7 +40,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:21:29 | LL | match Ok(U) { - | ----- move occurs because value has type `std::result::Result`, which does not implement the `Copy` trait + | ----- move occurs because value has type `std::result::Result`, which does not implement the `Copy` trait LL | a @ Ok(b) | a @ Err(b) => {} | --------^- | | | @@ -51,7 +51,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:28:22 | LL | match [u(), u(), u(), u()] { - | -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait + | -------------------- move occurs because value has type `[U; 4]`, which does not implement the `Copy` trait LL | xs @ [a, .., b] => {} | -------------^- | | | @@ -62,7 +62,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-move-and-move.rs:32:18 | LL | match [u(), u(), u(), u()] { - | -------------------- move occurs because value has type `[main::U; 4]`, which does not implement the `Copy` trait + | -------------------- move occurs because value has type `[U; 4]`, which does not implement the `Copy` trait LL | xs @ [_, ys @ .., _] => {} | ---------^^^^^^^---- | | | @@ -77,7 +77,7 @@ LL | fn fun(a @ b: U) {} | | | | | value used here after move | value moved here - | move occurs because value has type `main::U`, which does not implement the `Copy` trait + | move occurs because value has type `U`, which does not implement the `Copy` trait error: aborting due to 8 previous errors diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr index 5ce546f08bf..44888369ab2 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-at-and-box.stderr @@ -74,7 +74,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-pat-at-and-box.rs:21:18 | LL | let a @ box &b = Box::new(&C); - | ---------^ ------------ move occurs because value has type `std::boxed::Box<&C>`, which does not implement the `Copy` trait + | ---------^ ------------ move occurs because value has type `Box<&C>`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -83,7 +83,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-pat-at-and-box.rs:24:17 | LL | let a @ box b = Box::new(C); - | --------^ ----------- move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait + | --------^ ----------- move occurs because value has type `Box`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -92,7 +92,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-pat-at-and-box.rs:34:17 | LL | match Box::new(C) { - | ----------- move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait + | ----------- move occurs because value has type `Box`, which does not implement the `Copy` trait LL | a @ box b => {} | --------^ | | | @@ -143,7 +143,7 @@ LL | fn f1(a @ box &b: Box<&C>) {} | | | | | value used here after move | value moved here - | move occurs because value has type `std::boxed::Box<&C>`, which does not implement the `Copy` trait + | move occurs because value has type `Box<&C>`, which does not implement the `Copy` trait error[E0382]: use of moved value --> $DIR/borrowck-pat-at-and-box.rs:30:19 @@ -153,7 +153,7 @@ LL | fn f2(a @ box b: Box) {} | | | | | value used here after move | value moved here - | move occurs because value has type `std::boxed::Box`, which does not implement the `Copy` trait + | move occurs because value has type `Box`, which does not implement the `Copy` trait error[E0502]: cannot borrow value as immutable because it is also borrowed as mutable --> $DIR/borrowck-pat-at-and-box.rs:58:27 diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr index 54900e958c2..dacf23f9ded 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse-promotion.stderr @@ -6,7 +6,7 @@ LL | let a @ ref b = U; | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `main::U` which does not implement the `Copy` trait + | move occurs because `a` has type `U` which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr index 5058998f2a7..86e09e55585 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr @@ -6,7 +6,7 @@ LL | let a @ ref b = U; | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `main::U` which does not implement the `Copy` trait + | move occurs because `a` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9 @@ -17,7 +17,7 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait + | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:14 @@ -27,7 +27,7 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | | | | | value borrowed here after move | value moved into `b` here - | move occurs because `b` has type `main::U` which does not implement the `Copy` trait + | move occurs because `b` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:33 @@ -37,7 +37,7 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | | | | | value borrowed here after move | value moved into `d` here - | move occurs because `d` has type `main::U` which does not implement the `Copy` trait + | move occurs because `d` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9 @@ -48,7 +48,7 @@ LL | let a @ [ref mut b, ref c] = [U, U]; | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `[main::U; 2]` which does not implement the `Copy` trait + | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:41:9 @@ -58,7 +58,7 @@ LL | let a @ ref b = u(); | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `main::U` which does not implement the `Copy` trait + | move occurs because `a` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:9 @@ -69,7 +69,7 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait + | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:14 @@ -79,7 +79,7 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | | | | | value borrowed here after move | value moved into `b` here - | move occurs because `b` has type `main::U` which does not implement the `Copy` trait + | move occurs because `b` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:33 @@ -89,7 +89,7 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | | | | | value borrowed here after move | value moved into `d` here - | move occurs because `d` has type `main::U` which does not implement the `Copy` trait + | move occurs because `d` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:51:9 @@ -100,7 +100,7 @@ LL | let a @ [ref mut b, ref c] = [u(), u()]; | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `[main::U; 2]` which does not implement the `Copy` trait + | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:56:9 @@ -110,7 +110,7 @@ LL | a @ Some(ref b) => {} | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `std::option::Option` which does not implement the `Copy` trait + | move occurs because `a` has type `Option` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9 @@ -121,7 +121,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `std::option::Option<(main::U, main::U)>` which does not implement the `Copy` trait + | move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:19 @@ -131,7 +131,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | | | | value borrowed here after move | value moved into `b` here - | move occurs because `b` has type `main::U` which does not implement the `Copy` trait + | move occurs because `b` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38 @@ -141,7 +141,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | | | | value borrowed here after move | value moved into `d` here - | move occurs because `d` has type `main::U` which does not implement the `Copy` trait + | move occurs because `d` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:9 @@ -152,7 +152,7 @@ LL | mut a @ Some([ref b, ref mut c]) => {} | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `std::option::Option<[main::U; 2]>` which does not implement the `Copy` trait + | move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:9 @@ -162,7 +162,7 @@ LL | a @ Some(ref b) => {} | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `std::option::Option` which does not implement the `Copy` trait + | move occurs because `a` has type `Option` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:9 @@ -173,7 +173,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `std::option::Option<(main::U, main::U)>` which does not implement the `Copy` trait + | move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:19 @@ -183,7 +183,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | | | | value borrowed here after move | value moved into `b` here - | move occurs because `b` has type `main::U` which does not implement the `Copy` trait + | move occurs because `b` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38 @@ -193,7 +193,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | | | | value borrowed here after move | value moved into `d` here - | move occurs because `d` has type `main::U` which does not implement the `Copy` trait + | move occurs because `d` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:9 @@ -204,7 +204,7 @@ LL | mut a @ Some([ref b, ref mut c]) => {} | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `std::option::Option<[main::U; 2]>` which does not implement the `Copy` trait + | move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11 @@ -214,7 +214,7 @@ LL | fn f1(a @ ref b: U) {} | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `main::U` which does not implement the `Copy` trait + | move occurs because `a` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:11 @@ -225,7 +225,7 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait + | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:20 @@ -235,7 +235,7 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | | | | | value borrowed here after move | value moved into `b` here - | move occurs because `b` has type `main::U` which does not implement the `Copy` trait + | move occurs because `b` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:31 @@ -245,7 +245,7 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | | | | | value borrowed here after move | value moved into `d` here - | move occurs because `d` has type `main::U` which does not implement the `Copy` trait + | move occurs because `d` has type `U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:25:11 @@ -256,7 +256,7 @@ LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {} | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `[main::U; 2]` which does not implement the `Copy` trait + | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:22 @@ -267,13 +267,13 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: use of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:33 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); - | ------------------------^^^^^^^^^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait + | ------------------------^^^^^^^^^- ------ move occurs because value has type `(U, U)`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -287,13 +287,13 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:25 | LL | let a @ [ref mut b, ref c] = [U, U]; - | ----------------^^^^^- ------ move occurs because value has type `[main::U; 2]`, which does not implement the `Copy` trait + | ----------------^^^^^- ------ move occurs because value has type `[U; 2]`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here @@ -302,7 +302,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:41:13 | LL | let a @ ref b = u(); - | ----^^^^^ --- move occurs because value has type `main::U`, which does not implement the `Copy` trait + | ----^^^^^ --- move occurs because value has type `U`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here @@ -316,13 +316,13 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: use of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:44:33 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); - | ------------------------^^^^^^^^^- ---------- move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait + | ------------------------^^^^^^^^^- ---------- move occurs because value has type `(U, U)`, which does not implement the `Copy` trait | | | | | value used here after move | value moved here @@ -336,13 +336,13 @@ LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:51:25 | LL | let a @ [ref mut b, ref c] = [u(), u()]; - | ----------------^^^^^- ---------- move occurs because value has type `[main::U; 2]`, which does not implement the `Copy` trait + | ----------------^^^^^- ---------- move occurs because value has type `[U; 2]`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here @@ -356,7 +356,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {} @@ -366,7 +366,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:38 | LL | match Some((U, U)) { - | ------------ move occurs because value has type `std::option::Option<(main::U, main::U)>`, which does not implement the `Copy` trait + | ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | -----------------------------^^^^^^^^^-- | | | @@ -382,7 +382,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {} @@ -392,7 +392,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:71:30 | LL | match Some([U, U]) { - | ------------ move occurs because value has type `std::option::Option<[main::U; 2]>`, which does not implement the `Copy` trait + | ------------ move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait LL | mut a @ Some([ref b, ref mut c]) => {} | ---------------------^^^^^^^^^-- | | | @@ -403,7 +403,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:77:18 | LL | match Some(u()) { - | --------- move occurs because value has type `std::option::Option`, which does not implement the `Copy` trait + | --------- move occurs because value has type `Option`, which does not implement the `Copy` trait LL | a @ Some(ref b) => {} | ---------^^^^^- | | | @@ -419,7 +419,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | a @ Some((ref mut b @ ref mut c, d @ ref e)) => {} @@ -429,7 +429,7 @@ error[E0382]: use of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:83:38 | LL | match Some((u(), u())) { - | ---------------- move occurs because value has type `std::option::Option<(main::U, main::U)>`, which does not implement the `Copy` trait + | ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | -----------------------------^^^^^^^^^-- | | | @@ -445,7 +445,7 @@ LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving the value | LL | a @ Some((mut b @ ref mut c, ref d @ ref e)) => {} @@ -455,7 +455,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:93:30 | LL | match Some([u(), u()]) { - | ---------------- move occurs because value has type `std::option::Option<[main::U; 2]>`, which does not implement the `Copy` trait + | ---------------- move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait LL | mut a @ Some([ref b, ref mut c]) => {} | ---------------------^^^^^^^^^-- | | | @@ -470,7 +470,7 @@ LL | fn f1(a @ ref b: U) {} | | | | | value borrowed here after move | value moved here - | move occurs because value has type `main::U`, which does not implement the `Copy` trait + | move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:24 @@ -481,7 +481,7 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: use of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:31 @@ -491,7 +491,7 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | | | | | value used here after move | value moved here - | move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait + | move occurs because value has type `(U, U)`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:18:39 @@ -502,7 +502,7 @@ LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | | value borrowed here after move | value moved here | - = note: move occurs because value has type `main::U`, which does not implement the `Copy` trait + = note: move occurs because value has type `U`, which does not implement the `Copy` trait error[E0382]: borrow of moved value --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:25:27 @@ -512,7 +512,7 @@ LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {} | | | | | value borrowed here after move | value moved here - | move occurs because value has type `[main::U; 2]`, which does not implement the `Copy` trait + | move occurs because value has type `[U; 2]`, which does not implement the `Copy` trait error: aborting due to 48 previous errors diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr index b161054414a..695da9639af 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-and-ref.stderr @@ -374,7 +374,7 @@ error[E0507]: cannot move out of `b` in pattern guard --> $DIR/borrowck-pat-ref-mut-and-ref.rs:103:66 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false } => {} - | ^ move occurs because `b` has type `&mut main::U`, which does not implement the `Copy` trait + | ^ move occurs because `b` has type `&mut U`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard @@ -382,7 +382,7 @@ error[E0507]: cannot move out of `b` in pattern guard --> $DIR/borrowck-pat-ref-mut-and-ref.rs:103:66 | LL | ref a @ Ok(ref mut b) | ref a @ Err(ref mut b) if { drop(b); false } => {} - | ^ move occurs because `b` has type `&mut main::U`, which does not implement the `Copy` trait + | ^ move occurs because `b` has type `&mut U`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard @@ -390,7 +390,7 @@ error[E0507]: cannot move out of `a` in pattern guard --> $DIR/borrowck-pat-ref-mut-and-ref.rs:111:66 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {} - | ^ move occurs because `a` has type `&mut std::result::Result`, which does not implement the `Copy` trait + | ^ move occurs because `a` has type `&mut std::result::Result`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard @@ -398,7 +398,7 @@ error[E0507]: cannot move out of `a` in pattern guard --> $DIR/borrowck-pat-ref-mut-and-ref.rs:111:66 | LL | ref mut a @ Ok(ref b) | ref mut a @ Err(ref b) if { drop(a); false } => {} - | ^ move occurs because `a` has type `&mut std::result::Result`, which does not implement the `Copy` trait + | ^ move occurs because `a` has type `&mut std::result::Result`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard diff --git a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr index ae7c8f38e1e..1cd3e267b99 100644 --- a/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr +++ b/src/test/ui/pattern/bindings-after-at/borrowck-pat-ref-mut-twice.stderr @@ -96,7 +96,7 @@ LL | let a @ (ref mut b, ref mut c) = (U, U); | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `(main::U, main::U)` which does not implement the `Copy` trait + | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:70:9 @@ -108,7 +108,7 @@ LL | let a @ (b, [c, d]) = &mut val; // Same as ^-- | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `&mut (main::U, [main::U; 2])` which does not implement the `Copy` trait + | move occurs because `a` has type `&mut (U, [U; 2])` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:74:9 @@ -118,7 +118,7 @@ LL | let a @ &mut ref mut b = &mut U; | | | | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `&mut main::U` which does not implement the `Copy` trait + | move occurs because `a` has type `&mut U` which does not implement the `Copy` trait error: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:77:9 @@ -129,7 +129,7 @@ LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U); | | | value borrowed here after move | | value borrowed here after move | value moved into `a` here - | move occurs because `a` has type `&mut (main::U, main::U)` which does not implement the `Copy` trait + | move occurs because `a` has type `&mut (U, U)` which does not implement the `Copy` trait error: cannot borrow value as mutable more than once at a time --> $DIR/borrowck-pat-ref-mut-twice.rs:82:9 @@ -286,7 +286,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:66:25 | LL | let a @ (ref mut b, ref mut c) = (U, U); - | ----------------^^^^^^^^^- ------ move occurs because value has type `(main::U, main::U)`, which does not implement the `Copy` trait + | ----------------^^^^^^^^^- ------ move occurs because value has type `(U, U)`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here @@ -295,7 +295,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:70:21 | LL | let a @ (b, [c, d]) = &mut val; // Same as ^-- - | ------------^-- -------- move occurs because value has type `&mut (main::U, [main::U; 2])`, which does not implement the `Copy` trait + | ------------^-- -------- move occurs because value has type `&mut (U, [U; 2])`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here @@ -304,7 +304,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:74:18 | LL | let a @ &mut ref mut b = &mut U; - | ---------^^^^^^^^^ ------ move occurs because value has type `&mut main::U`, which does not implement the `Copy` trait + | ---------^^^^^^^^^ ------ move occurs because value has type `&mut U`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here @@ -313,7 +313,7 @@ error[E0382]: borrow of moved value --> $DIR/borrowck-pat-ref-mut-twice.rs:77:30 | LL | let a @ &mut (ref mut b, ref mut c) = &mut (U, U); - | ---------------------^^^^^^^^^- ----------- move occurs because value has type `&mut (main::U, main::U)`, which does not implement the `Copy` trait + | ---------------------^^^^^^^^^- ----------- move occurs because value has type `&mut (U, U)`, which does not implement the `Copy` trait | | | | | value borrowed here after move | value moved here diff --git a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr index 141d667c746..a63a5a1e6c7 100644 --- a/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr +++ b/src/test/ui/pattern/bindings-after-at/default-binding-modes-both-sides-independent.stderr @@ -33,7 +33,7 @@ LL | Ok(ref a @ b) | Err(b @ ref a) => { | | | | | value borrowed here after move | value moved into `b` here - | move occurs because `b` has type `main::NotCopy` which does not implement the `Copy` trait + | move occurs because `b` has type `NotCopy` which does not implement the `Copy` trait error: cannot move out of value because it is borrowed --> $DIR/default-binding-modes-both-sides-independent.rs:44:9 diff --git a/src/test/ui/pattern/move-ref-patterns/feature-gate-move_ref_pattern.stderr b/src/test/ui/pattern/move-ref-patterns/feature-gate-move_ref_pattern.stderr index eb5391a95de..5335569a972 100644 --- a/src/test/ui/pattern/move-ref-patterns/feature-gate-move_ref_pattern.stderr +++ b/src/test/ui/pattern/move-ref-patterns/feature-gate-move_ref_pattern.stderr @@ -49,7 +49,7 @@ LL | let (a, mut b) = &tup; | ----- ^^^^ | | | data moved here - | move occurs because `b` has type `main::X`, which does not implement the `Copy` trait + | move occurs because `b` has type `X`, which does not implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/feature-gate-move_ref_pattern.rs:20:22 @@ -58,7 +58,7 @@ LL | let (mut a, b) = &mut tup; | ----- ^^^^^^^^ | | | data moved here - | move occurs because `a` has type `main::X`, which does not implement the `Copy` trait + | move occurs because `a` has type `X`, which does not implement the `Copy` trait error: aborting due to 6 previous errors diff --git a/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-inside.stderr b/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-inside.stderr index 9159e3e2213..9ad84879595 100644 --- a/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-inside.stderr +++ b/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-closure-captures-inside.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `tup0` --> $DIR/move-ref-patterns-closure-captures-inside.rs:33:10 | LL | let mut tup0 = (S, S); - | -------- move occurs because `tup0` has type `(main::S, main::S)`, which does not implement the `Copy` trait + | -------- move occurs because `tup0` has type `(S, S)`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -17,7 +17,7 @@ error[E0382]: borrow of moved value: `tup1` --> $DIR/move-ref-patterns-closure-captures-inside.rs:34:10 | LL | let mut tup1 = (S, S, S); - | -------- move occurs because `tup1` has type `(main::S, main::S, main::S)`, which does not implement the `Copy` trait + | -------- move occurs because `tup1` has type `(S, S, S)`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -32,7 +32,7 @@ error[E0382]: borrow of moved value: `tup2` --> $DIR/move-ref-patterns-closure-captures-inside.rs:35:10 | LL | let tup2 = (S, S); - | ---- move occurs because `tup2` has type `(main::S, main::S)`, which does not implement the `Copy` trait + | ---- move occurs because `tup2` has type `(S, S)`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -47,7 +47,7 @@ error[E0382]: borrow of moved value: `tup3` --> $DIR/move-ref-patterns-closure-captures-inside.rs:36:10 | LL | let tup3 = (S, S, S); - | ---- move occurs because `tup3` has type `(main::S, main::S, main::S)`, which does not implement the `Copy` trait + | ---- move occurs because `tup3` has type `(S, S, S)`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -62,7 +62,7 @@ error[E0382]: borrow of moved value: `tup4` --> $DIR/move-ref-patterns-closure-captures-inside.rs:41:10 | LL | let tup4 = (S, S); - | ---- move occurs because `tup4` has type `(main::S, main::S)`, which does not implement the `Copy` trait + | ---- move occurs because `tup4` has type `(S, S)`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -77,7 +77,7 @@ error[E0382]: borrow of moved value: `arr0` --> $DIR/move-ref-patterns-closure-captures-inside.rs:43:10 | LL | let mut arr0 = [S, S, S]; - | -------- move occurs because `arr0` has type `[main::S; 3]`, which does not implement the `Copy` trait + | -------- move occurs because `arr0` has type `[S; 3]`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -92,7 +92,7 @@ error[E0382]: borrow of moved value: `arr1` --> $DIR/move-ref-patterns-closure-captures-inside.rs:44:36 | LL | let mut arr1 = [S, S, S, S, S]; - | -------- move occurs because `arr1` has type `[main::S; 5]`, which does not implement the `Copy` trait + | -------- move occurs because `arr1` has type `[S; 5]`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -107,7 +107,7 @@ error[E0382]: borrow of moved value: `arr2` --> $DIR/move-ref-patterns-closure-captures-inside.rs:45:10 | LL | let arr2 = [S, S, S]; - | ---- move occurs because `arr2` has type `[main::S; 3]`, which does not implement the `Copy` trait + | ---- move occurs because `arr2` has type `[S; 3]`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -122,7 +122,7 @@ error[E0382]: borrow of moved value: `arr3` --> $DIR/move-ref-patterns-closure-captures-inside.rs:46:36 | LL | let arr3 = [S, S, S, S, S]; - | ---- move occurs because `arr3` has type `[main::S; 5]`, which does not implement the `Copy` trait + | ---- move occurs because `arr3` has type `[S; 5]`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -137,7 +137,7 @@ error[E0382]: borrow of moved value: `tup0` --> $DIR/move-ref-patterns-closure-captures-inside.rs:77:10 | LL | let mut tup0: Option<(S, S)> = None; - | -------- move occurs because `tup0` has type `std::option::Option<(main::S, main::S)>`, which does not implement the `Copy` trait + | -------- move occurs because `tup0` has type `Option<(S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -151,7 +151,7 @@ error[E0382]: borrow of moved value: `tup1` --> $DIR/move-ref-patterns-closure-captures-inside.rs:78:10 | LL | let mut tup1: Option<(S, S, S)> = None; - | -------- move occurs because `tup1` has type `std::option::Option<(main::S, main::S, main::S)>`, which does not implement the `Copy` trait + | -------- move occurs because `tup1` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -166,7 +166,7 @@ error[E0382]: borrow of moved value: `tup2` --> $DIR/move-ref-patterns-closure-captures-inside.rs:79:10 | LL | let tup2: Option<(S, S)> = None; - | ---- move occurs because `tup2` has type `std::option::Option<(main::S, main::S)>`, which does not implement the `Copy` trait + | ---- move occurs because `tup2` has type `Option<(S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -181,7 +181,7 @@ error[E0382]: borrow of moved value: `tup3` --> $DIR/move-ref-patterns-closure-captures-inside.rs:80:10 | LL | let tup3: Option<(S, S, S)> = None; - | ---- move occurs because `tup3` has type `std::option::Option<(main::S, main::S, main::S)>`, which does not implement the `Copy` trait + | ---- move occurs because `tup3` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -196,7 +196,7 @@ error[E0382]: borrow of moved value: `tup4` --> $DIR/move-ref-patterns-closure-captures-inside.rs:81:21 | LL | let tup4: Option<(S, S)> = None; - | ---- move occurs because `tup4` has type `std::option::Option<(main::S, main::S)>`, which does not implement the `Copy` trait + | ---- move occurs because `tup4` has type `Option<(S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -211,7 +211,7 @@ error[E0382]: borrow of moved value: `arr0` --> $DIR/move-ref-patterns-closure-captures-inside.rs:82:10 | LL | let mut arr0: Option<[S; 3]> = None; - | -------- move occurs because `arr0` has type `std::option::Option<[main::S; 3]>`, which does not implement the `Copy` trait + | -------- move occurs because `arr0` has type `Option<[S; 3]>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -226,7 +226,7 @@ error[E0382]: borrow of moved value: `arr1` --> $DIR/move-ref-patterns-closure-captures-inside.rs:83:35 | LL | let mut arr1: Option<[S; 5]> = None; - | -------- move occurs because `arr1` has type `std::option::Option<[main::S; 5]>`, which does not implement the `Copy` trait + | -------- move occurs because `arr1` has type `Option<[S; 5]>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -241,7 +241,7 @@ error[E0382]: borrow of moved value: `arr2` --> $DIR/move-ref-patterns-closure-captures-inside.rs:84:10 | LL | let arr2: Option<[S; 3]> = None; - | ---- move occurs because `arr2` has type `std::option::Option<[main::S; 3]>`, which does not implement the `Copy` trait + | ---- move occurs because `arr2` has type `Option<[S; 3]>`, which does not implement the `Copy` trait LL | let arr3: Option<[S; 5]> = None; LL | let mut closure = || { | -- value moved into closure here @@ -256,7 +256,7 @@ error[E0382]: borrow of moved value: `arr3` --> $DIR/move-ref-patterns-closure-captures-inside.rs:85:35 | LL | let arr3: Option<[S; 5]> = None; - | ---- move occurs because `arr3` has type `std::option::Option<[main::S; 5]>`, which does not implement the `Copy` trait + | ---- move occurs because `arr3` has type `Option<[S; 5]>`, which does not implement the `Copy` trait LL | let mut closure = || { | -- value moved into closure here ... @@ -270,7 +270,7 @@ error[E0382]: borrow of moved value: `tup0` --> $DIR/move-ref-patterns-closure-captures-inside.rs:113:10 | LL | let mut tup0: Option<(S, S)> = None; - | -------- move occurs because `tup0` has type `std::option::Option<(main::S, main::S)>`, which does not implement the `Copy` trait + | -------- move occurs because `tup0` has type `Option<(S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -284,7 +284,7 @@ error[E0382]: borrow of moved value: `tup1` --> $DIR/move-ref-patterns-closure-captures-inside.rs:114:10 | LL | let mut tup1: Option<(S, S, S)> = None; - | -------- move occurs because `tup1` has type `std::option::Option<(main::S, main::S, main::S)>`, which does not implement the `Copy` trait + | -------- move occurs because `tup1` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -299,7 +299,7 @@ error[E0382]: borrow of moved value: `tup2` --> $DIR/move-ref-patterns-closure-captures-inside.rs:115:10 | LL | let tup2: Option<(S, S)> = None; - | ---- move occurs because `tup2` has type `std::option::Option<(main::S, main::S)>`, which does not implement the `Copy` trait + | ---- move occurs because `tup2` has type `Option<(S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -314,7 +314,7 @@ error[E0382]: borrow of moved value: `tup3` --> $DIR/move-ref-patterns-closure-captures-inside.rs:116:10 | LL | let tup3: Option<(S, S, S)> = None; - | ---- move occurs because `tup3` has type `std::option::Option<(main::S, main::S, main::S)>`, which does not implement the `Copy` trait + | ---- move occurs because `tup3` has type `Option<(S, S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -329,7 +329,7 @@ error[E0382]: borrow of moved value: `tup4` --> $DIR/move-ref-patterns-closure-captures-inside.rs:117:21 | LL | let tup4: Option<(S, S)> = None; - | ---- move occurs because `tup4` has type `std::option::Option<(main::S, main::S)>`, which does not implement the `Copy` trait + | ---- move occurs because `tup4` has type `Option<(S, S)>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -344,7 +344,7 @@ error[E0382]: borrow of moved value: `arr0` --> $DIR/move-ref-patterns-closure-captures-inside.rs:118:10 | LL | let mut arr0: Option<[S; 3]> = None; - | -------- move occurs because `arr0` has type `std::option::Option<[main::S; 3]>`, which does not implement the `Copy` trait + | -------- move occurs because `arr0` has type `Option<[S; 3]>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -359,7 +359,7 @@ error[E0382]: borrow of moved value: `arr1` --> $DIR/move-ref-patterns-closure-captures-inside.rs:119:35 | LL | let mut arr1: Option<[S; 5]> = None; - | -------- move occurs because `arr1` has type `std::option::Option<[main::S; 5]>`, which does not implement the `Copy` trait + | -------- move occurs because `arr1` has type `Option<[S; 5]>`, which does not implement the `Copy` trait ... LL | let mut closure = || { | -- value moved into closure here @@ -374,7 +374,7 @@ error[E0382]: borrow of moved value: `arr2` --> $DIR/move-ref-patterns-closure-captures-inside.rs:120:10 | LL | let arr2: Option<[S; 3]> = None; - | ---- move occurs because `arr2` has type `std::option::Option<[main::S; 3]>`, which does not implement the `Copy` trait + | ---- move occurs because `arr2` has type `Option<[S; 3]>`, which does not implement the `Copy` trait LL | let arr3: Option<[S; 5]> = None; LL | let mut closure = || { | -- value moved into closure here @@ -389,7 +389,7 @@ error[E0382]: borrow of moved value: `arr3` --> $DIR/move-ref-patterns-closure-captures-inside.rs:121:35 | LL | let arr3: Option<[S; 5]> = None; - | ---- move occurs because `arr3` has type `std::option::Option<[main::S; 5]>`, which does not implement the `Copy` trait + | ---- move occurs because `arr3` has type `Option<[S; 5]>`, which does not implement the `Copy` trait LL | let mut closure = || { | -- value moved into closure here ... diff --git a/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr b/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr index fe7f71e6c46..f92699f5c3c 100644 --- a/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr +++ b/src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.stderr @@ -5,7 +5,7 @@ LL | let (a, mut b) = &p; | ----- ^^ | | | data moved here - | move occurs because `b` has type `main::U`, which does not implement the `Copy` trait + | move occurs because `b` has type `U`, which does not implement the `Copy` trait error[E0507]: cannot move out of a mutable reference --> $DIR/move-ref-patterns-default-binding-modes.rs:14:22 @@ -14,7 +14,7 @@ LL | let (a, mut b) = &mut p; | ----- ^^^^^^ | | | data moved here - | move occurs because `b` has type `main::U`, which does not implement the `Copy` trait + | move occurs because `b` has type `U`, which does not implement the `Copy` trait error: aborting due to 2 previous errors diff --git a/src/test/ui/pattern/pat-type-err-formal-param.stderr b/src/test/ui/pattern/pat-type-err-formal-param.stderr index 2d7eb62faef..206713a4bfc 100644 --- a/src/test/ui/pattern/pat-type-err-formal-param.stderr +++ b/src/test/ui/pattern/pat-type-err-formal-param.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn foo(Tuple(_): String) {} | ^^^^^^^^ ------ expected due to this | | - | expected struct `std::string::String`, found struct `Tuple` + | expected struct `String`, found struct `Tuple` error: aborting due to previous error diff --git a/src/test/ui/pattern/pat-type-err-let-stmt.stderr b/src/test/ui/pattern/pat-type-err-let-stmt.stderr index d75fa3f247c..42258cfc1ae 100644 --- a/src/test/ui/pattern/pat-type-err-let-stmt.stderr +++ b/src/test/ui/pattern/pat-type-err-let-stmt.stderr @@ -4,11 +4,11 @@ error[E0308]: mismatched types LL | let Ok(0): Option = 42u8; | ---------- ^^^^ | | | - | | expected enum `std::option::Option`, found `u8` + | | expected enum `Option`, found `u8` | | help: try using a variant of the expected enum: `Some(42u8)` | expected due to this | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found type `u8` error[E0308]: mismatched types @@ -17,9 +17,9 @@ error[E0308]: mismatched types LL | let Ok(0): Option = 42u8; | ^^^^^ ---------- expected due to this | | - | expected enum `std::option::Option`, found enum `std::result::Result` + | expected enum `Option`, found enum `std::result::Result` | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found enum `std::result::Result<_, _>` error[E0308]: mismatched types @@ -28,9 +28,9 @@ error[E0308]: mismatched types LL | let Ok(0): Option; | ^^^^^ ---------- expected due to this | | - | expected enum `std::option::Option`, found enum `std::result::Result` + | expected enum `Option`, found enum `std::result::Result` | - = note: expected enum `std::option::Option` + = note: expected enum `Option` found enum `std::result::Result<_, _>` error[E0308]: mismatched types diff --git a/src/test/ui/pattern/pattern-ident-path-generics.stderr b/src/test/ui/pattern/pattern-ident-path-generics.stderr index 24b5cdf98d5..01b082bd35b 100644 --- a/src/test/ui/pattern/pattern-ident-path-generics.stderr +++ b/src/test/ui/pattern/pattern-ident-path-generics.stderr @@ -2,12 +2,12 @@ error[E0308]: mismatched types --> $DIR/pattern-ident-path-generics.rs:3:9 | LL | match Some("foo") { - | ----------- this expression has type `std::option::Option<&str>` + | ----------- this expression has type `Option<&str>` LL | None:: => {} | ^^^^^^^^^^^^^ expected `&str`, found `isize` | - = note: expected enum `std::option::Option<&str>` - found enum `std::option::Option` + = note: expected enum `Option<&str>` + found enum `Option` error: aborting due to previous error diff --git a/src/test/ui/pattern/pattern-tyvar-2.rs b/src/test/ui/pattern/pattern-tyvar-2.rs index 4c6d515b86a..532df4fa0cb 100644 --- a/src/test/ui/pattern/pattern-tyvar-2.rs +++ b/src/test/ui/pattern/pattern-tyvar-2.rs @@ -1,6 +1,6 @@ enum Bar { T1((), Option>), T2, } fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3; } _ => { panic!(); } } } -//~^ ERROR cannot multiply `{integer}` to `std::vec::Vec` +//~^ ERROR cannot multiply `{integer}` to `Vec` fn main() { } diff --git a/src/test/ui/pattern/pattern-tyvar-2.stderr b/src/test/ui/pattern/pattern-tyvar-2.stderr index 95662444640..e205cd9015e 100644 --- a/src/test/ui/pattern/pattern-tyvar-2.stderr +++ b/src/test/ui/pattern/pattern-tyvar-2.stderr @@ -1,10 +1,10 @@ -error[E0369]: cannot multiply `{integer}` to `std::vec::Vec` +error[E0369]: cannot multiply `{integer}` to `Vec` --> $DIR/pattern-tyvar-2.rs:3:71 | LL | fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3; } _ => { panic!(); } } } | - ^ - {integer} | | - | std::vec::Vec + | Vec error: aborting due to previous error diff --git a/src/test/ui/pattern/pattern-tyvar.stderr b/src/test/ui/pattern/pattern-tyvar.stderr index 15425da69bc..f1e2a9d72ce 100644 --- a/src/test/ui/pattern/pattern-tyvar.stderr +++ b/src/test/ui/pattern/pattern-tyvar.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | match t { | - this expression has type `Bar` LL | Bar::T1(_, Some::(x)) => { - | ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found `isize` + | ^^^^^^^^^^^^^^^^ expected struct `Vec`, found `isize` | - = note: expected enum `std::option::Option>` - found enum `std::option::Option` + = note: expected enum `Option>` + found enum `Option` error: aborting due to previous error diff --git a/src/test/ui/pattern/usefulness/exhaustive_integer_patterns.stderr b/src/test/ui/pattern/usefulness/exhaustive_integer_patterns.stderr index 161ac477183..de831520598 100644 --- a/src/test/ui/pattern/usefulness/exhaustive_integer_patterns.stderr +++ b/src/test/ui/pattern/usefulness/exhaustive_integer_patterns.stderr @@ -77,7 +77,7 @@ LL | match (0u8, Some(())) { | ^^^^^^^^^^^^^^^ patterns `(0_u8, Some(_))` and `(2_u8..=u8::MAX, Some(_))` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `(u8, std::option::Option<()>)` + = note: the matched value is of type `(u8, Option<()>)` error[E0004]: non-exhaustive patterns: `(126_u8..=127_u8, false)` not covered --> $DIR/exhaustive_integer_patterns.rs:126:11 diff --git a/src/test/ui/pattern/usefulness/issue-35609.stderr b/src/test/ui/pattern/usefulness/issue-35609.stderr index 66f904aced1..0598c8d6f38 100644 --- a/src/test/ui/pattern/usefulness/issue-35609.stderr +++ b/src/test/ui/pattern/usefulness/issue-35609.stderr @@ -74,7 +74,7 @@ LL | match Some(A) { | ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `std::option::Option` + = note: the matched value is of type `Option` error: aborting due to 8 previous errors diff --git a/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr b/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr index d541597508d..f515525123e 100644 --- a/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr +++ b/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr @@ -22,7 +22,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `std::option::Option>` + = note: the matched value is of type `Option>` error[E0004]: non-exhaustive patterns: `Foo { bar: Some(North), baz: NewBool(true) }` not covered --> $DIR/match-arm-statics-2.rs:48:11 diff --git a/src/test/ui/pattern/usefulness/match-privately-empty.stderr b/src/test/ui/pattern/usefulness/match-privately-empty.stderr index ca9006469e2..cd157debcd4 100644 --- a/src/test/ui/pattern/usefulness/match-privately-empty.stderr +++ b/src/test/ui/pattern/usefulness/match-privately-empty.stderr @@ -10,7 +10,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ---- not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `std::option::Option` + = note: the matched value is of type `Option` error: aborting due to previous error diff --git a/src/test/ui/pattern/usefulness/match-slice-patterns.stderr b/src/test/ui/pattern/usefulness/match-slice-patterns.stderr index ba5312d2135..88f27be0412 100644 --- a/src/test/ui/pattern/usefulness/match-slice-patterns.stderr +++ b/src/test/ui/pattern/usefulness/match-slice-patterns.stderr @@ -5,7 +5,7 @@ LL | match list { | ^^^^ pattern `&[_, Some(_), .., None, _]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `&[std::option::Option<()>]` + = note: the matched value is of type `&[Option<()>]` error: aborting due to previous error diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr b/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr index c9f26db6f1f..d1cab752102 100644 --- a/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr +++ b/src/test/ui/pattern/usefulness/non-exhaustive-match-nested.stderr @@ -5,7 +5,7 @@ LL | match (l1, l2) { | ^^^^^^^^ pattern `(Some(&[]), Err(_))` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `(std::option::Option<&[T]>, std::result::Result<&[T], ()>)` + = note: the matched value is of type `(Option<&[T]>, std::result::Result<&[T], ()>)` error[E0004]: non-exhaustive patterns: `A(C)` not covered --> $DIR/non-exhaustive-match-nested.rs:15:11 diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr b/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr index 5d29feb5626..12412743b83 100644 --- a/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr +++ b/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr @@ -34,7 +34,7 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ---- not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `std::option::Option` + = note: the matched value is of type `Option` error[E0004]: non-exhaustive patterns: `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered --> $DIR/non-exhaustive-match.rs:14:11 @@ -76,7 +76,7 @@ LL | match *vec { | ^^^^ pattern `[]` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `[std::option::Option]` + = note: the matched value is of type `[Option]` error[E0004]: non-exhaustive patterns: `[_, _, _, _, ..]` not covered --> $DIR/non-exhaustive-match.rs:46:11 diff --git a/src/test/ui/pattern/usefulness/refutable-pattern-errors.stderr b/src/test/ui/pattern/usefulness/refutable-pattern-errors.stderr index 8d0409a6af9..99af71cadfc 100644 --- a/src/test/ui/pattern/usefulness/refutable-pattern-errors.stderr +++ b/src/test/ui/pattern/usefulness/refutable-pattern-errors.stderr @@ -4,7 +4,7 @@ error[E0005]: refutable pattern in function argument: `(_, _)` not covered LL | fn func((1, (Some(1), 2..=3)): (isize, (Option, isize))) { } | ^^^^^^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered | - = note: the matched value is of type `(isize, (std::option::Option, isize))` + = note: the matched value is of type `(isize, (Option, isize))` error[E0005]: refutable pattern in local binding: `(i32::MIN..=0_i32, _)` and `(2_i32..=i32::MAX, _)` not covered --> $DIR/refutable-pattern-errors.rs:7:9 @@ -14,7 +14,7 @@ LL | let (1, (Some(1), 2..=3)) = (1, (None, 2)); | = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html - = note: the matched value is of type `(i32, (std::option::Option, i32))` + = note: the matched value is of type `(i32, (Option, i32))` help: you might want to use `if let` to ignore the variant that isn't matched | LL | if let (1, (Some(1), 2..=3)) = (1, (None, 2)) { /* */ } diff --git a/src/test/ui/phantom-oibit.stderr b/src/test/ui/phantom-oibit.stderr index e143747d637..8a02f23da94 100644 --- a/src/test/ui/phantom-oibit.stderr +++ b/src/test/ui/phantom-oibit.stderr @@ -8,12 +8,12 @@ LL | is_zen(x) | ^ `T` cannot be shared between threads safely | = note: required because of the requirements on the impl of `Zen` for `&T` - = note: required because it appears within the type `std::marker::PhantomData<&T>` + = note: required because it appears within the type `PhantomData<&T>` = note: required because it appears within the type `Guard<'_, T>` help: consider restricting type parameter `T` | -LL | fn not_sync(x: Guard) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn not_sync(x: Guard) { + | ^^^^^^ error[E0277]: `T` cannot be shared between threads safely --> $DIR/phantom-oibit.rs:26:12 @@ -25,13 +25,13 @@ LL | is_zen(x) | ^ `T` cannot be shared between threads safely | = note: required because of the requirements on the impl of `Zen` for `&T` - = note: required because it appears within the type `std::marker::PhantomData<&T>` + = note: required because it appears within the type `PhantomData<&T>` = note: required because it appears within the type `Guard<'_, T>` = note: required because it appears within the type `Nested>` help: consider restricting type parameter `T` | -LL | fn nested_not_sync(x: Nested>) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn nested_not_sync(x: Nested>) { + | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/privacy/associated-item-privacy-trait.rs b/src/test/ui/privacy/associated-item-privacy-trait.rs index b1482bc040f..b4e98debcf3 100644 --- a/src/test/ui/privacy/associated-item-privacy-trait.rs +++ b/src/test/ui/privacy/associated-item-privacy-trait.rs @@ -15,21 +15,21 @@ mod priv_trait { pub macro mac() { let value = ::method; - //~^ ERROR type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private + //~^ ERROR type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private value; - //~^ ERROR type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private + //~^ ERROR type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private Pub.method(); - //~^ ERROR type `for<'r> fn(&'r Self) {::method}` is private + //~^ ERROR type `for<'r> fn(&'r Self) {::method}` is private ::CONST; //~^ ERROR associated constant `::CONST` is private let _: ::AssocTy; //~^ ERROR associated type `::AssocTy` is private pub type InSignatureTy = ::AssocTy; - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private pub trait InSignatureTr: PrivTr {} - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private impl PrivTr for u8 {} - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private } } fn priv_trait() { diff --git a/src/test/ui/privacy/associated-item-privacy-trait.stderr b/src/test/ui/privacy/associated-item-privacy-trait.stderr index b9f3e35d722..8e58a2fa08d 100644 --- a/src/test/ui/privacy/associated-item-privacy-trait.stderr +++ b/src/test/ui/privacy/associated-item-privacy-trait.stderr @@ -1,4 +1,4 @@ -error: type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private +error: type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private --> $DIR/associated-item-privacy-trait.rs:17:21 | LL | let value = ::method; @@ -9,7 +9,7 @@ LL | priv_trait::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private +error: type `for<'r> fn(&'r priv_trait::Pub) {::method}` is private --> $DIR/associated-item-privacy-trait.rs:19:9 | LL | value; @@ -20,7 +20,7 @@ LL | priv_trait::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `for<'r> fn(&'r Self) {::method}` is private +error: type `for<'r> fn(&'r Self) {::method}` is private --> $DIR/associated-item-privacy-trait.rs:21:13 | LL | Pub.method(); @@ -53,7 +53,7 @@ LL | priv_trait::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:27:34 | LL | pub type InSignatureTy = ::AssocTy; @@ -64,7 +64,7 @@ LL | priv_trait::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:29:34 | LL | pub trait InSignatureTr: PrivTr {} @@ -75,7 +75,7 @@ LL | priv_trait::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-trait.rs:31:14 | LL | impl PrivTr for u8 {} diff --git a/src/test/ui/privacy/associated-item-privacy-type-binding.rs b/src/test/ui/privacy/associated-item-privacy-type-binding.rs index b9c526f5156..9826b83a35d 100644 --- a/src/test/ui/privacy/associated-item-privacy-type-binding.rs +++ b/src/test/ui/privacy/associated-item-privacy-type-binding.rs @@ -9,21 +9,21 @@ mod priv_trait { pub macro mac1() { let _: Box>; - //~^ ERROR trait `priv_trait::PrivTr` is private - //~| ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private + //~| ERROR trait `PrivTr` is private type InSignatureTy2 = Box>; - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private trait InSignatureTr2: PubTr {} - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private } pub macro mac2() { let _: Box>; - //~^ ERROR trait `priv_trait::PrivTr` is private - //~| ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private + //~| ERROR trait `PrivTr` is private type InSignatureTy1 = Box>; - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private trait InSignatureTr1: PrivTr {} - //~^ ERROR trait `priv_trait::PrivTr` is private + //~^ ERROR trait `PrivTr` is private } } fn priv_trait1() { @@ -42,19 +42,19 @@ mod priv_parent_substs { pub macro mac() { let _: Box>; - //~^ ERROR type `priv_parent_substs::Priv` is private - //~| ERROR type `priv_parent_substs::Priv` is private + //~^ ERROR type `Priv` is private + //~| ERROR type `Priv` is private let _: Box>; - //~^ ERROR type `priv_parent_substs::Priv` is private - //~| ERROR type `priv_parent_substs::Priv` is private + //~^ ERROR type `Priv` is private + //~| ERROR type `Priv` is private pub type InSignatureTy1 = Box>; - //~^ ERROR type `priv_parent_substs::Priv` is private + //~^ ERROR type `Priv` is private pub type InSignatureTy2 = Box>; - //~^ ERROR type `priv_parent_substs::Priv` is private + //~^ ERROR type `Priv` is private trait InSignatureTr1: PubTrWithParam {} - //~^ ERROR type `priv_parent_substs::Priv` is private + //~^ ERROR type `Priv` is private trait InSignatureTr2: PubTr {} - //~^ ERROR type `priv_parent_substs::Priv` is private + //~^ ERROR type `Priv` is private } } fn priv_parent_substs() { diff --git a/src/test/ui/privacy/associated-item-privacy-type-binding.stderr b/src/test/ui/privacy/associated-item-privacy-type-binding.stderr index d8515ccb669..5df2dfb871b 100644 --- a/src/test/ui/privacy/associated-item-privacy-type-binding.stderr +++ b/src/test/ui/privacy/associated-item-privacy-type-binding.stderr @@ -1,4 +1,4 @@ -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:11:13 | LL | let _: Box>; @@ -9,7 +9,7 @@ LL | priv_trait::mac1!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:11:16 | LL | let _: Box>; @@ -20,7 +20,7 @@ LL | priv_trait::mac1!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:14:31 | LL | type InSignatureTy2 = Box>; @@ -31,7 +31,7 @@ LL | priv_trait::mac1!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:16:31 | LL | trait InSignatureTr2: PubTr {} @@ -42,7 +42,7 @@ LL | priv_trait::mac1!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:20:13 | LL | let _: Box>; @@ -53,7 +53,7 @@ LL | priv_trait::mac2!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:20:16 | LL | let _: Box>; @@ -64,7 +64,7 @@ LL | priv_trait::mac2!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:23:31 | LL | type InSignatureTy1 = Box>; @@ -75,7 +75,7 @@ LL | priv_trait::mac2!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `priv_trait::PrivTr` is private +error: trait `PrivTr` is private --> $DIR/associated-item-privacy-type-binding.rs:25:31 | LL | trait InSignatureTr1: PrivTr {} @@ -86,7 +86,7 @@ LL | priv_trait::mac2!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:44:13 | LL | let _: Box>; @@ -97,7 +97,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:44:16 | LL | let _: Box>; @@ -108,7 +108,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:47:13 | LL | let _: Box>; @@ -119,7 +119,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:47:16 | LL | let _: Box>; @@ -130,7 +130,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:50:35 | LL | pub type InSignatureTy1 = Box>; @@ -141,7 +141,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:52:35 | LL | pub type InSignatureTy2 = Box>; @@ -152,7 +152,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:54:31 | LL | trait InSignatureTr1: PubTrWithParam {} @@ -163,7 +163,7 @@ LL | priv_parent_substs::mac!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `priv_parent_substs::Priv` is private +error: type `Priv` is private --> $DIR/associated-item-privacy-type-binding.rs:56:31 | LL | trait InSignatureTr2: PubTr {} diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.rs b/src/test/ui/privacy/private-in-public-assoc-ty.rs index cd7c37cb04b..5238894a974 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.rs +++ b/src/test/ui/privacy/private-in-public-assoc-ty.rs @@ -15,16 +15,16 @@ mod m { impl PubTrAux1 for u8 {} impl PubTrAux2 for u8 { type A = Priv; - //~^ ERROR private type `m::Priv` in public interface + //~^ ERROR private type `Priv` in public interface } // "Private-in-public in associated types is hard error" in RFC 2145 // applies only to the aliased types, not bounds. pub trait PubTr { - //~^ WARN private trait `m::PrivTr` in public interface + //~^ WARN private trait `PrivTr` in public interface //~| WARN this was previously accepted - //~| WARN private type `m::Priv` in public interface - //~| WARN private type `m::Priv` in public interface + //~| WARN private type `Priv` in public interface + //~| WARN private type `Priv` in public interface //~| WARN this was previously accepted //~| WARN this was previously accepted type Alias1: PrivTr; @@ -32,17 +32,17 @@ mod m { type Alias3: PubTrAux2 = u8; type Alias4 = Priv; - //~^ ERROR private type `m::Priv` in public interface + //~^ ERROR private type `Priv` in public interface type Exist; fn infer_exist() -> Self::Exist; } impl PubTr for u8 { type Alias1 = Priv; - //~^ ERROR private type `m::Priv` in public interface + //~^ ERROR private type `Priv` in public interface type Exist = impl PrivTr; - //~^ ERROR private trait `m::PrivTr` in public interface + //~^ ERROR private trait `PrivTr` in public interface fn infer_exist() -> Self::Exist { Priv } diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.stderr index 1a3ca3f16ed..acc6e20cf33 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.stderr @@ -1,13 +1,13 @@ -error[E0446]: private type `m::Priv` in public interface +error[E0446]: private type `Priv` in public interface --> $DIR/private-in-public-assoc-ty.rs:17:9 | LL | struct Priv; - | - `m::Priv` declared as private + | - `Priv` declared as private ... LL | type A = Priv; | ^^^^^^^^^^^^^^ can't leak private type -warning: private trait `m::PrivTr` in public interface (error E0445) +warning: private trait `PrivTr` in public interface (error E0445) --> $DIR/private-in-public-assoc-ty.rs:23:5 | LL | / pub trait PubTr { @@ -23,7 +23,7 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 -warning: private type `m::Priv` in public interface (error E0446) +warning: private type `Priv` in public interface (error E0446) --> $DIR/private-in-public-assoc-ty.rs:23:5 | LL | / pub trait PubTr { @@ -38,7 +38,7 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 -warning: private type `m::Priv` in public interface (error E0446) +warning: private type `Priv` in public interface (error E0446) --> $DIR/private-in-public-assoc-ty.rs:23:5 | LL | / pub trait PubTr { @@ -53,29 +53,29 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 -error[E0446]: private type `m::Priv` in public interface +error[E0446]: private type `Priv` in public interface --> $DIR/private-in-public-assoc-ty.rs:34:9 | LL | struct Priv; - | - `m::Priv` declared as private + | - `Priv` declared as private ... LL | type Alias4 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type -error[E0446]: private type `m::Priv` in public interface +error[E0446]: private type `Priv` in public interface --> $DIR/private-in-public-assoc-ty.rs:41:9 | LL | struct Priv; - | - `m::Priv` declared as private + | - `Priv` declared as private ... LL | type Alias1 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type -error[E0445]: private trait `m::PrivTr` in public interface +error[E0445]: private trait `PrivTr` in public interface --> $DIR/private-in-public-assoc-ty.rs:44:9 | LL | trait PrivTr {} - | - `m::PrivTr` declared as private + | - `PrivTr` declared as private ... LL | type Exist = impl PrivTr; | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait diff --git a/src/test/ui/privacy/private-in-public-non-principal-2.rs b/src/test/ui/privacy/private-in-public-non-principal-2.rs index cd3d609ca3e..effcb508e27 100644 --- a/src/test/ui/privacy/private-in-public-non-principal-2.rs +++ b/src/test/ui/privacy/private-in-public-non-principal-2.rs @@ -10,5 +10,5 @@ mod m { fn main() { m::leak_dyn_nonprincipal(); - //~^ ERROR trait `m::PrivNonPrincipal` is private + //~^ ERROR trait `PrivNonPrincipal` is private } diff --git a/src/test/ui/privacy/private-in-public-non-principal-2.stderr b/src/test/ui/privacy/private-in-public-non-principal-2.stderr index 7850694aab2..7cc8bf0de2b 100644 --- a/src/test/ui/privacy/private-in-public-non-principal-2.stderr +++ b/src/test/ui/privacy/private-in-public-non-principal-2.stderr @@ -1,4 +1,4 @@ -error: trait `m::PrivNonPrincipal` is private +error: trait `PrivNonPrincipal` is private --> $DIR/private-in-public-non-principal-2.rs:12:5 | LL | m::leak_dyn_nonprincipal(); diff --git a/src/test/ui/privacy/private-in-public-warn.rs b/src/test/ui/privacy/private-in-public-warn.rs index 467b8374670..3022b470b7d 100644 --- a/src/test/ui/privacy/private-in-public-warn.rs +++ b/src/test/ui/privacy/private-in-public-warn.rs @@ -247,12 +247,12 @@ mod aliases_priv { } pub trait Tr1: PrivUseAliasTr {} - //~^ ERROR private trait `aliases_priv::PrivTr1` in public interface + //~^ ERROR private trait `PrivTr1` in public interface //~| WARNING hard error pub trait Tr2: PrivUseAliasTr {} - //~^ ERROR private trait `aliases_priv::PrivTr1` in public interface + //~^ ERROR private trait `PrivTr1` in public interface //~| WARNING hard error - //~| ERROR private type `aliases_priv::Priv2` in public interface + //~| ERROR private type `Priv2` in public interface //~| WARNING hard error impl PrivUseAlias { diff --git a/src/test/ui/privacy/private-in-public-warn.stderr b/src/test/ui/privacy/private-in-public-warn.stderr index 4905e295195..36577a60102 100644 --- a/src/test/ui/privacy/private-in-public-warn.stderr +++ b/src/test/ui/privacy/private-in-public-warn.stderr @@ -306,7 +306,7 @@ LL | struct Priv; LL | type Check = Priv; | ^^^^^^^^^^^^^^^^^^ can't leak private type -error: private trait `aliases_priv::PrivTr1` in public interface (error E0445) +error: private trait `PrivTr1` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:249:5 | LL | pub trait Tr1: PrivUseAliasTr {} @@ -315,7 +315,7 @@ LL | pub trait Tr1: PrivUseAliasTr {} = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 -error: private trait `aliases_priv::PrivTr1` in public interface (error E0445) +error: private trait `PrivTr1` in public interface (error E0445) --> $DIR/private-in-public-warn.rs:252:5 | LL | pub trait Tr2: PrivUseAliasTr {} @@ -324,7 +324,7 @@ LL | pub trait Tr2: PrivUseAliasTr {} = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 -error: private type `aliases_priv::Priv2` in public interface (error E0446) +error: private type `Priv2` in public interface (error E0446) --> $DIR/private-in-public-warn.rs:252:5 | LL | pub trait Tr2: PrivUseAliasTr {} diff --git a/src/test/ui/privacy/private-in-public.rs b/src/test/ui/privacy/private-in-public.rs index 08c00f44f22..dbd1c483f81 100644 --- a/src/test/ui/privacy/private-in-public.rs +++ b/src/test/ui/privacy/private-in-public.rs @@ -128,8 +128,8 @@ mod aliases_priv { } impl PrivTr for Priv {} - pub fn f1(arg: PrivUseAlias) {} //~ ERROR private type `aliases_priv::Priv1` in public interface - pub fn f2(arg: PrivAlias) {} //~ ERROR private type `aliases_priv::Priv2` in public interface + pub fn f1(arg: PrivUseAlias) {} //~ ERROR private type `Priv1` in public interface + pub fn f2(arg: PrivAlias) {} //~ ERROR private type `Priv2` in public interface pub fn f3(arg: ::Assoc) {} //~^ ERROR private trait `aliases_priv::PrivTr` in public interface //~| ERROR private type `aliases_priv::Priv` in public interface diff --git a/src/test/ui/privacy/private-in-public.stderr b/src/test/ui/privacy/private-in-public.stderr index 4750fe8687e..2ec5b45d210 100644 --- a/src/test/ui/privacy/private-in-public.stderr +++ b/src/test/ui/privacy/private-in-public.stderr @@ -238,20 +238,20 @@ LL | struct Priv; LL | pub fn f(arg: Priv) {} | ^^^^^^^^^^^^^^^^^^^ can't leak private type -error[E0446]: private type `aliases_priv::Priv1` in public interface +error[E0446]: private type `Priv1` in public interface --> $DIR/private-in-public.rs:131:5 | LL | struct Priv1; - | - `aliases_priv::Priv1` declared as private + | - `Priv1` declared as private ... LL | pub fn f1(arg: PrivUseAlias) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type -error[E0446]: private type `aliases_priv::Priv2` in public interface +error[E0446]: private type `Priv2` in public interface --> $DIR/private-in-public.rs:132:5 | LL | struct Priv2; - | - `aliases_priv::Priv2` declared as private + | - `Priv2` declared as private ... LL | pub fn f2(arg: PrivAlias) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type diff --git a/src/test/ui/privacy/private-inferred-type-1.rs b/src/test/ui/privacy/private-inferred-type-1.rs index 69eeb2a26e6..d633189e3fb 100644 --- a/src/test/ui/privacy/private-inferred-type-1.rs +++ b/src/test/ui/privacy/private-inferred-type-1.rs @@ -13,6 +13,6 @@ mod m { } fn main() { - [].arr0_secret(); //~ ERROR type `m::Priv` is private - None.ty_param_secret(); //~ ERROR type `m::Priv` is private + [].arr0_secret(); //~ ERROR type `Priv` is private + None.ty_param_secret(); //~ ERROR type `Priv` is private } diff --git a/src/test/ui/privacy/private-inferred-type-1.stderr b/src/test/ui/privacy/private-inferred-type-1.stderr index 576498b2cf8..245789f4353 100644 --- a/src/test/ui/privacy/private-inferred-type-1.stderr +++ b/src/test/ui/privacy/private-inferred-type-1.stderr @@ -1,10 +1,10 @@ -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type-1.rs:16:5 | LL | [].arr0_secret(); | ^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type-1.rs:17:5 | LL | None.ty_param_secret(); diff --git a/src/test/ui/privacy/private-inferred-type-2.rs b/src/test/ui/privacy/private-inferred-type-2.rs index 28b47606d15..15b263b3814 100644 --- a/src/test/ui/privacy/private-inferred-type-2.rs +++ b/src/test/ui/privacy/private-inferred-type-2.rs @@ -13,7 +13,7 @@ mod m { } fn main() { - m::Pub::get_priv; //~ ERROR type `m::Priv` is private - m::Pub::static_method; //~ ERROR type `m::Priv` is private + m::Pub::get_priv; //~ ERROR type `Priv` is private + m::Pub::static_method; //~ ERROR type `Priv` is private ext::Pub::static_method; //~ ERROR type `ext::Priv` is private } diff --git a/src/test/ui/privacy/private-inferred-type-2.stderr b/src/test/ui/privacy/private-inferred-type-2.stderr index f19e367ef11..3a0fc03b4d5 100644 --- a/src/test/ui/privacy/private-inferred-type-2.stderr +++ b/src/test/ui/privacy/private-inferred-type-2.stderr @@ -1,10 +1,10 @@ -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type-2.rs:16:5 | LL | m::Pub::get_priv; | ^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type-2.rs:17:5 | LL | m::Pub::static_method; diff --git a/src/test/ui/privacy/private-inferred-type-3.rs b/src/test/ui/privacy/private-inferred-type-3.rs index 39f2e5d4af2..00f0a715a83 100644 --- a/src/test/ui/privacy/private-inferred-type-3.rs +++ b/src/test/ui/privacy/private-inferred-type-3.rs @@ -5,8 +5,8 @@ // error-pattern:type `ext::PrivEnum` is private // error-pattern:type `fn() {::method}` is private // error-pattern:type `fn(u8) -> ext::PrivTupleStruct {ext::PrivTupleStruct}` is private -// error-pattern:type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private -// error-pattern:type `for<'r> fn(&'r ext::Pub) {ext::Pub::::priv_method}` is private +// error-pattern:type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private +// error-pattern:type `for<'r> fn(&'r Pub) {Pub::::priv_method}` is private #![feature(decl_macro)] diff --git a/src/test/ui/privacy/private-inferred-type-3.stderr b/src/test/ui/privacy/private-inferred-type-3.stderr index 39ef6472526..165d932f083 100644 --- a/src/test/ui/privacy/private-inferred-type-3.stderr +++ b/src/test/ui/privacy/private-inferred-type-3.stderr @@ -38,7 +38,7 @@ LL | ext::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `fn(u8) -> ext::PubTupleStruct {ext::PubTupleStruct}` is private +error: type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private --> $DIR/private-inferred-type-3.rs:16:5 | LL | ext::m!(); @@ -46,7 +46,7 @@ LL | ext::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `for<'r> fn(&'r ext::Pub) {ext::Pub::::priv_method}` is private +error: type `for<'r> fn(&'r Pub) {Pub::::priv_method}` is private --> $DIR/private-inferred-type-3.rs:16:5 | LL | ext::m!(); diff --git a/src/test/ui/privacy/private-inferred-type.rs b/src/test/ui/privacy/private-inferred-type.rs index dab440b2d99..b083a3970d6 100644 --- a/src/test/ui/privacy/private-inferred-type.rs +++ b/src/test/ui/privacy/private-inferred-type.rs @@ -36,18 +36,18 @@ mod m { impl TraitWithAssocTy for Priv { type AssocTy = u8; } pub macro m() { - priv_fn; //~ ERROR type `fn() {m::priv_fn}` is private + priv_fn; //~ ERROR type `fn() {priv_fn}` is private PRIV_STATIC; // OK, not cross-crate - PrivEnum::Variant; //~ ERROR type `m::PrivEnum` is private + PrivEnum::Variant; //~ ERROR type `PrivEnum` is private PubEnum::Variant; // OK - ::method; //~ ERROR type `fn() {::method}` is private + ::method; //~ ERROR type `fn() {::method}` is private ::method; // OK PrivTupleStruct; - //~^ ERROR type `fn(u8) -> m::PrivTupleStruct {m::PrivTupleStruct}` is private + //~^ ERROR type `fn(u8) -> PrivTupleStruct {PrivTupleStruct}` is private PubTupleStruct; - //~^ ERROR type `fn(u8) -> m::PubTupleStruct {m::PubTupleStruct}` is private + //~^ ERROR type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private Pub(0u8).priv_method(); - //~^ ERROR type `for<'r> fn(&'r m::Pub) {m::Pub::::priv_method}` is private + //~^ ERROR type `for<'r> fn(&'r Pub) {Pub::::priv_method}` is private } trait Trait {} @@ -59,7 +59,7 @@ mod m { impl TraitWithTyParam for u8 {} impl TraitWithTyParam2 for u8 {} impl TraitWithAssocTy for u8 { type AssocTy = Priv; } - //~^ ERROR private type `m::Priv` in public interface + //~^ ERROR private type `Priv` in public interface pub fn leak_anon1() -> impl Trait + 'static { 0 } pub fn leak_anon2() -> impl TraitWithTyParam { 0 } @@ -80,7 +80,7 @@ mod adjust { pub struct S3; impl Deref for S1 { - type Target = S2Alias; //~ ERROR private type `adjust::S2` in public interface + type Target = S2Alias; //~ ERROR private type `S2` in public interface fn deref(&self) -> &Self::Target { loop {} } } impl Deref for S2 { @@ -94,40 +94,40 @@ mod adjust { } fn main() { - let _: m::Alias; //~ ERROR type `m::Priv` is private - //~^ ERROR type `m::Priv` is private - let _: ::AssocTy; //~ ERROR type `m::Priv` is private - m::Alias {}; //~ ERROR type `m::Priv` is private - m::Pub { 0: m::Alias {} }; //~ ERROR type `m::Priv` is private + let _: m::Alias; //~ ERROR type `Priv` is private + //~^ ERROR type `Priv` is private + let _: ::AssocTy; //~ ERROR type `Priv` is private + m::Alias {}; //~ ERROR type `Priv` is private + m::Pub { 0: m::Alias {} }; //~ ERROR type `Priv` is private m::Pub { 0: loop {} }; // OK, `m::Pub` is in value context, so it means Pub<_>, not Pub - m::Pub::static_method; //~ ERROR type `m::Priv` is private - m::Pub::INHERENT_ASSOC_CONST; //~ ERROR type `m::Priv` is private - m::Pub(0u8).method_with_substs::(); //~ ERROR type `m::Priv` is private - m::Pub(0u8).method_with_priv_params(loop{}); //~ ERROR type `m::Priv` is private - ::TRAIT_ASSOC_CONST; //~ ERROR type `m::Priv` is private - >::INHERENT_ASSOC_CONST; //~ ERROR type `m::Priv` is private - >::INHERENT_ASSOC_CONST_GENERIC_SELF; //~ ERROR type `m::Priv` is private - >::static_method_generic_self; //~ ERROR type `m::Priv` is private + m::Pub::static_method; //~ ERROR type `Priv` is private + m::Pub::INHERENT_ASSOC_CONST; //~ ERROR type `Priv` is private + m::Pub(0u8).method_with_substs::(); //~ ERROR type `Priv` is private + m::Pub(0u8).method_with_priv_params(loop{}); //~ ERROR type `Priv` is private + ::TRAIT_ASSOC_CONST; //~ ERROR type `Priv` is private + >::INHERENT_ASSOC_CONST; //~ ERROR type `Priv` is private + >::INHERENT_ASSOC_CONST_GENERIC_SELF; //~ ERROR type `Priv` is private + >::static_method_generic_self; //~ ERROR type `Priv` is private use m::TraitWithTyParam2; - u8::pub_method; //~ ERROR type `m::Priv` is private + u8::pub_method; //~ ERROR type `Priv` is private - adjust::S1.method_s3(); //~ ERROR type `adjust::S2` is private + adjust::S1.method_s3(); //~ ERROR type `S2` is private m::m!(); - m::leak_anon1(); //~ ERROR trait `m::Trait` is private - m::leak_anon2(); //~ ERROR type `m::Priv` is private - m::leak_anon3(); //~ ERROR type `m::Priv` is private + m::leak_anon1(); //~ ERROR trait `Trait` is private + m::leak_anon2(); //~ ERROR type `Priv` is private + m::leak_anon3(); //~ ERROR type `Priv` is private - m::leak_dyn1(); //~ ERROR trait `m::Trait` is private - m::leak_dyn2(); //~ ERROR type `m::Priv` is private - m::leak_dyn3(); //~ ERROR type `m::Priv` is private + m::leak_dyn1(); //~ ERROR trait `Trait` is private + m::leak_dyn2(); //~ ERROR type `Priv` is private + m::leak_dyn3(); //~ ERROR type `Priv` is private // Check that messages are not duplicated for various kinds of assignments - let a = m::Alias {}; //~ ERROR type `m::Priv` is private - let mut b = a; //~ ERROR type `m::Priv` is private - b = a; //~ ERROR type `m::Priv` is private - match a { //~ ERROR type `m::Priv` is private + let a = m::Alias {}; //~ ERROR type `Priv` is private + let mut b = a; //~ ERROR type `Priv` is private + b = a; //~ ERROR type `Priv` is private + match a { //~ ERROR type `Priv` is private _ => {} } } diff --git a/src/test/ui/privacy/private-inferred-type.stderr b/src/test/ui/privacy/private-inferred-type.stderr index 7d1f794bfe4..4a310f7009f 100644 --- a/src/test/ui/privacy/private-inferred-type.stderr +++ b/src/test/ui/privacy/private-inferred-type.stderr @@ -1,112 +1,112 @@ -error[E0446]: private type `m::Priv` in public interface +error[E0446]: private type `Priv` in public interface --> $DIR/private-inferred-type.rs:61:36 | LL | struct Priv; - | - `m::Priv` declared as private + | - `Priv` declared as private ... LL | impl TraitWithAssocTy for u8 { type AssocTy = Priv; } | ^^^^^^^^^^^^^^^^^^^^ can't leak private type -error[E0446]: private type `adjust::S2` in public interface +error[E0446]: private type `S2` in public interface --> $DIR/private-inferred-type.rs:83:9 | LL | struct S2; - | - `adjust::S2` declared as private + | - `S2` declared as private ... LL | type Target = S2Alias; | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:97:9 | LL | let _: m::Alias; | ^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:97:12 | LL | let _: m::Alias; | ^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:99:13 | LL | let _: ::AssocTy; | ^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:100:5 | LL | m::Alias {}; | ^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:101:5 | LL | m::Pub { 0: m::Alias {} }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:103:5 | LL | m::Pub::static_method; | ^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:104:5 | LL | m::Pub::INHERENT_ASSOC_CONST; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:105:5 | LL | m::Pub(0u8).method_with_substs::(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:106:17 | LL | m::Pub(0u8).method_with_priv_params(loop{}); | ^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:107:5 | LL | ::TRAIT_ASSOC_CONST; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:108:6 | LL | >::INHERENT_ASSOC_CONST; | ^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:109:5 | LL | >::INHERENT_ASSOC_CONST_GENERIC_SELF; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:110:5 | LL | >::static_method_generic_self; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:112:5 | LL | u8::pub_method; | ^^^^^^^^^^^^^^ private type -error: type `adjust::S2` is private +error: type `S2` is private --> $DIR/private-inferred-type.rs:114:5 | LL | adjust::S1.method_s3(); | ^^^^^^^^^^ private type -error: type `fn() {m::priv_fn}` is private +error: type `fn() {priv_fn}` is private --> $DIR/private-inferred-type.rs:39:9 | LL | priv_fn; @@ -117,7 +117,7 @@ LL | m::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `m::PrivEnum` is private +error: type `PrivEnum` is private --> $DIR/private-inferred-type.rs:41:9 | LL | PrivEnum::Variant; @@ -128,7 +128,7 @@ LL | m::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `fn() {::method}` is private +error: type `fn() {::method}` is private --> $DIR/private-inferred-type.rs:43:9 | LL | ::method; @@ -139,7 +139,7 @@ LL | m::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `fn(u8) -> m::PrivTupleStruct {m::PrivTupleStruct}` is private +error: type `fn(u8) -> PrivTupleStruct {PrivTupleStruct}` is private --> $DIR/private-inferred-type.rs:45:9 | LL | PrivTupleStruct; @@ -150,7 +150,7 @@ LL | m::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `fn(u8) -> m::PubTupleStruct {m::PubTupleStruct}` is private +error: type `fn(u8) -> PubTupleStruct {PubTupleStruct}` is private --> $DIR/private-inferred-type.rs:47:9 | LL | PubTupleStruct; @@ -161,7 +161,7 @@ LL | m::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: type `for<'r> fn(&'r m::Pub) {m::Pub::::priv_method}` is private +error: type `for<'r> fn(&'r Pub) {Pub::::priv_method}` is private --> $DIR/private-inferred-type.rs:49:18 | LL | Pub(0u8).priv_method(); @@ -172,61 +172,61 @@ LL | m::m!(); | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) -error: trait `m::Trait` is private +error: trait `Trait` is private --> $DIR/private-inferred-type.rs:118:5 | LL | m::leak_anon1(); | ^^^^^^^^^^^^^^^ private trait -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:119:5 | LL | m::leak_anon2(); | ^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:120:5 | LL | m::leak_anon3(); | ^^^^^^^^^^^^^^^ private type -error: trait `m::Trait` is private +error: trait `Trait` is private --> $DIR/private-inferred-type.rs:122:5 | LL | m::leak_dyn1(); | ^^^^^^^^^^^^^^ private trait -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:123:5 | LL | m::leak_dyn2(); | ^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:124:5 | LL | m::leak_dyn3(); | ^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:127:13 | LL | let a = m::Alias {}; | ^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:128:17 | LL | let mut b = a; | ^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:129:9 | LL | b = a; | ^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-inferred-type.rs:130:11 | LL | match a { diff --git a/src/test/ui/privacy/private-struct-field-cross-crate.rs b/src/test/ui/privacy/private-struct-field-cross-crate.rs index 2efcb7f1d88..301cd37b76c 100644 --- a/src/test/ui/privacy/private-struct-field-cross-crate.rs +++ b/src/test/ui/privacy/private-struct-field-cross-crate.rs @@ -5,5 +5,5 @@ use cci_class::kitties::cat; fn main() { let nyan : cat = cat(52, 99); assert_eq!(nyan.meows, 52); - //~^ ERROR field `meows` of struct `cci_class::kitties::cat` is private + //~^ ERROR field `meows` of struct `cat` is private } diff --git a/src/test/ui/privacy/private-struct-field-cross-crate.stderr b/src/test/ui/privacy/private-struct-field-cross-crate.stderr index ac00d82adab..40cf3448d6f 100644 --- a/src/test/ui/privacy/private-struct-field-cross-crate.stderr +++ b/src/test/ui/privacy/private-struct-field-cross-crate.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `meows` of struct `cci_class::kitties::cat` is private +error[E0616]: field `meows` of struct `cat` is private --> $DIR/private-struct-field-cross-crate.rs:7:19 | LL | assert_eq!(nyan.meows, 52); diff --git a/src/test/ui/privacy/private-struct-field-ctor.rs b/src/test/ui/privacy/private-struct-field-ctor.rs index 2c506f34797..56e84a7510d 100644 --- a/src/test/ui/privacy/private-struct-field-ctor.rs +++ b/src/test/ui/privacy/private-struct-field-ctor.rs @@ -5,5 +5,5 @@ mod a { } fn main() { - let s = a::Foo { x: 1 }; //~ ERROR field `x` of struct `a::Foo` is private + let s = a::Foo { x: 1 }; //~ ERROR field `x` of struct `Foo` is private } diff --git a/src/test/ui/privacy/private-struct-field-ctor.stderr b/src/test/ui/privacy/private-struct-field-ctor.stderr index 7c32ebc2cf7..9dc9db0eaca 100644 --- a/src/test/ui/privacy/private-struct-field-ctor.stderr +++ b/src/test/ui/privacy/private-struct-field-ctor.stderr @@ -1,4 +1,4 @@ -error[E0451]: field `x` of struct `a::Foo` is private +error[E0451]: field `x` of struct `Foo` is private --> $DIR/private-struct-field-ctor.rs:8:22 | LL | let s = a::Foo { x: 1 }; diff --git a/src/test/ui/privacy/private-struct-field-pattern.rs b/src/test/ui/privacy/private-struct-field-pattern.rs index b3da6092abc..4a766500e1b 100644 --- a/src/test/ui/privacy/private-struct-field-pattern.rs +++ b/src/test/ui/privacy/private-struct-field-pattern.rs @@ -12,6 +12,6 @@ mod a { fn main() { match a::make() { - Foo { x: _ } => {} //~ ERROR field `x` of struct `a::Foo` is private + Foo { x: _ } => {} //~ ERROR field `x` of struct `Foo` is private } } diff --git a/src/test/ui/privacy/private-struct-field-pattern.stderr b/src/test/ui/privacy/private-struct-field-pattern.stderr index 9190317403e..63055303683 100644 --- a/src/test/ui/privacy/private-struct-field-pattern.stderr +++ b/src/test/ui/privacy/private-struct-field-pattern.stderr @@ -1,4 +1,4 @@ -error[E0451]: field `x` of struct `a::Foo` is private +error[E0451]: field `x` of struct `Foo` is private --> $DIR/private-struct-field-pattern.rs:15:15 | LL | Foo { x: _ } => {} diff --git a/src/test/ui/privacy/private-struct-field.rs b/src/test/ui/privacy/private-struct-field.rs index 216ae20e153..94cee4eff2c 100644 --- a/src/test/ui/privacy/private-struct-field.rs +++ b/src/test/ui/privacy/private-struct-field.rs @@ -10,5 +10,5 @@ mod cat { fn main() { let nyan = cat::new_cat(); - assert_eq!(nyan.meows, 52); //~ ERROR field `meows` of struct `cat::Cat` is private + assert_eq!(nyan.meows, 52); //~ ERROR field `meows` of struct `Cat` is private } diff --git a/src/test/ui/privacy/private-struct-field.stderr b/src/test/ui/privacy/private-struct-field.stderr index c89ae507ab5..facf4e82fd6 100644 --- a/src/test/ui/privacy/private-struct-field.stderr +++ b/src/test/ui/privacy/private-struct-field.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `meows` of struct `cat::Cat` is private +error[E0616]: field `meows` of struct `Cat` is private --> $DIR/private-struct-field.rs:13:21 | LL | assert_eq!(nyan.meows, 52); diff --git a/src/test/ui/privacy/private-type-in-interface.rs b/src/test/ui/privacy/private-type-in-interface.rs index 359b6da1d79..7fbdbaf5f31 100644 --- a/src/test/ui/privacy/private-type-in-interface.rs +++ b/src/test/ui/privacy/private-type-in-interface.rs @@ -12,19 +12,19 @@ mod m { impl Trait for Priv { type X = u8; } } -fn f(_: m::Alias) {} //~ ERROR type `m::Priv` is private - //~^ ERROR type `m::Priv` is private +fn f(_: m::Alias) {} //~ ERROR type `Priv` is private + //~^ ERROR type `Priv` is private fn f_ext(_: ext::Alias) {} //~ ERROR type `ext::Priv` is private //~^ ERROR type `ext::Priv` is private trait Tr1 {} -impl m::Alias {} //~ ERROR type `m::Priv` is private +impl m::Alias {} //~ ERROR type `Priv` is private impl Tr1 for ext::Alias {} //~ ERROR type `ext::Priv` is private -type A = ::X; //~ ERROR type `m::Priv` is private +type A = ::X; //~ ERROR type `Priv` is private trait Tr2 {} impl Tr2 for u8 {} -fn g() -> impl Tr2 { 0 } //~ ERROR type `m::Priv` is private +fn g() -> impl Tr2 { 0 } //~ ERROR type `Priv` is private fn g_ext() -> impl Tr2 { 0 } //~ ERROR type `ext::Priv` is private fn main() {} diff --git a/src/test/ui/privacy/private-type-in-interface.stderr b/src/test/ui/privacy/private-type-in-interface.stderr index ea89035c3d0..4e87caa3415 100644 --- a/src/test/ui/privacy/private-type-in-interface.stderr +++ b/src/test/ui/privacy/private-type-in-interface.stderr @@ -1,10 +1,10 @@ -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-type-in-interface.rs:15:9 | LL | fn f(_: m::Alias) {} | ^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-type-in-interface.rs:15:6 | LL | fn f(_: m::Alias) {} @@ -22,7 +22,7 @@ error: type `ext::Priv` is private LL | fn f_ext(_: ext::Alias) {} | ^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-type-in-interface.rs:21:6 | LL | impl m::Alias {} @@ -34,13 +34,13 @@ error: type `ext::Priv` is private LL | impl Tr1 for ext::Alias {} | ^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-type-in-interface.rs:23:10 | LL | type A = ::X; | ^^^^^^^^^^^^^^^^^^^^^^^^^ private type -error: type `m::Priv` is private +error: type `Priv` is private --> $DIR/private-type-in-interface.rs:27:11 | LL | fn g() -> impl Tr2 { 0 } diff --git a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs index feab72b3efa..e485263affc 100644 --- a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs +++ b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs @@ -18,14 +18,14 @@ struct PrivateType { pub struct PublicType { pub field: OtherType, - //~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface + //~^ ERROR type `OtherType` from private dependency 'priv_dep' in public interface priv_field: OtherType, // Private field - this is fine pub other_field: PubType // Type from public dependency - this is fine } impl PublicType { pub fn pub_fn(param: OtherType) {} - //~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface + //~^ ERROR type `OtherType` from private dependency 'priv_dep' in public interface fn priv_fn(param: OtherType) {} } @@ -33,7 +33,7 @@ impl PublicType { pub trait MyPubTrait { type Foo: OtherTrait; } -//~^^^ ERROR trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface +//~^^^ ERROR trait `OtherTrait` from private dependency 'priv_dep' in public interface pub struct AllowedPrivType { #[allow(exported_private_dependencies)] diff --git a/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr b/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr index 727134bd51d..3b5b7823443 100644 --- a/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr +++ b/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr @@ -1,4 +1,4 @@ -error: type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface +error: type `OtherType` from private dependency 'priv_dep' in public interface --> $DIR/pub-priv1.rs:20:5 | LL | pub field: OtherType, @@ -10,13 +10,13 @@ note: the lint level is defined here LL | #![deny(exported_private_dependencies)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface +error: type `OtherType` from private dependency 'priv_dep' in public interface --> $DIR/pub-priv1.rs:27:5 | LL | pub fn pub_fn(param: OtherType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface +error: trait `OtherTrait` from private dependency 'priv_dep' in public interface --> $DIR/pub-priv1.rs:33:1 | LL | / pub trait MyPubTrait { diff --git a/src/test/ui/privacy/restricted/private-in-public.stderr b/src/test/ui/privacy/restricted/private-in-public.stderr index c597935e7f0..80995ab98e3 100644 --- a/src/test/ui/privacy/restricted/private-in-public.stderr +++ b/src/test/ui/privacy/restricted/private-in-public.stderr @@ -1,17 +1,17 @@ -error[E0446]: private type `foo::Priv` in public interface +error[E0446]: private type `Priv` in public interface --> $DIR/private-in-public.rs:8:9 | LL | struct Priv; - | - `foo::Priv` declared as private + | - `Priv` declared as private ... LL | pub(crate) fn g(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type -error[E0446]: private type `foo::Priv` in public interface +error[E0446]: private type `Priv` in public interface --> $DIR/private-in-public.rs:9:9 | LL | struct Priv; - | - `foo::Priv` declared as private + | - `Priv` declared as private ... LL | crate fn h(_: Priv) {} | ^^^^^^^^^^^^^^^^^^^ can't leak private type diff --git a/src/test/ui/privacy/restricted/struct-literal-field.stderr b/src/test/ui/privacy/restricted/struct-literal-field.stderr index 591980dc345..eee964f022a 100644 --- a/src/test/ui/privacy/restricted/struct-literal-field.stderr +++ b/src/test/ui/privacy/restricted/struct-literal-field.stderr @@ -1,4 +1,4 @@ -error[E0451]: field `x` of struct `foo::bar::S` is private +error[E0451]: field `x` of struct `S` is private --> $DIR/struct-literal-field.rs:18:9 | LL | S { x: 0 }; diff --git a/src/test/ui/privacy/restricted/test.stderr b/src/test/ui/privacy/restricted/test.stderr index 40512a34bd9..61b9a43f899 100644 --- a/src/test/ui/privacy/restricted/test.stderr +++ b/src/test/ui/privacy/restricted/test.stderr @@ -46,7 +46,7 @@ note: the function `f` is defined here LL | pub(super) fn f() {} | ^^^^^^^^^^^^^^^^^ -error[E0616]: field `x` of struct `foo::bar::S` is private +error[E0616]: field `x` of struct `S` is private --> $DIR/test.rs:31:18 | LL | S::default().x; @@ -64,13 +64,13 @@ error[E0624]: associated function `g` is private LL | S::g(); | ^ private associated function -error[E0616]: field `y` of struct `pub_restricted::Universe` is private +error[E0616]: field `y` of struct `Universe` is private --> $DIR/test.rs:42:15 | LL | let _ = u.y; | ^ private field -error[E0616]: field `z` of struct `pub_restricted::Universe` is private +error[E0616]: field `z` of struct `Universe` is private --> $DIR/test.rs:43:15 | LL | let _ = u.z; diff --git a/src/test/ui/privacy/union-field-privacy-1.rs b/src/test/ui/privacy/union-field-privacy-1.rs index 1ff4d513fac..8a84bd86ae5 100644 --- a/src/test/ui/privacy/union-field-privacy-1.rs +++ b/src/test/ui/privacy/union-field-privacy-1.rs @@ -9,9 +9,9 @@ mod m { fn main() { unsafe { let u = m::U { a: 0 }; // OK let u = m::U { b: 0 }; // OK - let u = m::U { c: 0 }; //~ ERROR field `c` of union `m::U` is private + let u = m::U { c: 0 }; //~ ERROR field `c` of union `U` is private let m::U { a } = u; // OK let m::U { b } = u; // OK - let m::U { c } = u; //~ ERROR field `c` of union `m::U` is private + let m::U { c } = u; //~ ERROR field `c` of union `U` is private }} diff --git a/src/test/ui/privacy/union-field-privacy-1.stderr b/src/test/ui/privacy/union-field-privacy-1.stderr index 15096eb1139..b1f0b785ea7 100644 --- a/src/test/ui/privacy/union-field-privacy-1.stderr +++ b/src/test/ui/privacy/union-field-privacy-1.stderr @@ -1,10 +1,10 @@ -error[E0451]: field `c` of union `m::U` is private +error[E0451]: field `c` of union `U` is private --> $DIR/union-field-privacy-1.rs:12:20 | LL | let u = m::U { c: 0 }; | ^^^^ private field -error[E0451]: field `c` of union `m::U` is private +error[E0451]: field `c` of union `U` is private --> $DIR/union-field-privacy-1.rs:16:16 | LL | let m::U { c } = u; diff --git a/src/test/ui/privacy/union-field-privacy-2.rs b/src/test/ui/privacy/union-field-privacy-2.rs index c2458f74bc8..f02e0f8a9b9 100644 --- a/src/test/ui/privacy/union-field-privacy-2.rs +++ b/src/test/ui/privacy/union-field-privacy-2.rs @@ -11,5 +11,5 @@ fn main() { let a = u.a; // OK let b = u.b; // OK - let c = u.c; //~ ERROR field `c` of union `m::U` is private + let c = u.c; //~ ERROR field `c` of union `U` is private } diff --git a/src/test/ui/privacy/union-field-privacy-2.stderr b/src/test/ui/privacy/union-field-privacy-2.stderr index a23cf90332b..bf6a2b625d5 100644 --- a/src/test/ui/privacy/union-field-privacy-2.stderr +++ b/src/test/ui/privacy/union-field-privacy-2.stderr @@ -1,4 +1,4 @@ -error[E0616]: field `c` of union `m::U` is private +error[E0616]: field `c` of union `U` is private --> $DIR/union-field-privacy-2.rs:14:15 | LL | let c = u.c; diff --git a/src/test/ui/proc-macro/break-token-spans.stderr b/src/test/ui/proc-macro/break-token-spans.stderr index caca973f252..0a0322b8a3e 100644 --- a/src/test/ui/proc-macro/break-token-spans.stderr +++ b/src/test/ui/proc-macro/break-token-spans.stderr @@ -8,11 +8,11 @@ error[E0308]: mismatched types --> $DIR/break-token-spans.rs:14:32 | LL | let a: Option>= true; - | ------------------ ^^^^ expected enum `std::option::Option`, found `bool` + | ------------------ ^^^^ expected enum `Option`, found `bool` | | | expected due to this | - = note: expected enum `std::option::Option>` + = note: expected enum `Option>` found type `bool` error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/issue-37788.stderr b/src/test/ui/proc-macro/issue-37788.stderr index f2c833e69f9..05387012902 100644 --- a/src/test/ui/proc-macro/issue-37788.stderr +++ b/src/test/ui/proc-macro/issue-37788.stderr @@ -7,10 +7,10 @@ LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs` LL | std::cell::Cell::new(0) | ^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | - | expected `()`, found struct `std::cell::Cell` + | expected `()`, found struct `Cell` | = note: expected unit type `()` - found struct `std::cell::Cell<{integer}>` + found struct `Cell<{integer}>` error: aborting due to previous error diff --git a/src/test/ui/proc-macro/meta-macro-hygiene.rs b/src/test/ui/proc-macro/meta-macro-hygiene.rs index c11cf42956f..7e839f747f3 100644 --- a/src/test/ui/proc-macro/meta-macro-hygiene.rs +++ b/src/test/ui/proc-macro/meta-macro-hygiene.rs @@ -1,7 +1,8 @@ +// ignore-tidy-linelength // aux-build:make-macro.rs // aux-build:meta-macro.rs // edition:2018 -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene +// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no // check-pass // normalize-stdout-test "\d+#" -> "0#" // diff --git a/src/test/ui/proc-macro/meta-macro-hygiene.stdout b/src/test/ui/proc-macro/meta-macro-hygiene.stdout index dfd3e6a839a..bf5e0bce762 100644 --- a/src/test/ui/proc-macro/meta-macro-hygiene.stdout +++ b/src/test/ui/proc-macro/meta-macro-hygiene.stdout @@ -1,11 +1,12 @@ Def site: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) -Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:23:37: 23:43 (#3) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:23:43: 23:45 (#3) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:23:43: 23:45 (#3) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:23:45: 23:50 (#3) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:23:50: 23:51 (#3) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:23:51: 23:53 (#3) }] +Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:24:37: 24:43 (#3) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:24:43: 24:45 (#3) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:43: 24:45 (#3) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:24:45: 24:50 (#3) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:50: 24:51 (#3) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:24:51: 24:53 (#3) }] Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 16:10 (#4) }] #![feature /* 0#0 */(prelude_import)] +// ignore-tidy-linelength // aux-build:make-macro.rs // aux-build:meta-macro.rs // edition:2018 -// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene +// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no // check-pass // normalize-stdout-test "\d+#" -> "0#" // diff --git a/src/test/ui/proc-macro/resolved-located-at.stderr b/src/test/ui/proc-macro/resolved-located-at.stderr index e71e79514f2..db1aa5d5720 100644 --- a/src/test/ui/proc-macro/resolved-located-at.stderr +++ b/src/test/ui/proc-macro/resolved-located-at.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types LL | fn main() { | - expected `()` because of default return type LL | resolve_located_at!(a b) - | ^ expected `()`, found struct `main::S` + | ^ expected `()`, found struct `S` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr index a77e92022e2..70e992a4f70 100644 --- a/src/test/ui/proc-macro/span-preservation.stderr +++ b/src/test/ui/proc-macro/span-preservation.stderr @@ -26,11 +26,11 @@ error[E0308]: mismatched types LL | let x = Foo { a: 10isize }; | ^^^^^^^ expected `usize`, found `isize` -error[E0560]: struct `c::Foo` has no field named `b` +error[E0560]: struct `Foo` has no field named `b` --> $DIR/span-preservation.rs:34:26 | LL | let y = Foo { a: 10, b: 10isize }; - | ^ `c::Foo` does not have this field + | ^ `Foo` does not have this field | = note: available fields are: `a` diff --git a/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.rs b/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.rs index 45dfb639922..d0893595037 100644 --- a/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.rs +++ b/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.rs @@ -5,7 +5,7 @@ pub(crate) struct Snail; mod sea { pub(super) struct Turtle; - //~^ NOTE `sea::Turtle` declared as restricted + //~^ NOTE `Turtle` declared as restricted } struct Tortoise; @@ -19,7 +19,7 @@ pub type Helix_pomatia = Shell; //~^ ERROR crate-visible type `Snail` in public interface //~| NOTE can't leak crate-visible type pub type Dermochelys_coriacea = Shell; -//~^ ERROR restricted type `sea::Turtle` in public interface +//~^ ERROR restricted type `Turtle` in public interface //~| NOTE can't leak restricted type pub type Testudo_graeca = Shell; //~^ ERROR private type `Tortoise` in public interface diff --git a/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.stderr b/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.stderr index ae9a33e9443..41b6b095543 100644 --- a/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.stderr +++ b/src/test/ui/pub/issue-33174-restricted-type-in-public-interface.stderr @@ -7,11 +7,11 @@ LL | pub(crate) struct Snail; LL | pub type Helix_pomatia = Shell; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-visible type -error[E0446]: restricted type `sea::Turtle` in public interface +error[E0446]: restricted type `Turtle` in public interface --> $DIR/issue-33174-restricted-type-in-public-interface.rs:21:1 | LL | pub(super) struct Turtle; - | ---------- `sea::Turtle` declared as restricted + | ---------- `Turtle` declared as restricted ... LL | pub type Dermochelys_coriacea = Shell; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak restricted type diff --git a/src/test/ui/question-mark-type-infer.stderr b/src/test/ui/question-mark-type-infer.stderr index 64d8f685637..f530534ec80 100644 --- a/src/test/ui/question-mark-type-infer.stderr +++ b/src/test/ui/question-mark-type-infer.stderr @@ -4,7 +4,7 @@ error[E0284]: type annotations needed LL | l.iter().map(f).collect()? | ^^^^^^^ cannot infer type | - = note: cannot satisfy `<_ as std::ops::Try>::Ok == _` + = note: cannot satisfy `<_ as Try>::Ok == _` help: consider specifying the type argument in the method call | LL | l.iter().map(f).collect::()? diff --git a/src/test/ui/range/issue-54505-no-literals.stderr b/src/test/ui/range/issue-54505-no-literals.stderr index c49093343c0..065e16a8227 100644 --- a/src/test/ui/range/issue-54505-no-literals.stderr +++ b/src/test/ui/range/issue-54505-no-literals.stderr @@ -28,11 +28,11 @@ error[E0308]: mismatched types LL | take_range(std::ops::RangeFrom { start: 1 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeFrom` + | expected reference, found struct `RangeFrom` | help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }` | = note: expected reference `&_` - found struct `std::ops::RangeFrom<{integer}>` + found struct `RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:31:16 @@ -40,11 +40,11 @@ error[E0308]: mismatched types LL | take_range(::std::ops::RangeFrom { start: 1 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeFrom` + | expected reference, found struct `RangeFrom` | help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }` | = note: expected reference `&_` - found struct `std::ops::RangeFrom<{integer}>` + found struct `RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:36:16 @@ -52,11 +52,11 @@ error[E0308]: mismatched types LL | take_range(std::ops::RangeFull {}); | ^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeFull` + | expected reference, found struct `RangeFull` | help: consider borrowing here: `&std::ops::RangeFull {}` | = note: expected reference `&_` - found struct `std::ops::RangeFull` + found struct `RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:41:16 @@ -64,11 +64,11 @@ error[E0308]: mismatched types LL | take_range(::std::ops::RangeFull {}); | ^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeFull` + | expected reference, found struct `RangeFull` | help: consider borrowing here: `&::std::ops::RangeFull {}` | = note: expected reference `&_` - found struct `std::ops::RangeFull` + found struct `RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:46:16 @@ -76,11 +76,11 @@ error[E0308]: mismatched types LL | take_range(std::ops::RangeInclusive::new(0, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeInclusive` + | expected reference, found struct `RangeInclusive` | help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)` | = note: expected reference `&_` - found struct `std::ops::RangeInclusive<{integer}>` + found struct `RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:51:16 @@ -88,11 +88,11 @@ error[E0308]: mismatched types LL | take_range(::std::ops::RangeInclusive::new(0, 1)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeInclusive` + | expected reference, found struct `RangeInclusive` | help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)` | = note: expected reference `&_` - found struct `std::ops::RangeInclusive<{integer}>` + found struct `RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:56:16 @@ -100,11 +100,11 @@ error[E0308]: mismatched types LL | take_range(std::ops::RangeTo { end: 5 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeTo` + | expected reference, found struct `RangeTo` | help: consider borrowing here: `&std::ops::RangeTo { end: 5 }` | = note: expected reference `&_` - found struct `std::ops::RangeTo<{integer}>` + found struct `RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:61:16 @@ -112,11 +112,11 @@ error[E0308]: mismatched types LL | take_range(::std::ops::RangeTo { end: 5 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeTo` + | expected reference, found struct `RangeTo` | help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }` | = note: expected reference `&_` - found struct `std::ops::RangeTo<{integer}>` + found struct `RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:66:16 @@ -124,11 +124,11 @@ error[E0308]: mismatched types LL | take_range(std::ops::RangeToInclusive { end: 5 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeToInclusive` + | expected reference, found struct `RangeToInclusive` | help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }` | = note: expected reference `&_` - found struct `std::ops::RangeToInclusive<{integer}>` + found struct `RangeToInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-literals.rs:71:16 @@ -136,11 +136,11 @@ error[E0308]: mismatched types LL | take_range(::std::ops::RangeToInclusive { end: 5 }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected reference, found struct `std::ops::RangeToInclusive` + | expected reference, found struct `RangeToInclusive` | help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }` | = note: expected reference `&_` - found struct `std::ops::RangeToInclusive<{integer}>` + found struct `RangeToInclusive<{integer}>` error: aborting due to 12 previous errors diff --git a/src/test/ui/range/issue-54505-no-std.stderr b/src/test/ui/range/issue-54505-no-std.stderr index 5537ed45767..73507f4836b 100644 --- a/src/test/ui/range/issue-54505-no-std.stderr +++ b/src/test/ui/range/issue-54505-no-std.stderr @@ -6,11 +6,11 @@ error[E0308]: mismatched types LL | take_range(0..1); | ^^^^ | | - | expected reference, found struct `core::ops::Range` + | expected reference, found struct `Range` | help: consider borrowing here: `&(0..1)` | = note: expected reference `&_` - found struct `core::ops::Range<{integer}>` + found struct `Range<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:32:16 @@ -18,11 +18,11 @@ error[E0308]: mismatched types LL | take_range(1..); | ^^^ | | - | expected reference, found struct `core::ops::RangeFrom` + | expected reference, found struct `RangeFrom` | help: consider borrowing here: `&(1..)` | = note: expected reference `&_` - found struct `core::ops::RangeFrom<{integer}>` + found struct `RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:37:16 @@ -30,11 +30,11 @@ error[E0308]: mismatched types LL | take_range(..); | ^^ | | - | expected reference, found struct `core::ops::RangeFull` + | expected reference, found struct `RangeFull` | help: consider borrowing here: `&(..)` | = note: expected reference `&_` - found struct `core::ops::RangeFull` + found struct `RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:42:16 @@ -42,11 +42,11 @@ error[E0308]: mismatched types LL | take_range(0..=1); | ^^^^^ | | - | expected reference, found struct `core::ops::RangeInclusive` + | expected reference, found struct `RangeInclusive` | help: consider borrowing here: `&(0..=1)` | = note: expected reference `&_` - found struct `core::ops::RangeInclusive<{integer}>` + found struct `RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:47:16 @@ -54,11 +54,11 @@ error[E0308]: mismatched types LL | take_range(..5); | ^^^ | | - | expected reference, found struct `core::ops::RangeTo` + | expected reference, found struct `RangeTo` | help: consider borrowing here: `&(..5)` | = note: expected reference `&_` - found struct `core::ops::RangeTo<{integer}>` + found struct `RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505-no-std.rs:52:16 @@ -66,11 +66,11 @@ error[E0308]: mismatched types LL | take_range(..=42); | ^^^^^ | | - | expected reference, found struct `core::ops::RangeToInclusive` + | expected reference, found struct `RangeToInclusive` | help: consider borrowing here: `&(..=42)` | = note: expected reference `&_` - found struct `core::ops::RangeToInclusive<{integer}>` + found struct `RangeToInclusive<{integer}>` error: aborting due to 7 previous errors diff --git a/src/test/ui/range/issue-54505.stderr b/src/test/ui/range/issue-54505.stderr index 9949ff85671..121af29834d 100644 --- a/src/test/ui/range/issue-54505.stderr +++ b/src/test/ui/range/issue-54505.stderr @@ -16,11 +16,11 @@ error[E0308]: mismatched types LL | take_range(1..); | ^^^ | | - | expected reference, found struct `std::ops::RangeFrom` + | expected reference, found struct `RangeFrom` | help: consider borrowing here: `&(1..)` | = note: expected reference `&_` - found struct `std::ops::RangeFrom<{integer}>` + found struct `RangeFrom<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:24:16 @@ -28,11 +28,11 @@ error[E0308]: mismatched types LL | take_range(..); | ^^ | | - | expected reference, found struct `std::ops::RangeFull` + | expected reference, found struct `RangeFull` | help: consider borrowing here: `&(..)` | = note: expected reference `&_` - found struct `std::ops::RangeFull` + found struct `RangeFull` error[E0308]: mismatched types --> $DIR/issue-54505.rs:29:16 @@ -40,11 +40,11 @@ error[E0308]: mismatched types LL | take_range(0..=1); | ^^^^^ | | - | expected reference, found struct `std::ops::RangeInclusive` + | expected reference, found struct `RangeInclusive` | help: consider borrowing here: `&(0..=1)` | = note: expected reference `&_` - found struct `std::ops::RangeInclusive<{integer}>` + found struct `RangeInclusive<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:34:16 @@ -52,11 +52,11 @@ error[E0308]: mismatched types LL | take_range(..5); | ^^^ | | - | expected reference, found struct `std::ops::RangeTo` + | expected reference, found struct `RangeTo` | help: consider borrowing here: `&(..5)` | = note: expected reference `&_` - found struct `std::ops::RangeTo<{integer}>` + found struct `RangeTo<{integer}>` error[E0308]: mismatched types --> $DIR/issue-54505.rs:39:16 @@ -64,11 +64,11 @@ error[E0308]: mismatched types LL | take_range(..=42); | ^^^^^ | | - | expected reference, found struct `std::ops::RangeToInclusive` + | expected reference, found struct `RangeToInclusive` | help: consider borrowing here: `&(..=42)` | = note: expected reference `&_` - found struct `std::ops::RangeToInclusive<{integer}>` + found struct `RangeToInclusive<{integer}>` error: aborting due to 6 previous errors diff --git a/src/test/ui/range/range-1.rs b/src/test/ui/range/range-1.rs index f13787b1d6e..192426fe228 100644 --- a/src/test/ui/range/range-1.rs +++ b/src/test/ui/range/range-1.rs @@ -7,7 +7,7 @@ pub fn main() { // Bool => does not implement iterator. for i in false..true {} - //~^ ERROR `bool: std::iter::Step` is not satisfied + //~^ ERROR `bool: Step` is not satisfied // Unsized type. let arr: &[_] = &[1, 2, 3]; diff --git a/src/test/ui/range/range-1.stderr b/src/test/ui/range/range-1.stderr index 11cb72fa2b6..a7557320faa 100644 --- a/src/test/ui/range/range-1.stderr +++ b/src/test/ui/range/range-1.stderr @@ -4,13 +4,13 @@ error[E0308]: mismatched types LL | let _ = 0u32..10i32; | ^^^^^ expected `u32`, found `i32` -error[E0277]: the trait bound `bool: std::iter::Step` is not satisfied +error[E0277]: the trait bound `bool: Step` is not satisfied --> $DIR/range-1.rs:9:14 | LL | for i in false..true {} - | ^^^^^^^^^^^ the trait `std::iter::Step` is not implemented for `bool` + | ^^^^^^^^^^^ the trait `Step` is not implemented for `bool` | - = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::ops::Range` + = note: required because of the requirements on the impl of `Iterator` for `std::ops::Range` error[E0277]: the size for values of type `[{integer}]` cannot be known at compilation time --> $DIR/range-1.rs:14:17 @@ -21,9 +21,9 @@ LL | let range = *arr..; ::: $SRC_DIR/core/src/ops/range.rs:LL:COL | LL | pub struct RangeFrom { - | --- required by this bound in `std::ops::RangeFrom` + | --- required by this bound in `RangeFrom` | - = help: the trait `std::marker::Sized` is not implemented for `[{integer}]` + = help: the trait `Sized` is not implemented for `[{integer}]` error: aborting due to 3 previous errors diff --git a/src/test/ui/range/range_traits-1.stderr b/src/test/ui/range/range_traits-1.stderr index 0e1da3d3f76..165fcd415ce 100644 --- a/src/test/ui/range/range_traits-1.stderr +++ b/src/test/ui/range/range_traits-1.stderr @@ -4,7 +4,7 @@ error[E0277]: can't compare `std::ops::Range` with `std::ops::Range, | ^^^^^^^^^^^^^^^ no implementation for `std::ops::Range < std::ops::Range` and `std::ops::Range > std::ops::Range` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` + = help: the trait `PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -14,7 +14,7 @@ error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo, | ^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeTo < std::ops::RangeTo` and `std::ops::RangeTo > std::ops::RangeTo` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -24,7 +24,7 @@ error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFr LL | c: RangeFrom, | ^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeFrom < std::ops::RangeFrom` and `std::ops::RangeFrom > std::ops::RangeFrom` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -34,7 +34,7 @@ error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` LL | d: RangeFull, | ^^^^^^^^^^^^ no implementation for `std::ops::RangeFull < std::ops::RangeFull` and `std::ops::RangeFull > std::ops::RangeFull` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -44,7 +44,7 @@ error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::Ra LL | e: RangeInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeInclusive < std::ops::RangeInclusive` and `std::ops::RangeInclusive > std::ops::RangeInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -54,7 +54,7 @@ error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops:: LL | f: RangeToInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeToInclusive < std::ops::RangeToInclusive` and `std::ops::RangeToInclusive > std::ops::RangeToInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -64,7 +64,7 @@ error[E0277]: can't compare `std::ops::Range` with `std::ops::Range, | ^^^^^^^^^^^^^^^ no implementation for `std::ops::Range < std::ops::Range` and `std::ops::Range > std::ops::Range` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` + = help: the trait `PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -74,7 +74,7 @@ error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo, | ^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeTo < std::ops::RangeTo` and `std::ops::RangeTo > std::ops::RangeTo` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -84,7 +84,7 @@ error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFr LL | c: RangeFrom, | ^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeFrom < std::ops::RangeFrom` and `std::ops::RangeFrom > std::ops::RangeFrom` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -94,7 +94,7 @@ error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` LL | d: RangeFull, | ^^^^^^^^^^^^ no implementation for `std::ops::RangeFull < std::ops::RangeFull` and `std::ops::RangeFull > std::ops::RangeFull` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -104,7 +104,7 @@ error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::Ra LL | e: RangeInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeInclusive < std::ops::RangeInclusive` and `std::ops::RangeInclusive > std::ops::RangeInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -114,7 +114,7 @@ error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops:: LL | f: RangeToInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeToInclusive < std::ops::RangeToInclusive` and `std::ops::RangeToInclusive > std::ops::RangeToInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -124,7 +124,7 @@ error[E0277]: can't compare `std::ops::Range` with `std::ops::Range, | ^^^^^^^^^^^^^^^ no implementation for `std::ops::Range < std::ops::Range` and `std::ops::Range > std::ops::Range` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` + = help: the trait `PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -134,7 +134,7 @@ error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo, | ^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeTo < std::ops::RangeTo` and `std::ops::RangeTo > std::ops::RangeTo` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -144,7 +144,7 @@ error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFr LL | c: RangeFrom, | ^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeFrom < std::ops::RangeFrom` and `std::ops::RangeFrom > std::ops::RangeFrom` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -154,7 +154,7 @@ error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` LL | d: RangeFull, | ^^^^^^^^^^^^ no implementation for `std::ops::RangeFull < std::ops::RangeFull` and `std::ops::RangeFull > std::ops::RangeFull` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -164,7 +164,7 @@ error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::Ra LL | e: RangeInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeInclusive < std::ops::RangeInclusive` and `std::ops::RangeInclusive > std::ops::RangeInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -174,7 +174,7 @@ error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops:: LL | f: RangeToInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeToInclusive < std::ops::RangeToInclusive` and `std::ops::RangeToInclusive > std::ops::RangeToInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -184,7 +184,7 @@ error[E0277]: can't compare `std::ops::Range` with `std::ops::Range, | ^^^^^^^^^^^^^^^ no implementation for `std::ops::Range < std::ops::Range` and `std::ops::Range > std::ops::Range` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` + = help: the trait `PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -194,7 +194,7 @@ error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo, | ^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeTo < std::ops::RangeTo` and `std::ops::RangeTo > std::ops::RangeTo` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -204,7 +204,7 @@ error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFr LL | c: RangeFrom, | ^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeFrom < std::ops::RangeFrom` and `std::ops::RangeFrom > std::ops::RangeFrom` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -214,7 +214,7 @@ error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` LL | d: RangeFull, | ^^^^^^^^^^^^ no implementation for `std::ops::RangeFull < std::ops::RangeFull` and `std::ops::RangeFull > std::ops::RangeFull` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -224,7 +224,7 @@ error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::Ra LL | e: RangeInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeInclusive < std::ops::RangeInclusive` and `std::ops::RangeInclusive > std::ops::RangeInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -234,7 +234,7 @@ error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops:: LL | f: RangeToInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeToInclusive < std::ops::RangeToInclusive` and `std::ops::RangeToInclusive > std::ops::RangeToInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -244,7 +244,7 @@ error[E0277]: can't compare `std::ops::Range` with `std::ops::Range, | ^^^^^^^^^^^^^^^ no implementation for `std::ops::Range < std::ops::Range` and `std::ops::Range > std::ops::Range` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::Range` + = help: the trait `PartialOrd` is not implemented for `std::ops::Range` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -254,7 +254,7 @@ error[E0277]: can't compare `std::ops::RangeTo` with `std::ops::RangeTo, | ^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeTo < std::ops::RangeTo` and `std::ops::RangeTo > std::ops::RangeTo` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeTo` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeTo` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -264,7 +264,7 @@ error[E0277]: can't compare `std::ops::RangeFrom` with `std::ops::RangeFr LL | c: RangeFrom, | ^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeFrom < std::ops::RangeFrom` and `std::ops::RangeFrom > std::ops::RangeFrom` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFrom` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFrom` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -274,7 +274,7 @@ error[E0277]: can't compare `std::ops::RangeFull` with `std::ops::RangeFull` LL | d: RangeFull, | ^^^^^^^^^^^^ no implementation for `std::ops::RangeFull < std::ops::RangeFull` and `std::ops::RangeFull > std::ops::RangeFull` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeFull` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeFull` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -284,7 +284,7 @@ error[E0277]: can't compare `std::ops::RangeInclusive` with `std::ops::Ra LL | e: RangeInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeInclusive < std::ops::RangeInclusive` and `std::ops::RangeInclusive > std::ops::RangeInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -294,60 +294,60 @@ error[E0277]: can't compare `std::ops::RangeToInclusive` with `std::ops:: LL | f: RangeToInclusive, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::ops::RangeToInclusive < std::ops::RangeToInclusive` and `std::ops::RangeToInclusive > std::ops::RangeToInclusive` | - = help: the trait `std::cmp::PartialOrd` is not implemented for `std::ops::RangeToInclusive` + = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: required by `std::cmp::PartialOrd::partial_cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::Range: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `std::ops::Range: Ord` is not satisfied --> $DIR/range_traits-1.rs:5:5 | LL | a: Range, - | ^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::Range` + | ^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::Range` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeTo: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `std::ops::RangeTo: Ord` is not satisfied --> $DIR/range_traits-1.rs:12:5 | LL | b: RangeTo, - | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeTo` + | ^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeTo` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeFrom: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `std::ops::RangeFrom: Ord` is not satisfied --> $DIR/range_traits-1.rs:19:5 | LL | c: RangeFrom, - | ^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeFrom` + | ^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeFrom` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeFull: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `std::ops::RangeFull: Ord` is not satisfied --> $DIR/range_traits-1.rs:26:5 | LL | d: RangeFull, - | ^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeFull` + | ^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeFull` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeInclusive: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `std::ops::RangeInclusive: Ord` is not satisfied --> $DIR/range_traits-1.rs:33:5 | LL | e: RangeInclusive, - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeInclusive` + | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeInclusive` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeToInclusive: std::cmp::Ord` is not satisfied +error[E0277]: the trait bound `std::ops::RangeToInclusive: Ord` is not satisfied --> $DIR/range_traits-1.rs:40:5 | LL | f: RangeToInclusive, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `std::ops::RangeToInclusive` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `std::ops::RangeToInclusive` | = note: required by `std::cmp::Ord::cmp` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr b/src/test/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr index ba5e8a9e39f..536e26d2955 100644 --- a/src/test/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr +++ b/src/test/ui/recursion/issue-38591-non-regular-dropck-recursion.stderr @@ -1,4 +1,4 @@ -error: reached the recursion limit while instantiating `std::intrinsics::drop_in_place::> - shim(Some(S))` +error: reached the recursion limit while instantiating `drop_in_place::> - shim(Some(S))` --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL | LL | / pub unsafe fn drop_in_place(to_drop: *mut T) { @@ -10,7 +10,7 @@ LL | | unsafe { drop_in_place(to_drop) } LL | | } | |_^ | -note: `std::intrinsics::drop_in_place` defined here +note: `drop_in_place` defined here --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL | LL | / pub unsafe fn drop_in_place(to_drop: *mut T) { diff --git a/src/test/ui/recursion/recursive-requirements.stderr b/src/test/ui/recursion/recursive-requirements.stderr index 0237675aee4..6c0be0f7f8d 100644 --- a/src/test/ui/recursion/recursive-requirements.stderr +++ b/src/test/ui/recursion/recursive-requirements.stderr @@ -7,7 +7,7 @@ LL | struct AssertSync(PhantomData); LL | let _: AssertSync = unimplemented!(); | ^^^^^^^^^^^^^^^ `*const Bar` cannot be shared between threads safely | - = help: within `Foo`, the trait `std::marker::Sync` is not implemented for `*const Bar` + = help: within `Foo`, the trait `Sync` is not implemented for `*const Bar` = note: required because it appears within the type `Foo` error[E0277]: `*const Foo` cannot be shared between threads safely @@ -19,9 +19,9 @@ LL | struct AssertSync(PhantomData); LL | let _: AssertSync = unimplemented!(); | ^^^^^^^^^^^^^^^ `*const Foo` cannot be shared between threads safely | - = help: within `Foo`, the trait `std::marker::Sync` is not implemented for `*const Foo` + = help: within `Foo`, the trait `Sync` is not implemented for `*const Foo` = note: required because it appears within the type `Bar` - = note: required because it appears within the type `std::marker::PhantomData` + = note: required because it appears within the type `PhantomData` = note: required because it appears within the type `Foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/ref-suggestion.stderr b/src/test/ui/ref-suggestion.stderr index 313ad087c34..332dbb79cfa 100644 --- a/src/test/ui/ref-suggestion.stderr +++ b/src/test/ui/ref-suggestion.stderr @@ -2,7 +2,7 @@ error[E0382]: use of moved value: `x` --> $DIR/ref-suggestion.rs:4:5 | LL | let x = vec![1]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Vec`, which does not implement the `Copy` trait LL | let y = x; | - value moved here LL | x; @@ -12,7 +12,7 @@ error[E0382]: use of moved value: `x` --> $DIR/ref-suggestion.rs:8:5 | LL | let x = vec![1]; - | - move occurs because `x` has type `std::vec::Vec`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Vec`, which does not implement the `Copy` trait LL | let mut y = x; | - value moved here LL | x; @@ -27,7 +27,7 @@ LL | (Some(y), ()) => {}, LL | x; | ^ value used here after partial move | - = note: partial move occurs because value has type `std::vec::Vec`, which does not implement the `Copy` trait + = note: partial move occurs because value has type `Vec`, which does not implement the `Copy` trait help: borrow this field in the pattern to avoid moving `x.0.0` | LL | (Some(ref y), ()) => {}, diff --git a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr index 22586b5de91..1fff85e7664 100644 --- a/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr +++ b/src/test/ui/regions/region-bounds-on-objects-and-type-parameters.stderr @@ -27,7 +27,7 @@ error[E0392]: parameter `'c` is never used LL | struct Foo<'a,'b,'c> { | ^^ unused parameter | - = help: consider removing `'c`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'c`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr index 63fea1f4162..3607d6a722c 100644 --- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr +++ b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr @@ -74,8 +74,8 @@ note: ...so that the expression is assignable | LL | Box::new(v) | ^^^^^^^^^^^ - = note: expected `std::boxed::Box<(dyn Foo + 'b)>` - found `std::boxed::Box` + = note: expected `Box<(dyn Foo + 'b)>` + found `Box` error: aborting due to 4 previous errors diff --git a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr index c72d6483c28..930bf608ac4 100644 --- a/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr +++ b/src/test/ui/regions/regions-bounded-by-trait-requiring-static.stderr @@ -22,7 +22,7 @@ LL | assert_send::<&'a [isize]>(); | = note: type must satisfy the static lifetime -error[E0477]: the type `std::boxed::Box<&'a isize>` does not fulfill the required lifetime +error[E0477]: the type `Box<&'a isize>` does not fulfill the required lifetime --> $DIR/regions-bounded-by-trait-requiring-static.rs:44:5 | LL | assert_send::>(); diff --git a/src/test/ui/regions/regions-close-associated-type-into-object.stderr b/src/test/ui/regions/regions-close-associated-type-into-object.stderr index 9303e0f8e66..536a1b5e359 100644 --- a/src/test/ui/regions/regions-close-associated-type-into-object.stderr +++ b/src/test/ui/regions/regions-close-associated-type-into-object.stderr @@ -14,7 +14,7 @@ LL | Box::new(item) | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'static`... - = note: ...so that the type `std::boxed::Box<::Item>` will meet its required lifetime bounds + = note: ...so that the type `Box<::Item>` will meet its required lifetime bounds error[E0309]: the associated type `::Item` may not live long enough --> $DIR/regions-close-associated-type-into-object.rs:28:5 @@ -32,7 +32,7 @@ LL | Box::new(item) | ^^^^^^^^^^^^^^ | = help: consider adding an explicit lifetime bound `::Item: 'a`... - = note: ...so that the type `std::boxed::Box<::Item>` will meet its required lifetime bounds + = note: ...so that the type `Box<::Item>` will meet its required lifetime bounds error: aborting due to 4 previous errors diff --git a/src/test/ui/regions/regions-close-object-into-object-2.stderr b/src/test/ui/regions/regions-close-object-into-object-2.stderr index aab7ce993aa..da995a96310 100644 --- a/src/test/ui/regions/regions-close-object-into-object-2.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-2.stderr @@ -12,8 +12,8 @@ LL | fn g<'a, T: 'static>(v: Box + 'a>) -> Box { | ^^ help: alternatively, add an explicit `'static` bound to this reference | -LL | fn g<'a, T: 'static>(v: std::boxed::Box<(dyn A + 'static)>) -> Box { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn g<'a, T: 'static>(v: Box<(dyn A + 'static)>) -> Box { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-close-object-into-object-4.stderr b/src/test/ui/regions/regions-close-object-into-object-4.stderr index 90f807a41c5..7dc880849a6 100644 --- a/src/test/ui/regions/regions-close-object-into-object-4.stderr +++ b/src/test/ui/regions/regions-close-object-into-object-4.stderr @@ -12,8 +12,8 @@ LL | fn i<'a, T, U>(v: Box+'a>) -> Box { | ^^ help: alternatively, add an explicit `'static` bound to this reference | -LL | fn i<'a, T, U>(v: std::boxed::Box<(dyn A + 'static)>) -> Box { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn i<'a, T, U>(v: Box<(dyn A + 'static)>) -> Box { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr index 2070ce257b1..0cce89215d3 100644 --- a/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr +++ b/src/test/ui/regions/regions-close-over-type-parameter-multiple.stderr @@ -24,8 +24,8 @@ note: ...so that the expression is assignable | LL | box v as Box | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: expected `std::boxed::Box<(dyn SomeTrait + 'c)>` - found `std::boxed::Box` + = note: expected `Box<(dyn SomeTrait + 'c)>` + found `Box` error: aborting due to previous error diff --git a/src/test/ui/regions/regions-close-param-into-object.stderr b/src/test/ui/regions/regions-close-param-into-object.stderr index 705d21078ec..5c355bbb734 100644 --- a/src/test/ui/regions/regions-close-param-into-object.stderr +++ b/src/test/ui/regions/regions-close-param-into-object.stderr @@ -14,7 +14,7 @@ LL | fn p2(v: Box) -> Box | - help: consider adding an explicit lifetime bound...: `T: 'static` ... LL | Box::new(v) - | ^^^^^^^^^^^ ...so that the type `std::boxed::Box` will meet its required lifetime bounds + | ^^^^^^^^^^^ ...so that the type `Box` will meet its required lifetime bounds error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-close-param-into-object.rs:18:5 @@ -32,7 +32,7 @@ LL | fn p4<'a,T>(v: Box) -> Box | - help: consider adding an explicit lifetime bound...: `T: 'a` ... LL | Box::new(v) - | ^^^^^^^^^^^ ...so that the type `std::boxed::Box` will meet its required lifetime bounds + | ^^^^^^^^^^^ ...so that the type `Box` will meet its required lifetime bounds error: aborting due to 4 previous errors diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr index a86e6ccdc5e..afabdc1de1c 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr +++ b/src/test/ui/regions/regions-infer-paramd-indirect.nll.stderr @@ -5,7 +5,7 @@ LL | impl<'a> SetF<'a> for C<'a> { | -- lifetime `'a` defined here ... LL | fn set_f_bad(&mut self, b: Box) { - | - has type `std::boxed::Box>` + | - has type `Box>` LL | self.f = b; | ^^^^^^ assignment requires that `'1` must outlive `'a` diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.rs b/src/test/ui/regions/regions-infer-paramd-indirect.rs index beb88e81bc1..3b18bbf1df3 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.rs +++ b/src/test/ui/regions/regions-infer-paramd-indirect.rs @@ -21,8 +21,8 @@ impl<'a> SetF<'a> for C<'a> { fn set_f_bad(&mut self, b: Box) { self.f = b; //~^ ERROR mismatched types - //~| expected struct `std::boxed::Box>` - //~| found struct `std::boxed::Box>` + //~| expected struct `Box>` + //~| found struct `Box>` //~| lifetime mismatch } } diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.stderr index 3e196cf8f12..620b25c9e05 100644 --- a/src/test/ui/regions/regions-infer-paramd-indirect.stderr +++ b/src/test/ui/regions/regions-infer-paramd-indirect.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | self.f = b; | ^ lifetime mismatch | - = note: expected struct `std::boxed::Box>` - found struct `std::boxed::Box>` + = note: expected struct `Box>` + found struct `Box>` note: the anonymous lifetime #2 defined on the method body at 21:5... --> $DIR/regions-infer-paramd-indirect.rs:21:5 | diff --git a/src/test/ui/reify-intrinsic.stderr b/src/test/ui/reify-intrinsic.stderr index c4eee0f4661..675447f9721 100644 --- a/src/test/ui/reify-intrinsic.stderr +++ b/src/test/ui/reify-intrinsic.stderr @@ -7,13 +7,13 @@ LL | let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::tr | expected due to this | = note: expected fn pointer `unsafe extern "rust-intrinsic" fn(isize) -> usize` - found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` + found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}` help: use parentheses to call this function | LL | let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::transmute(...); | ^^^^^ -error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid +error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid --> $DIR/reify-intrinsic.rs:11:13 | LL | let _ = std::mem::transmute as unsafe extern "rust-intrinsic" fn(isize) -> usize; diff --git a/src/test/ui/repeat-to-run-dtor-twice.rs b/src/test/ui/repeat-to-run-dtor-twice.rs index d857178166a..0cd8eceefc5 100644 --- a/src/test/ui/repeat-to-run-dtor-twice.rs +++ b/src/test/ui/repeat-to-run-dtor-twice.rs @@ -15,5 +15,5 @@ impl Drop for Foo { fn main() { let a = Foo { x: 3 }; let _ = [ a; 5 ]; - //~^ ERROR the trait bound `Foo: std::marker::Copy` is not satisfied [E0277] + //~^ ERROR the trait bound `Foo: Copy` is not satisfied [E0277] } diff --git a/src/test/ui/repeat-to-run-dtor-twice.stderr b/src/test/ui/repeat-to-run-dtor-twice.stderr index 5434f6cef54..f07bbe3b9f3 100644 --- a/src/test/ui/repeat-to-run-dtor-twice.stderr +++ b/src/test/ui/repeat-to-run-dtor-twice.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Foo: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Foo: Copy` is not satisfied --> $DIR/repeat-to-run-dtor-twice.rs:17:13 | LL | let _ = [ a; 5 ]; - | ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `Foo` + | ^^^^^^^^ the trait `Copy` is not implemented for `Foo` | = note: the `Copy` trait is required because the repeated element will be copied diff --git a/src/test/ui/repeat_count.rs b/src/test/ui/repeat_count.rs index 7e30491f0bd..96abff4ab41 100644 --- a/src/test/ui/repeat_count.rs +++ b/src/test/ui/repeat_count.rs @@ -30,5 +30,5 @@ fn main() { } let g = [0; G { g: () }]; //~^ ERROR mismatched types - //~| expected `usize`, found struct `main::G` + //~| expected `usize`, found struct `G` } diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr index 2eab3ebc768..5fcda348ab3 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -32,7 +32,7 @@ error[E0308]: mismatched types --> $DIR/repeat_count.rs:31:17 | LL | let g = [0; G { g: () }]; - | ^^^^^^^^^^^ expected `usize`, found struct `main::G` + | ^^^^^^^^^^^ expected `usize`, found struct `G` error[E0308]: mismatched types --> $DIR/repeat_count.rs:19:17 diff --git a/src/test/ui/resolve/issue-5035-2.stderr b/src/test/ui/resolve/issue-5035-2.stderr index 4ed93ad3279..5078ffbec73 100644 --- a/src/test/ui/resolve/issue-5035-2.stderr +++ b/src/test/ui/resolve/issue-5035-2.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn I + 'static)` cannot be known at LL | fn foo(_x: K) {} | ^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn I + 'static)` + = help: the trait `Sized` is not implemented for `(dyn I + 'static)` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.stderr b/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.stderr index a324d04d394..9b59e415011 100644 --- a/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.stderr +++ b/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.stderr @@ -57,7 +57,7 @@ LL | async fn associated(); | expected `()`, found opaque type | = note: expected fn pointer `fn()` - found fn pointer `fn() -> impl std::future::Future` + found fn pointer `fn() -> impl Future` error: aborting due to 6 previous errors diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr index 2de0b6a4969..76c4b5914c1 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | let None: isize = 42; | ^^^^ ----- expected due to this | | - | expected `isize`, found enum `std::option::Option` + | expected `isize`, found enum `Option` | = note: expected type `isize` - found enum `std::option::Option<_>` + found enum `Option<_>` error: aborting due to previous error diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr index f1ed7aaa867..32eff151196 100644 --- a/src/test/ui/resolve/privacy-enum-ctor.stderr +++ b/src/test/ui/resolve/privacy-enum-ctor.stderr @@ -260,15 +260,15 @@ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:27:20 | LL | Fn(u8), - | ------ fn(u8) -> m::n::Z {m::n::Z::Fn} defined here + | ------ fn(u8) -> Z {Z::Fn} defined here ... LL | let _: Z = Z::Fn; - | - ^^^^^ expected enum `m::n::Z`, found fn item + | - ^^^^^ expected enum `Z`, found fn item | | | expected due to this | - = note: expected enum `m::n::Z` - found fn item `fn(u8) -> m::n::Z {m::n::Z::Fn}` + = note: expected enum `Z` + found fn item `fn(u8) -> Z {Z::Fn}` help: use parentheses to instantiate this tuple variant | LL | let _: Z = Z::Fn(_); @@ -294,15 +294,15 @@ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:43:16 | LL | Fn(u8), - | ------ fn(u8) -> m::E {m::E::Fn} defined here + | ------ fn(u8) -> E {E::Fn} defined here ... LL | let _: E = m::E::Fn; - | - ^^^^^^^^ expected enum `m::E`, found fn item + | - ^^^^^^^^ expected enum `E`, found fn item | | | expected due to this | - = note: expected enum `m::E` - found fn item `fn(u8) -> m::E {m::E::Fn}` + = note: expected enum `E` + found fn item `fn(u8) -> E {E::Fn}` help: use parentheses to instantiate this tuple variant | LL | let _: E = m::E::Fn(_); @@ -328,15 +328,15 @@ error[E0308]: mismatched types --> $DIR/privacy-enum-ctor.rs:51:16 | LL | Fn(u8), - | ------ fn(u8) -> m::E {m::E::Fn} defined here + | ------ fn(u8) -> E {E::Fn} defined here ... LL | let _: E = E::Fn; - | - ^^^^^ expected enum `m::E`, found fn item + | - ^^^^^ expected enum `E`, found fn item | | | expected due to this | - = note: expected enum `m::E` - found fn item `fn(u8) -> m::E {m::E::Fn}` + = note: expected enum `E` + found fn item `fn(u8) -> E {E::Fn}` help: use parentheses to instantiate this tuple variant | LL | let _: E = E::Fn(_); diff --git a/src/test/ui/retslot-cast.stderr b/src/test/ui/retslot-cast.stderr index cdef304cdc8..9b5f11ce667 100644 --- a/src/test/ui/retslot-cast.stderr +++ b/src/test/ui/retslot-cast.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/retslot-cast.rs:13:5 | LL | inner(x) - | ^^^^^^^^ expected trait `std::iter::Iterator`, found trait `std::iter::Iterator + std::marker::Send` + | ^^^^^^^^ expected trait `Iterator`, found trait `Iterator + Send` | - = note: expected enum `std::option::Option<&dyn std::iter::Iterator>` - found enum `std::option::Option<&dyn std::iter::Iterator + std::marker::Send>` + = note: expected enum `Option<&dyn Iterator>` + found enum `Option<&dyn Iterator + Send>` error: aborting due to previous error diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-across-arms.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-across-arms.stderr index 7becd013249..6c3d1caf807 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-across-arms.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-across-arms.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of `v` in pattern guard --> $DIR/rfc-reject-double-move-across-arms.rs:5:36 | LL | VecWrapper::A(v) if { drop(v); false } => 1, - | ^ move occurs because `v` has type `std::vec::Vec`, which does not implement the `Copy` trait + | ^ move occurs because `v` has type `Vec`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard diff --git a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-in-first-arm.stderr b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-in-first-arm.stderr index b93e7219068..d1204bc2601 100644 --- a/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-in-first-arm.stderr +++ b/src/test/ui/rfc-0107-bind-by-move-pattern-guards/rfc-reject-double-move-in-first-arm.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of `v` in pattern guard --> $DIR/rfc-reject-double-move-in-first-arm.rs:6:30 | LL | A { a: v } if { drop(v); true } => v, - | ^ move occurs because `v` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `v` has type `Box`, which does not implement the `Copy` trait | = note: variables bound in patterns cannot be moved from until after the end of the pattern guard diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.rs index 8f65144b140..3b60cbc5783 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-impl-trait.rs @@ -1,3 +1,3 @@ // Tests that an `impl Trait` that is not `impl Termination` will not work. fn main() -> impl Copy { } -//~^ ERROR `main` has invalid return type `impl std::marker::Copy` +//~^ ERROR `main` has invalid return type `impl Copy` 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 8a718183a83..5ee6d127e85 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,8 +1,8 @@ -error[E0277]: `main` has invalid return type `impl std::marker::Copy` +error[E0277]: `main` has invalid return type `impl Copy` --> $DIR/termination-trait-impl-trait.rs:2:14 | LL | fn main() -> impl Copy { } - | ^^^^^^^^^ `main` can only return types that implement `std::process::Termination` + | ^^^^^^^^^ `main` can only return types that implement `Termination` | = help: consider using `()`, or a `Result` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.rs index 09bd1c8492f..10f7d2215c3 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.rs @@ -1,6 +1,6 @@ fn main() -> i32 { //~^ ERROR `main` has invalid return type `i32` -//~| NOTE `main` can only return types that implement `std::process::Termination` +//~| NOTE `main` can only return types that implement `Termination` //~| HELP consider using `()`, or a `Result` 0 } diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.stderr index e88e3d884ec..53779d365f3 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-main-i32.stderr @@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `i32` --> $DIR/termination-trait-main-i32.rs:1:14 | LL | fn main() -> i32 { - | ^^^ `main` can only return types that implement `std::process::Termination` + | ^^^ `main` can only return types that implement `Termination` | = help: consider using `()`, or a `Result` 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 31b90340d79..bc8fd92ce58 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 @@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `char` --> $DIR/termination-trait-main-wrong-type.rs:1:14 | LL | fn main() -> char { - | ^^^^ `main` can only return types that implement `std::process::Termination` + | ^^^^ `main` can only return types that implement `Termination` | = help: consider using `()`, or a `Result` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr index 72a58a04170..cb329548d86 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-not-satisfied.stderr @@ -2,7 +2,7 @@ error[E0277]: `main` has invalid return type `ReturnType` --> $DIR/termination-trait-not-satisfied.rs:3:14 | LL | fn main() -> ReturnType { - | ^^^^^^^^^^ `main` can only return types that implement `std::process::Termination` + | ^^^^^^^^^^ `main` can only return types that implement `Termination` | = help: consider using `()`, or a `Result` diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index d28232515f3..d015b72c5cf 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -1,17 +1,17 @@ -error[E0277]: `main` has invalid return type `std::result::Result` +error[E0277]: `main` has invalid return type `std::result::Result` --> $DIR/termination-trait-test-wrong-type.rs:6:1 | LL | / fn can_parse_zero_as_f32() -> Result { LL | | "0".parse() LL | | } - | |_^ `main` can only return types that implement `std::process::Termination` + | |_^ `main` can only return types that implement `Termination` | ::: $SRC_DIR/test/src/lib.rs:LL:COL | LL | pub fn assert_test_result(result: T) { - | ----------- required by this bound in `test::assert_test_result` + | ----------- required by this bound in `assert_test_result` | - = help: the trait `std::process::Termination` is not implemented for `std::result::Result` + = help: the trait `Termination` is not implemented for `std::result::Result` = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error diff --git a/src/test/ui/rfc-2008-non-exhaustive/enum.rs b/src/test/ui/rfc-2008-non-exhaustive/enum.rs index 802f20b4bed..73e0b98296b 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/enum.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/enum.rs @@ -4,7 +4,7 @@ extern crate enums; use enums::{EmptyNonExhaustiveEnum, NonExhaustiveEnum}; fn empty(x: EmptyNonExhaustiveEnum) { - match x {} //~ ERROR type `enums::EmptyNonExhaustiveEnum` is non-empty + match x {} //~ ERROR type `EmptyNonExhaustiveEnum` is non-empty match x { _ => {}, // ok } diff --git a/src/test/ui/rfc-2008-non-exhaustive/enum.stderr b/src/test/ui/rfc-2008-non-exhaustive/enum.stderr index 28e450336f5..1d1c43c9e8f 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/enum.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/enum.stderr @@ -1,11 +1,11 @@ -error[E0004]: non-exhaustive patterns: type `enums::EmptyNonExhaustiveEnum` is non-empty +error[E0004]: non-exhaustive patterns: type `EmptyNonExhaustiveEnum` is non-empty --> $DIR/enum.rs:7:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `enums::EmptyNonExhaustiveEnum` + = note: the matched value is of type `EmptyNonExhaustiveEnum` error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/enum.rs:16:11 @@ -14,7 +14,7 @@ LL | match enum_unit { | ^^^^^^^^^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `enums::NonExhaustiveEnum` + = note: the matched value is of type `NonExhaustiveEnum` error[E0004]: non-exhaustive patterns: `_` not covered --> $DIR/enum.rs:23:11 @@ -23,7 +23,7 @@ LL | match enum_unit {}; | ^^^^^^^^^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `enums::NonExhaustiveEnum` + = note: the matched value is of type `NonExhaustiveEnum` error: aborting due to 3 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs b/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs index 900b9333f76..5feb9c98e96 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs +++ b/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.rs @@ -10,15 +10,15 @@ use types::{NonExhaustiveEnum, NormalStruct, UnitStruct, TupleStruct, NonExhaust extern { pub fn non_exhaustive_enum(_: NonExhaustiveEnum); - //~^ ERROR `extern` block uses type `types::NonExhaustiveEnum`, which is not FFI-safe + //~^ ERROR `extern` block uses type `NonExhaustiveEnum`, which is not FFI-safe pub fn non_exhaustive_normal_struct(_: NormalStruct); - //~^ ERROR `extern` block uses type `types::NormalStruct`, which is not FFI-safe + //~^ ERROR `extern` block uses type `NormalStruct`, which is not FFI-safe pub fn non_exhaustive_unit_struct(_: UnitStruct); - //~^ ERROR `extern` block uses type `types::UnitStruct`, which is not FFI-safe + //~^ ERROR `extern` block uses type `UnitStruct`, which is not FFI-safe pub fn non_exhaustive_tuple_struct(_: TupleStruct); - //~^ ERROR `extern` block uses type `types::TupleStruct`, which is not FFI-safe + //~^ ERROR `extern` block uses type `TupleStruct`, which is not FFI-safe pub fn non_exhaustive_variant(_: NonExhaustiveVariants); - //~^ ERROR `extern` block uses type `types::NonExhaustiveVariants`, which is not FFI-safe + //~^ ERROR `extern` block uses type `NonExhaustiveVariants`, which is not FFI-safe } fn main() { } diff --git a/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr b/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr index 4956226712d..8a18ebc16fe 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr @@ -1,4 +1,4 @@ -error: `extern` block uses type `types::NonExhaustiveEnum`, which is not FFI-safe +error: `extern` block uses type `NonExhaustiveEnum`, which is not FFI-safe --> $DIR/extern_crate_improper.rs:12:35 | LL | pub fn non_exhaustive_enum(_: NonExhaustiveEnum); @@ -11,7 +11,7 @@ LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: this enum is non-exhaustive -error: `extern` block uses type `types::NormalStruct`, which is not FFI-safe +error: `extern` block uses type `NormalStruct`, which is not FFI-safe --> $DIR/extern_crate_improper.rs:14:44 | LL | pub fn non_exhaustive_normal_struct(_: NormalStruct); @@ -19,7 +19,7 @@ LL | pub fn non_exhaustive_normal_struct(_: NormalStruct); | = note: this struct is non-exhaustive -error: `extern` block uses type `types::UnitStruct`, which is not FFI-safe +error: `extern` block uses type `UnitStruct`, which is not FFI-safe --> $DIR/extern_crate_improper.rs:16:42 | LL | pub fn non_exhaustive_unit_struct(_: UnitStruct); @@ -27,7 +27,7 @@ LL | pub fn non_exhaustive_unit_struct(_: UnitStruct); | = note: this struct is non-exhaustive -error: `extern` block uses type `types::TupleStruct`, which is not FFI-safe +error: `extern` block uses type `TupleStruct`, which is not FFI-safe --> $DIR/extern_crate_improper.rs:18:43 | LL | pub fn non_exhaustive_tuple_struct(_: TupleStruct); @@ -35,7 +35,7 @@ LL | pub fn non_exhaustive_tuple_struct(_: TupleStruct); | = note: this struct is non-exhaustive -error: `extern` block uses type `types::NonExhaustiveVariants`, which is not FFI-safe +error: `extern` block uses type `NonExhaustiveVariants`, which is not FFI-safe --> $DIR/extern_crate_improper.rs:20:38 | LL | pub fn non_exhaustive_variant(_: NonExhaustiveVariants); diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr index d2d319f50c7..f8ed156b57e 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A { | - expected `A` because of return type LL | x - | ^ expected struct `A`, found enum `uninhabited::UninhabitedEnum` + | ^ expected struct `A`, found enum `UninhabitedEnum` error[E0308]: mismatched types --> $DIR/coercions.rs:27:5 @@ -12,7 +12,7 @@ error[E0308]: mismatched types LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A { | - expected `A` because of return type LL | x - | ^ expected struct `A`, found struct `uninhabited::UninhabitedTupleStruct` + | ^ expected struct `A`, found struct `UninhabitedTupleStruct` error[E0308]: mismatched types --> $DIR/coercions.rs:31:5 @@ -20,7 +20,7 @@ error[E0308]: mismatched types LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A { | - expected `A` because of return type LL | x - | ^ expected struct `A`, found struct `uninhabited::UninhabitedStruct` + | ^ expected struct `A`, found struct `UninhabitedStruct` error[E0308]: mismatched types --> $DIR/coercions.rs:35:5 @@ -28,7 +28,7 @@ error[E0308]: mismatched types LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A { | - expected `A` because of return type LL | x - | ^ expected struct `A`, found enum `uninhabited::UninhabitedVariants` + | ^ expected struct `A`, found enum `UninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr index bd136333b76..c461302a366 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match.stderr @@ -1,38 +1,38 @@ -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedEnum` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedEnum` is non-empty --> $DIR/indirect_match.rs:19:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedEnum` + = note: the matched value is of type `IndirectUninhabitedEnum` -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedStruct` is non-empty --> $DIR/indirect_match.rs:23:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedStruct` + = note: the matched value is of type `IndirectUninhabitedStruct` -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedTupleStruct` is non-empty --> $DIR/indirect_match.rs:27:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedTupleStruct` + = note: the matched value is of type `IndirectUninhabitedTupleStruct` -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedVariants` is non-empty --> $DIR/indirect_match.rs:33:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedVariants` + = note: the matched value is of type `IndirectUninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr index 5211b577264..c397158c024 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/indirect_match_with_exhaustive_patterns.stderr @@ -1,38 +1,38 @@ -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedEnum` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedEnum` is non-empty --> $DIR/indirect_match_with_exhaustive_patterns.rs:23:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedEnum` + = note: the matched value is of type `IndirectUninhabitedEnum` -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedStruct` is non-empty --> $DIR/indirect_match_with_exhaustive_patterns.rs:27:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedStruct` + = note: the matched value is of type `IndirectUninhabitedStruct` -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedTupleStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedTupleStruct` is non-empty --> $DIR/indirect_match_with_exhaustive_patterns.rs:31:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedTupleStruct` + = note: the matched value is of type `IndirectUninhabitedTupleStruct` -error[E0004]: non-exhaustive patterns: type `uninhabited::IndirectUninhabitedVariants` is non-empty +error[E0004]: non-exhaustive patterns: type `IndirectUninhabitedVariants` is non-empty --> $DIR/indirect_match_with_exhaustive_patterns.rs:37:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::IndirectUninhabitedVariants` + = note: the matched value is of type `IndirectUninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr index 961b3e56732..1f981ba82d0 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr @@ -1,29 +1,29 @@ -error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty +error[E0004]: non-exhaustive patterns: type `UninhabitedEnum` is non-empty --> $DIR/match.rs:19:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedEnum` + = note: the matched value is of type `UninhabitedEnum` -error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty --> $DIR/match.rs:23:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedStruct` + = note: the matched value is of type `UninhabitedStruct` -error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty --> $DIR/match.rs:27:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedTupleStruct` + = note: the matched value is of type `UninhabitedTupleStruct` error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered --> $DIR/match.rs:31:11 @@ -39,7 +39,7 @@ LL | #[non_exhaustive] Struct { x: ! } | ------ not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedVariants` + = note: the matched value is of type `UninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr index c489edeb699..0ff1c01cbdd 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr @@ -1,29 +1,29 @@ -error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty +error[E0004]: non-exhaustive patterns: type `UninhabitedEnum` is non-empty --> $DIR/match_with_exhaustive_patterns.rs:22:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedEnum` + = note: the matched value is of type `UninhabitedEnum` -error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `UninhabitedStruct` is non-empty --> $DIR/match_with_exhaustive_patterns.rs:26:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedStruct` + = note: the matched value is of type `UninhabitedStruct` -error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedTupleStruct` is non-empty +error[E0004]: non-exhaustive patterns: type `UninhabitedTupleStruct` is non-empty --> $DIR/match_with_exhaustive_patterns.rs:30:11 | LL | match x {} | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedTupleStruct` + = note: the matched value is of type `UninhabitedTupleStruct` error[E0004]: non-exhaustive patterns: `Tuple(_)` and `Struct { .. }` not covered --> $DIR/match_with_exhaustive_patterns.rs:34:11 @@ -39,7 +39,7 @@ LL | #[non_exhaustive] Struct { x: ! } | ------ not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms - = note: the matched value is of type `uninhabited::UninhabitedVariants` + = note: the matched value is of type `UninhabitedVariants` error: aborting due to 4 previous errors diff --git a/src/test/ui/rfc-2093-infer-outlives/projection.stderr b/src/test/ui/rfc-2093-infer-outlives/projection.stderr index 3746bab4d54..840676e7966 100644 --- a/src/test/ui/rfc-2093-infer-outlives/projection.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/projection.stderr @@ -6,7 +6,7 @@ LL | | bar: &'a T::Item LL | | } | |_^ | - = note: ::Item: 'a + = note: ::Item: 'a error: aborting due to previous error diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr index 6efc1176d05..dfa44008ad7 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr @@ -1,4 +1,4 @@ -error[E0491]: in type `&'a rev_variant_struct_region::Foo<'b>`, reference has a longer lifetime than the data it references +error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-region-rev.rs:17:9 | LL | type Out = &'a Foo<'b>; diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr index 06e5f24dec9..3561379138b 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr @@ -1,4 +1,4 @@ -error[E0491]: in type `&'a variant_struct_region::Foo<'b>`, reference has a longer lifetime than the data it references +error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-region.rs:17:9 | LL | type Out = &'a Foo<'b>; diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr index d02f7b79621..207686defa1 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr @@ -1,4 +1,4 @@ -error[E0491]: in type `&'a variant_struct_type::Foo<&'b i32>`, reference has a longer lifetime than the data it references +error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-type-rev.rs:17:9 | LL | type Out = &'a Foo<&'b i32>; diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr index 40c70f53245..c1c4e78f785 100644 --- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr +++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr @@ -1,4 +1,4 @@ -error[E0491]: in type `&'a variant_struct_type::Foo<&'b i32>`, reference has a longer lifetime than the data it references +error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references --> $DIR/regions-outlives-nominal-type-type.rs:17:9 | LL | type Out = &'a Foo<&'b i32>; diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs index bdde484c252..f2fb62d76f3 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.rs @@ -3,5 +3,5 @@ struct NotDebug; fn main() { - let _: NotDebug = dbg!(NotDebug); //~ ERROR `NotDebug` doesn't implement `std::fmt::Debug` + let _: NotDebug = dbg!(NotDebug); //~ ERROR `NotDebug` doesn't implement `Debug` } diff --git a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr index 799a05bf7e8..6d150b84dd8 100644 --- a/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr +++ b/src/test/ui/rfc-2361-dbg-macro/dbg-macro-requires-debug.stderr @@ -1,12 +1,12 @@ -error[E0277]: `NotDebug` doesn't implement `std::fmt::Debug` +error[E0277]: `NotDebug` doesn't implement `Debug` --> $DIR/dbg-macro-requires-debug.rs:6:23 | LL | let _: NotDebug = dbg!(NotDebug); | ^^^^^^^^^^^^^^ `NotDebug` cannot be formatted using `{:?}` | - = help: the trait `std::fmt::Debug` is not implemented for `NotDebug` - = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug` - = note: required because of the requirements on the impl of `std::fmt::Debug` for `&NotDebug` + = help: the trait `Debug` is not implemented for `NotDebug` + = note: add `#[derive(Debug)]` or manually implement `Debug` + = note: required because of the requirements on the impl of `Debug` for `&NotDebug` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs index 71af704c69f..25c7fe760d3 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs @@ -40,11 +40,11 @@ fn nested_within_if_expr() { fn _check_try_binds_tighter() -> Result<(), ()> { if let 0 = 0? {} - //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~^ ERROR the `?` operator can only be applied to values that implement `Try` Ok(()) } if (let 0 = 0)? {} //~ ERROR `let` expressions are not supported here - //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~^ ERROR the `?` operator can only be applied to values that implement `Try` //~| ERROR the `?` operator can only be used in a function that returns `Result` if true || let 0 = 0 {} //~ ERROR `let` expressions are not supported here @@ -104,11 +104,11 @@ fn nested_within_while_expr() { fn _check_try_binds_tighter() -> Result<(), ()> { while let 0 = 0? {} - //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~^ ERROR the `?` operator can only be applied to values that implement `Try` Ok(()) } while (let 0 = 0)? {} //~ ERROR `let` expressions are not supported here - //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~^ ERROR the `?` operator can only be applied to values that implement `Try` //~| ERROR the `?` operator can only be used in a function that returns `Result` while true || let 0 = 0 {} //~ ERROR `let` expressions are not supported here @@ -177,12 +177,12 @@ fn outside_if_and_while_expr() { fn _check_try_binds_tighter() -> Result<(), ()> { let 0 = 0?; - //~^ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~^ ERROR the `?` operator can only be applied to values that implement `Try` Ok(()) } (let 0 = 0)?; //~ ERROR `let` expressions are not supported here //~^ ERROR the `?` operator can only be used in a function that returns `Result` - //~| ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + //~| ERROR the `?` operator can only be applied to values that implement `Try` true || let 0 = 0; //~ ERROR `let` expressions are not supported here (true || let 0 = 0); //~ ERROR `let` expressions are not supported here diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index 3372495d0fe..d38a3aba46f 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -537,16 +537,16 @@ error[E0600]: cannot apply unary operator `-` to type `bool` LL | if -let 0 = 0 {} | ^^^^^^^^^^ cannot apply unary operator `-` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions.rs:46:8 | LL | if (let 0 = 0)? {} | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | - = help: the trait `std::ops::Try` is not implemented for `bool` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `bool` + = note: required by `into_result` -error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/disallowed-positions.rs:46:8 | LL | / fn nested_within_if_expr() { @@ -561,8 +561,8 @@ LL | | if let true = let true = true {} LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `()` + = note: required by `from_error` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:56:8 @@ -588,19 +588,19 @@ error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:61:8 | LL | if ..(let 0 = 0) {} - | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeTo` + | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo` | = note: expected type `bool` - found struct `std::ops::RangeTo` + found struct `RangeTo` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:63:8 | LL | if (let 0 = 0).. {} - | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeFrom` + | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom` | = note: expected type `bool` - found struct `std::ops::RangeFrom` + found struct `RangeFrom` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:67:12 @@ -695,14 +695,14 @@ LL | if let Range { start: true, end } = t..&&false {} = note: expected type `bool` found struct `std::ops::Range` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions.rs:42:20 | LL | if let 0 = 0? {} | ^^ the `?` operator cannot be applied to type `{integer}` | - = help: the trait `std::ops::Try` is not implemented for `{integer}` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `{integer}` + = note: required by `into_result` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:96:11 @@ -725,16 +725,16 @@ error[E0600]: cannot apply unary operator `-` to type `bool` LL | while -let 0 = 0 {} | ^^^^^^^^^^ cannot apply unary operator `-` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions.rs:110:11 | LL | while (let 0 = 0)? {} | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | - = help: the trait `std::ops::Try` is not implemented for `bool` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `bool` + = note: required by `into_result` -error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/disallowed-positions.rs:110:11 | LL | / fn nested_within_while_expr() { @@ -749,8 +749,8 @@ LL | | while let true = let true = true {} LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `()` + = note: required by `from_error` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:120:11 @@ -776,19 +776,19 @@ error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:125:11 | LL | while ..(let 0 = 0) {} - | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeTo` + | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo` | = note: expected type `bool` - found struct `std::ops::RangeTo` + found struct `RangeTo` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:127:11 | LL | while (let 0 = 0).. {} - | ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeFrom` + | ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom` | = note: expected type `bool` - found struct `std::ops::RangeFrom` + found struct `RangeFrom` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:131:15 @@ -883,14 +883,14 @@ LL | while let Range { start: true, end } = t..&&false {} = note: expected type `bool` found struct `std::ops::Range` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions.rs:106:23 | LL | while let 0 = 0? {} | ^^ the `?` operator cannot be applied to type `{integer}` | - = help: the trait `std::ops::Try` is not implemented for `{integer}` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `{integer}` + = note: required by `into_result` error[E0614]: type `bool` cannot be dereferenced --> $DIR/disallowed-positions.rs:173:5 @@ -904,16 +904,16 @@ error[E0600]: cannot apply unary operator `-` to type `bool` LL | -let 0 = 0; | ^^^^^^^^^^ cannot apply unary operator `-` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions.rs:183:5 | LL | (let 0 = 0)?; | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool` | - = help: the trait `std::ops::Try` is not implemented for `bool` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `bool` + = note: required by `into_result` -error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/disallowed-positions.rs:183:5 | LL | / fn outside_if_and_while_expr() { @@ -928,8 +928,8 @@ LL | | LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `()` + = note: required by `from_error` error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:198:10 @@ -951,14 +951,14 @@ LL | fn outside_if_and_while_expr() { LL | &let 0 = 0 | ^^^^^^^^^^ expected `()`, found `&bool` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions.rs:179:17 | LL | let 0 = 0?; | ^^ the `?` operator cannot be applied to type `{integer}` | - = help: the trait `std::ops::Try` is not implemented for `{integer}` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `{integer}` + = note: required by `into_result` error: aborting due to 103 previous errors; 2 warnings emitted diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr index b57472d9595..3eae2ae6ae0 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/const-and-non-const-impl.stderr @@ -1,13 +1,13 @@ -error[E0119]: conflicting implementations of trait `std::ops::Add` for type `i32`: +error[E0119]: conflicting implementations of trait `Add` for type `i32`: --> $DIR/const-and-non-const-impl.rs:6:1 | LL | impl const std::ops::Add for i32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::ops::Add for i32; + - impl Add for i32; -error[E0119]: conflicting implementations of trait `std::ops::Add` for type `Int`: +error[E0119]: conflicting implementations of trait `Add` for type `Int`: --> $DIR/const-and-non-const-impl.rs:24:1 | LL | impl std::ops::Add for Int { diff --git a/src/test/ui/rfc-2632-const-trait-impl/stability.stderr b/src/test/ui/rfc-2632-const-trait-impl/stability.stderr index e7002a1a045..ddef7a3aafc 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/stability.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/stability.stderr @@ -10,7 +10,7 @@ LL | | } = note: see issue #57563 for more information = help: add `#![feature(const_fn)]` to the crate attributes to enable -error[E0723]: can only call other `const fn` within a `const fn`, but `::add` is not stable as `const fn` +error[E0723]: can only call other `const fn` within a `const fn`, but `::add` is not stable as `const fn` --> $DIR/stability.rs:32:5 | LL | Int(1i32) + Int(2i32) diff --git a/src/test/ui/rfc1623.nll.stderr b/src/test/ui/rfc1623.nll.stderr index 848d4fef1ab..b5dd0c9d2a6 100644 --- a/src/test/ui/rfc1623.nll.stderr +++ b/src/test/ui/rfc1623.nll.stderr @@ -1,4 +1,4 @@ -error[E0277]: `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely +error[E0277]: `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely --> $DIR/rfc1623.rs:21:1 | LL | / static SOME_STRUCT: &SomeStruct = &SomeStruct { @@ -7,10 +7,10 @@ LL | | bar: &Bar { bools: &[true, true] }, LL | | f: &id, LL | | LL | | }; - | |__^ `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely + | |__^ `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` cannot be shared between threads safely | - = help: within `&SomeStruct`, the trait `std::marker::Sync` is not implemented for `dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` - = note: required because it appears within the type `&dyn for<'a, 'b> std::ops::Fn(&'a Foo<'b>) -> &'a Foo<'b>` + = help: within `&SomeStruct`, the trait `Sync` is not implemented for `dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` + = note: required because it appears within the type `&dyn for<'a, 'b> Fn(&'a Foo<'b>) -> &'a Foo<'b>` = note: required because it appears within the type `SomeStruct` = note: required because it appears within the type `&SomeStruct` = note: shared static variables must have a type that implements `Sync` diff --git a/src/test/ui/rfc1623.stderr b/src/test/ui/rfc1623.stderr index 2efc58ac381..2835e47fa45 100644 --- a/src/test/ui/rfc1623.stderr +++ b/src/test/ui/rfc1623.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | f: &id, | ^^^ one type is more general than the other | - = note: expected type `std::ops::FnOnce<(&'a Foo<'b>,)>` - found type `std::ops::FnOnce<(&Foo<'_>,)>` + = note: expected type `FnOnce<(&'a Foo<'b>,)>` + found type `FnOnce<(&Foo<'_>,)>` error: aborting due to previous error diff --git a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs index 5c838fd719c..43bda49624e 100644 --- a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs +++ b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs @@ -21,14 +21,14 @@ fn call_once(f: impl FnOnce()) { } fn main() { - call(foo); //~ ERROR expected a `std::ops::Fn<()>` closure, found `fn() {foo}` - call_mut(foo); //~ ERROR expected a `std::ops::FnMut<()>` closure, found `fn() {foo}` - call_once(foo); //~ ERROR expected a `std::ops::FnOnce<()>` closure, found `fn() {foo}` + call(foo); //~ ERROR expected a `Fn<()>` closure, found `fn() {foo}` + call_mut(foo); //~ ERROR expected a `FnMut<()>` closure, found `fn() {foo}` + call_once(foo); //~ ERROR expected a `FnOnce<()>` closure, found `fn() {foo}` call(foo_unsafe); - //~^ ERROR expected a `std::ops::Fn<()>` closure, found `unsafe fn() {foo_unsafe}` + //~^ ERROR expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}` call_mut(foo_unsafe); - //~^ ERROR expected a `std::ops::FnMut<()>` closure, found `unsafe fn() {foo_unsafe}` + //~^ ERROR expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}` call_once(foo_unsafe); - //~^ ERROR expected a `std::ops::FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}` + //~^ ERROR expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}` } diff --git a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr index f9b4eed0497..4ed86b34a34 100644 --- a/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr +++ b/src/test/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr @@ -1,4 +1,4 @@ -error[E0277]: expected a `std::ops::Fn<()>` closure, found `fn() {foo}` +error[E0277]: expected a `Fn<()>` closure, found `fn() {foo}` --> $DIR/fn-traits.rs:24:10 | LL | fn call(f: impl Fn()) { @@ -7,11 +7,11 @@ LL | fn call(f: impl Fn()) { LL | call(foo); | ^^^ expected an `Fn<()>` closure, found `fn() {foo}` | - = help: the trait `std::ops::Fn<()>` is not implemented for `fn() {foo}` + = help: the trait `Fn<()>` is not implemented for `fn() {foo}` = note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }` = note: `#[target_feature]` functions do not implement the `Fn` traits -error[E0277]: expected a `std::ops::FnMut<()>` closure, found `fn() {foo}` +error[E0277]: expected a `FnMut<()>` closure, found `fn() {foo}` --> $DIR/fn-traits.rs:25:14 | LL | fn call_mut(f: impl FnMut()) { @@ -20,11 +20,11 @@ LL | fn call_mut(f: impl FnMut()) { LL | call_mut(foo); | ^^^ expected an `FnMut<()>` closure, found `fn() {foo}` | - = help: the trait `std::ops::FnMut<()>` is not implemented for `fn() {foo}` + = help: the trait `FnMut<()>` is not implemented for `fn() {foo}` = note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }` = note: `#[target_feature]` functions do not implement the `Fn` traits -error[E0277]: expected a `std::ops::FnOnce<()>` closure, found `fn() {foo}` +error[E0277]: expected a `FnOnce<()>` closure, found `fn() {foo}` --> $DIR/fn-traits.rs:26:15 | LL | fn call_once(f: impl FnOnce()) { @@ -33,11 +33,11 @@ LL | fn call_once(f: impl FnOnce()) { LL | call_once(foo); | ^^^ expected an `FnOnce<()>` closure, found `fn() {foo}` | - = help: the trait `std::ops::FnOnce<()>` is not implemented for `fn() {foo}` + = help: the trait `FnOnce<()>` is not implemented for `fn() {foo}` = note: wrap the `fn() {foo}` in a closure with no arguments: `|| { /* code */ }` = note: `#[target_feature]` functions do not implement the `Fn` traits -error[E0277]: expected a `std::ops::Fn<()>` closure, found `unsafe fn() {foo_unsafe}` +error[E0277]: expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}` --> $DIR/fn-traits.rs:28:10 | LL | fn call(f: impl Fn()) { @@ -46,11 +46,11 @@ LL | fn call(f: impl Fn()) { LL | call(foo_unsafe); | ^^^^^^^^^^ expected an `Fn<()>` closure, found `unsafe fn() {foo_unsafe}` | - = help: the trait `std::ops::Fn<()>` is not implemented for `unsafe fn() {foo_unsafe}` + = help: the trait `Fn<()>` is not implemented for `unsafe fn() {foo_unsafe}` = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }` = note: `#[target_feature]` functions do not implement the `Fn` traits -error[E0277]: expected a `std::ops::FnMut<()>` closure, found `unsafe fn() {foo_unsafe}` +error[E0277]: expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}` --> $DIR/fn-traits.rs:30:14 | LL | fn call_mut(f: impl FnMut()) { @@ -59,11 +59,11 @@ LL | fn call_mut(f: impl FnMut()) { LL | call_mut(foo_unsafe); | ^^^^^^^^^^ expected an `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}` | - = help: the trait `std::ops::FnMut<()>` is not implemented for `unsafe fn() {foo_unsafe}` + = help: the trait `FnMut<()>` is not implemented for `unsafe fn() {foo_unsafe}` = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }` = note: `#[target_feature]` functions do not implement the `Fn` traits -error[E0277]: expected a `std::ops::FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}` +error[E0277]: expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}` --> $DIR/fn-traits.rs:32:15 | LL | fn call_once(f: impl FnOnce()) { @@ -72,7 +72,7 @@ LL | fn call_once(f: impl FnOnce()) { LL | call_once(foo_unsafe); | ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}` | - = help: the trait `std::ops::FnOnce<()>` is not implemented for `unsafe fn() {foo_unsafe}` + = help: the trait `FnOnce<()>` is not implemented for `unsafe fn() {foo_unsafe}` = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }` = note: `#[target_feature]` functions do not implement the `Fn` traits diff --git a/src/test/ui/rmeta_meta_main.rs b/src/test/ui/rmeta_meta_main.rs index 52cd0c2f53f..839f350d741 100644 --- a/src/test/ui/rmeta_meta_main.rs +++ b/src/test/ui/rmeta_meta_main.rs @@ -10,5 +10,5 @@ extern crate rmeta_meta; use rmeta_meta::Foo; fn main() { - let _ = Foo { field2: 42 }; //~ ERROR struct `rmeta_meta::Foo` has no field named `field2` + let _ = Foo { field2: 42 }; //~ ERROR struct `Foo` has no field named `field2` } diff --git a/src/test/ui/rmeta_meta_main.stderr b/src/test/ui/rmeta_meta_main.stderr index 347e5e97d7a..0c6ed9afd35 100644 --- a/src/test/ui/rmeta_meta_main.stderr +++ b/src/test/ui/rmeta_meta_main.stderr @@ -1,4 +1,4 @@ -error[E0560]: struct `rmeta_meta::Foo` has no field named `field2` +error[E0560]: struct `Foo` has no field named `field2` --> $DIR/rmeta_meta_main.rs:13:19 | LL | let _ = Foo { field2: 42 }; diff --git a/src/test/ui/self/arbitrary-self-types-not-object-safe.curr.stderr b/src/test/ui/self/arbitrary-self-types-not-object-safe.curr.stderr index 7948f7e9d6b..85da2c6eeb0 100644 --- a/src/test/ui/self/arbitrary-self-types-not-object-safe.curr.stderr +++ b/src/test/ui/self/arbitrary-self-types-not-object-safe.curr.stderr @@ -26,8 +26,8 @@ LL | fn foo(self: &Rc) -> usize; LL | let x = Rc::new(5usize) as Rc; | ^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::rc::Rc` - = note: required by cast to type `std::rc::Rc` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Rc` + = note: required by cast to type `Rc` error: aborting due to 2 previous errors diff --git a/src/test/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/src/test/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr index 74e76b8265f..c4cde2c3561 100644 --- a/src/test/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr +++ b/src/test/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr @@ -12,8 +12,8 @@ LL | fn foo(self: &Rc) -> usize; LL | let x = Rc::new(5usize) as Rc; | ^^^^^^^^^^^^^^^ the trait `Foo` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::rc::Rc` - = note: required by cast to type `std::rc::Rc` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Rc` + = note: required by cast to type `Rc` error: aborting due to previous error diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr index 17099201d11..92241b2fb2d 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch.nll.stderr @@ -20,7 +20,7 @@ error: lifetime may not live long enough --> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:13:58 | LL | fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } - | -- ---- has type `std::pin::Pin<&'1 Foo>` ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a` + | -- ---- has type `Pin<&'1 Foo>` ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a` | | | lifetime `'a` defined here diff --git a/src/test/ui/self/point-at-arbitrary-self-type-method.stderr b/src/test/ui/self/point-at-arbitrary-self-type-method.stderr index 96401cb71d9..2954a499c18 100644 --- a/src/test/ui/self/point-at-arbitrary-self-type-method.stderr +++ b/src/test/ui/self/point-at-arbitrary-self-type-method.stderr @@ -5,7 +5,7 @@ LL | struct A; | --------- method `foo` not found for this ... LL | fn foo(self: Box) {} - | --- the method is available for `std::boxed::Box` here + | --- the method is available for `Box` here ... LL | A.foo(); | ^^^ method not found in `A` diff --git a/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr b/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr index 37873031da3..89fe84c0d2d 100644 --- a/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr +++ b/src/test/ui/self/point-at-arbitrary-self-type-trait-method.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `foo` found for struct `A` in the current scope LL | trait B { fn foo(self: Box); } | --- --------- the method might not be found because of this arbitrary self type | | - | the method is available for `std::boxed::Box` here + | the method is available for `Box` here LL | struct A; | --------- method `foo` not found for this ... diff --git a/src/test/ui/self/self_type_keyword.stderr b/src/test/ui/self/self_type_keyword.stderr index 7997cdc2957..47c04f1eb72 100644 --- a/src/test/ui/self/self_type_keyword.stderr +++ b/src/test/ui/self/self_type_keyword.stderr @@ -77,7 +77,7 @@ error[E0392]: parameter `'Self` is never used LL | struct Bar<'Self>; | ^^^^^ unused parameter | - = help: consider removing `'Self`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'Self`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 12 previous errors diff --git a/src/test/ui/shift-various-bad-types.stderr b/src/test/ui/shift-various-bad-types.stderr index 91f8b0e6309..c27bdf09a8d 100644 --- a/src/test/ui/shift-various-bad-types.stderr +++ b/src/test/ui/shift-various-bad-types.stderr @@ -4,7 +4,7 @@ error[E0277]: no implementation for `{integer} >> char` LL | 22 >> p.char; | ^^ no implementation for `{integer} >> char` | - = help: the trait `std::ops::Shr` is not implemented for `{integer}` + = help: the trait `Shr` is not implemented for `{integer}` error[E0277]: no implementation for `{integer} >> &str` --> $DIR/shift-various-bad-types.rs:12:8 @@ -12,7 +12,7 @@ error[E0277]: no implementation for `{integer} >> &str` LL | 22 >> p.str; | ^^ no implementation for `{integer} >> &str` | - = help: the trait `std::ops::Shr<&str>` is not implemented for `{integer}` + = help: the trait `Shr<&str>` is not implemented for `{integer}` error[E0277]: no implementation for `{integer} >> &Panolpy` --> $DIR/shift-various-bad-types.rs:15:8 @@ -20,7 +20,7 @@ error[E0277]: no implementation for `{integer} >> &Panolpy` LL | 22 >> p; | ^^ no implementation for `{integer} >> &Panolpy` | - = help: the trait `std::ops::Shr<&Panolpy>` is not implemented for `{integer}` + = help: the trait `Shr<&Panolpy>` is not implemented for `{integer}` error[E0308]: mismatched types --> $DIR/shift-various-bad-types.rs:25:18 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 72f875bbd14..2a7dda7b261 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 @@ -33,7 +33,7 @@ LL | let mut f = move |g: Box, b: isize| { | ----- captured outer variable ... LL | foo(f); - | ^ move occurs because `f` has type `[closure@$DIR/borrowck-call-is-borrow-issue-12224.rs:52:17: 54:6 s:std::string::String]`, which does not implement the `Copy` trait + | ^ move occurs because `f` has type `[closure@$DIR/borrowck-call-is-borrow-issue-12224.rs:52:17: 54:6 s:String]`, which does not implement the `Copy` trait error[E0505]: cannot move out of `f` because it is borrowed --> $DIR/borrowck-call-is-borrow-issue-12224.rs:55:16 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 9133d482c29..8949a10481a 100644 --- a/src/test/ui/span/borrowck-fn-in-const-b.stderr +++ b/src/test/ui/span/borrowck-fn-in-const-b.stderr @@ -2,7 +2,7 @@ error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference --> $DIR/borrowck-fn-in-const-b.rs:7:9 | LL | fn broken(x: &Vec) { - | ------------ help: consider changing this to be a mutable reference: `&mut std::vec::Vec` + | ------------ help: consider changing this to be a mutable reference: `&mut Vec` LL | x.push(format!("this is broken")); | ^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index d1960a8aab3..857c3081c62 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:7:20 | LL | let x: usize = String::new(); - | ----- ^^^^^^^^^^^^^ expected `usize`, found struct `std::string::String` + | ----- ^^^^^^^^^^^^^ expected `usize`, found struct `String` | | | expected due to this @@ -12,7 +12,7 @@ error[E0308]: mismatched types LL | let x: &str = String::new(); | ---- ^^^^^^^^^^^^^ | | | - | | expected `&str`, found struct `std::string::String` + | | expected `&str`, found struct `String` | | help: consider borrowing here: `&String::new()` | expected due to this @@ -22,8 +22,8 @@ error[E0308]: mismatched types LL | test(&y); | ^^ types differ in mutability | - = note: expected mutable reference `&mut std::string::String` - found reference `&std::string::String` + = note: expected mutable reference `&mut String` + found reference `&String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:14:11 @@ -32,7 +32,7 @@ LL | test2(&y); | ^^ types differ in mutability | = note: expected mutable reference `&mut i32` - found reference `&std::string::String` + found reference `&String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:17:9 @@ -47,7 +47,7 @@ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:21:9 | LL | s = format!("foo"); - | ^^^^^^^^^^^^^^ expected `&mut std::string::String`, found struct `std::string::String` + | ^^^^^^^^^^^^^^ expected `&mut String`, found struct `String` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index b5cd29f99c6..f63d97780c1 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -7,7 +7,7 @@ LL | *a.borrow() + 1 | borrowed value does not live long enough | a temporary with access to the borrow is created here ... LL | }; - | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, i32>` + | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Ref<'_, i32>` | | | `*a` dropped here while still borrowed | diff --git a/src/test/ui/span/dropck-object-cycle.stderr b/src/test/ui/span/dropck-object-cycle.stderr index cfaf470212f..229d17e1cf9 100644 --- a/src/test/ui/span/dropck-object-cycle.stderr +++ b/src/test/ui/span/dropck-object-cycle.stderr @@ -8,7 +8,7 @@ LL | } | - | | | `*m` dropped here while still borrowed - | borrow might be used here, when `m` is dropped and runs the destructor for type `std::boxed::Box>` + | borrow might be used here, when `m` is dropped and runs the destructor for type `Box>` error: aborting due to previous error diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index cda191522a0..9b0aad28b0a 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -64,7 +64,7 @@ error[E0046]: not all trait items implemented, missing: `fmt` LL | impl Debug for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | - = help: implement the missing item: `fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }` + = help: implement the missing item: `fn fmt(&self, _: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { todo!() }` error: aborting due to 8 previous errors 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 46702d364a8..e04ca0f5265 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 @@ -10,7 +10,7 @@ LL | } | - | | | `y` dropped here while still borrowed - | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, std::string::String>` + | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Ref<'_, String>` | = note: the temporary is part of an expression at the end of a block; consider forcing this temporary to be dropped sooner, before the block's local variables are dropped @@ -28,7 +28,7 @@ LL | y.borrow().clone() | borrowed value does not live long enough | a temporary with access to the borrow is created here ... LL | }; - | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `std::cell::Ref<'_, std::string::String>` + | -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Ref<'_, String>` | | | `y` dropped here while still borrowed | diff --git a/src/test/ui/span/issue-29106.stderr b/src/test/ui/span/issue-29106.stderr index 3b403de12d5..71fbd60ee73 100644 --- a/src/test/ui/span/issue-29106.stderr +++ b/src/test/ui/span/issue-29106.stderr @@ -7,7 +7,7 @@ LL | } | - | | | `x` dropped here while still borrowed - | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `std::sync::Arc` + | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `Arc` | = note: values in a scope are dropped in the opposite order they are defined @@ -20,7 +20,7 @@ LL | } | - | | | `x` dropped here while still borrowed - | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `std::rc::Rc` + | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `Rc` | = note: values in a scope are dropped in the opposite order they are defined diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index 184d9644c83..46f36679b89 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-33884.rs:8:22 | LL | stream.write_fmt(format!("message received")) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Arguments`, found struct `String` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index 8caa5bea4ac..a7131ab8af5 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -22,11 +22,11 @@ LL | let y = World::Hello + World::Goodbye; | = note: an implementation of `std::ops::Add` might be missing for `World` -error[E0369]: cannot add `std::string::String` to `&str` +error[E0369]: cannot add `String` to `&str` --> $DIR/issue-39018.rs:11:22 | LL | let x = "Hello " + "World!".to_owned(); - | -------- ^ ------------------- std::string::String + | -------- ^ ------------------- String | | | | | `+` cannot be used to concatenate a `&str` with a `String` | &str @@ -36,28 +36,28 @@ help: `to_owned()` can be used to create an owned `String` from a string referen LL | let x = "Hello ".to_owned() + &"World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ -error[E0369]: cannot add `&std::string::String` to `&std::string::String` +error[E0369]: cannot add `&String` to `&String` --> $DIR/issue-39018.rs:26:16 | LL | let _ = &a + &b; - | -- ^ -- &std::string::String + | -- ^ -- &String | | | | | `+` cannot be used to concatenate two `&str` strings - | &std::string::String + | &String | help: String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = a + &b; | ^ -error[E0369]: cannot add `std::string::String` to `&std::string::String` +error[E0369]: cannot add `String` to `&String` --> $DIR/issue-39018.rs:27:16 | LL | let _ = &a + b; - | -- ^ - std::string::String + | -- ^ - String | | | | | `+` cannot be used to concatenate a `&str` with a `String` - | &std::string::String + | &String | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | @@ -70,59 +70,59 @@ error[E0308]: mismatched types LL | let _ = a + b; | ^ | | - | expected `&str`, found struct `std::string::String` + | expected `&str`, found struct `String` | help: consider borrowing here: `&b` -error[E0369]: cannot add `std::string::String` to `&std::string::String` +error[E0369]: cannot add `String` to `&String` --> $DIR/issue-39018.rs:30:15 | LL | let _ = e + b; - | - ^ - std::string::String + | - ^ - String | | | | | `+` cannot be used to concatenate a `&str` with a `String` - | &std::string::String + | &String | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + &b; | ^^^^^^^^^^^^ ^^ -error[E0369]: cannot add `&std::string::String` to `&std::string::String` +error[E0369]: cannot add `&String` to `&String` --> $DIR/issue-39018.rs:31:15 | LL | let _ = e + &b; - | - ^ -- &std::string::String + | - ^ -- &String | | | | | `+` cannot be used to concatenate two `&str` strings - | &std::string::String + | &String | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + &b; | ^^^^^^^^^^^^ -error[E0369]: cannot add `&str` to `&std::string::String` +error[E0369]: cannot add `&str` to `&String` --> $DIR/issue-39018.rs:32:15 | LL | let _ = e + d; | - ^ - &str | | | | | `+` cannot be used to concatenate two `&str` strings - | &std::string::String + | &String | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | LL | let _ = e.to_owned() + d; | ^^^^^^^^^^^^ -error[E0369]: cannot add `&&str` to `&std::string::String` +error[E0369]: cannot add `&&str` to `&String` --> $DIR/issue-39018.rs:33:15 | LL | let _ = e + &d; | - ^ -- &&str | | | | | `+` cannot be used to concatenate two `&str` strings - | &std::string::String + | &String | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | 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 9824d879dbd..c64c5b1c28f 100644 --- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr +++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr @@ -1,8 +1,8 @@ -error[E0282]: type annotations needed for `std::option::Option<_>` +error[E0282]: type annotations needed for `Option<_>` --> $DIR/issue-42234-unknown-receiver-type.rs:7:7 | LL | let x: Option<_> = None; - | - consider giving `x` the explicit type `std::option::Option<_>`, where the type parameter `T` is specified + | - consider giving `x` the explicit type `Option<_>`, where the type parameter `T` is specified LL | x.unwrap().method_that_could_exist_on_some_type(); | ^^^^^^ cannot infer type for type parameter `T` | diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index 6495d9bc739..13ef0d18208 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -4,7 +4,7 @@ error[E0277]: cannot add `()` to `u32` LL | foo(1 as u32 + | ^ no implementation for `u32 + ()` | - = help: the trait `std::ops::Add<()>` is not implemented for `u32` + = help: the trait `Add<()>` is not implemented for `u32` error: aborting due to previous error diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index 8027cf69cf4..e04e4cbdabb 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -2,7 +2,7 @@ error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference --> $DIR/mut-arg-hint.rs:3:9 | LL | fn foo(mut a: &String) { - | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` + | ------- help: consider changing this to be a mutable reference: `&mut String` LL | a.push_str("bar"); | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable @@ -18,7 +18,7 @@ error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference --> $DIR/mut-arg-hint.rs:15:9 | LL | pub fn foo(mut a: &String) { - | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` + | ------- help: consider changing this to be a mutable reference: `&mut String` LL | a.push_str("foo"); | ^ `a` is a `&` reference, so the data it refers to cannot be borrowed as mutable 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 2be2d0ff7b5..ba0c45acf23 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 @@ -7,7 +7,7 @@ LL | let ss: &isize = &id(1); LL | } | - temporary value is freed at the end of this statement LL | } - | - borrow might be used here, when `blah` is dropped and runs the destructor for type `std::boxed::Box` + | - borrow might be used here, when `blah` is dropped and runs the destructor for type `Box` | = note: consider using a `let` binding to create a longer lived value 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 d00b157d389..81de8c29906 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 @@ -62,7 +62,7 @@ LL | } | - `z` dropped here while still borrowed ... LL | } - | - borrow might be used here, when `tx` is dropped and runs the `Drop` code for type `std::sync::mpsc::Sender` + | - borrow might be used here, when `tx` is dropped and runs the `Drop` code for type `Sender` | = note: values in a scope are dropped in the opposite order they are defined diff --git a/src/test/ui/span/type-binding.stderr b/src/test/ui/span/type-binding.stderr index f6989933553..cb0aefe0609 100644 --- a/src/test/ui/span/type-binding.stderr +++ b/src/test/ui/span/type-binding.stderr @@ -1,4 +1,4 @@ -error[E0220]: associated type `Trget` not found for `std::ops::Deref` +error[E0220]: associated type `Trget` not found for `Deref` --> $DIR/type-binding.rs:6:20 | LL | fn homura>(_: T) {} diff --git a/src/test/ui/specialization/deafult-associated-type-bound-1.rs b/src/test/ui/specialization/deafult-associated-type-bound-1.rs index 272a5e3fe10..c043114b565 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-1.rs +++ b/src/test/ui/specialization/deafult-associated-type-bound-1.rs @@ -16,7 +16,7 @@ trait X { // normalization. impl X for T { default type U = str; - //~^ ERROR the trait bound `str: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `str: Clone` is not satisfied } pub fn main() { diff --git a/src/test/ui/specialization/deafult-associated-type-bound-1.stderr b/src/test/ui/specialization/deafult-associated-type-bound-1.stderr index 90ad5d4c155..612e22c204f 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-1.stderr +++ b/src/test/ui/specialization/deafult-associated-type-bound-1.stderr @@ -7,14 +7,14 @@ LL | #![feature(specialization)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #31844 for more information -error[E0277]: the trait bound `str: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `str: Clone` is not satisfied --> $DIR/deafult-associated-type-bound-1.rs:18:5 | LL | type U: Clone; | -------------- required by `X::U` ... LL | default type U = str; - | ^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `str` + | ^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `str` error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/specialization/deafult-associated-type-bound-2.stderr b/src/test/ui/specialization/deafult-associated-type-bound-2.stderr index ea40f846e36..a14024c160f 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-2.stderr +++ b/src/test/ui/specialization/deafult-associated-type-bound-2.stderr @@ -16,7 +16,7 @@ LL | type U: PartialEq; LL | default type U = &'static B; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `&'static B == B` | - = help: the trait `std::cmp::PartialEq` is not implemented for `&'static B` + = help: the trait `PartialEq` is not implemented for `&'static B` error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr b/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr index 3da8725d88a..556feda642b 100644 --- a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr +++ b/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr @@ -24,11 +24,11 @@ LL | type U<'a>: PartialEq<&'a Self>; LL | default type U<'a> = &'a T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `T == T` | - = note: required because of the requirements on the impl of `std::cmp::PartialEq` for `&'a T` + = note: required because of the requirements on the impl of `PartialEq` for `&'a T` help: consider further restricting this bound | -LL | impl X for T { - | ^^^^^^^^^^^^^^^^^^^^^ +LL | impl X for T { + | ^^^^^^^^^^^ error: aborting due to previous error; 2 warnings emitted diff --git a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.rs b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.rs index afd634725e3..eb18d6eaac4 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.rs +++ b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.rs @@ -5,6 +5,6 @@ trait Foo<'a, T: Eq + 'a> { } default impl Foo<'static, U> for () {} -//~^ ERROR the trait bound `U: std::cmp::Eq` is not satisfied +//~^ ERROR the trait bound `U: Eq` is not satisfied fn main(){} diff --git a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr index d45825651a8..dcac310ed06 100644 --- a/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr +++ b/src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr @@ -7,19 +7,19 @@ LL | #![feature(specialization)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #31844 for more information -error[E0277]: the trait bound `U: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `U: Eq` is not satisfied --> $DIR/specialization-wfcheck.rs:7:17 | LL | trait Foo<'a, T: Eq + 'a> { } | -- required by this bound in `Foo` LL | LL | default impl Foo<'static, U> for () {} - | ^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `U` + | ^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `U` | help: consider restricting type parameter `U` | -LL | default impl Foo<'static, U> for () {} - | ^^^^^^^^^^^^^^ +LL | default impl Foo<'static, U> for () {} + | ^^^^ error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/specialization/issue-44861.rs b/src/test/ui/specialization/issue-44861.rs index c37a6273de3..79d9b9490d0 100644 --- a/src/test/ui/specialization/issue-44861.rs +++ b/src/test/ui/specialization/issue-44861.rs @@ -19,7 +19,7 @@ impl MaybeObjectSafe for () {} impl Smartass for T { type Data = ::Data2; default type Data2 = (); - //~^ ERROR: the trait bound `(): std::ops::CoerceUnsized<*const [u8]>` is not satisfied + //~^ ERROR: the trait bound `(): CoerceUnsized<*const [u8]>` is not satisfied } impl Smartass for () { diff --git a/src/test/ui/specialization/issue-44861.stderr b/src/test/ui/specialization/issue-44861.stderr index b41b17e76a6..be7196a63ce 100644 --- a/src/test/ui/specialization/issue-44861.stderr +++ b/src/test/ui/specialization/issue-44861.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `(): std::ops::CoerceUnsized<*const [u8]>` is not satisfied +error[E0277]: the trait bound `(): CoerceUnsized<*const [u8]>` is not satisfied --> $DIR/issue-44861.rs:21:5 | LL | type Data2: CoerceUnsized<*const [u8]>; | --------------------------------------- required by `Smartass::Data2` ... LL | default type Data2 = (); - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::ops::CoerceUnsized<*const [u8]>` is not implemented for `()` + | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `CoerceUnsized<*const [u8]>` is not implemented for `()` error: aborting due to previous error diff --git a/src/test/ui/specialization/issue-59435.rs b/src/test/ui/specialization/issue-59435.rs index 47323d3096f..32390025662 100644 --- a/src/test/ui/specialization/issue-59435.rs +++ b/src/test/ui/specialization/issue-59435.rs @@ -9,7 +9,7 @@ trait MyTrait { impl MyTrait for i32 { default type MyType = MyStruct; - //~^ ERROR: the trait bound `MyStruct: std::default::Default` is not satisfied + //~^ ERROR: the trait bound `MyStruct: Default` is not satisfied } fn main() { diff --git a/src/test/ui/specialization/issue-59435.stderr b/src/test/ui/specialization/issue-59435.stderr index fd512a539a3..ee5c0615927 100644 --- a/src/test/ui/specialization/issue-59435.stderr +++ b/src/test/ui/specialization/issue-59435.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `MyStruct: std::default::Default` is not satisfied +error[E0277]: the trait bound `MyStruct: Default` is not satisfied --> $DIR/issue-59435.rs:11:5 | LL | type MyType: Default; | --------------------- required by `MyTrait::MyType` ... LL | default type MyType = MyStruct; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `MyStruct` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `MyStruct` error: aborting due to previous error diff --git a/src/test/ui/specialization/min_specialization/specialization_super_trait.stderr b/src/test/ui/specialization/min_specialization/specialization_super_trait.stderr index 154c839c6da..5782ad01b39 100644 --- a/src/test/ui/specialization/min_specialization/specialization_super_trait.stderr +++ b/src/test/ui/specialization/min_specialization/specialization_super_trait.stderr @@ -1,4 +1,4 @@ -error: cannot specialize on trait `std::default::Default` +error: cannot specialize on trait `Default` --> $DIR/specialization_super_trait.rs:13:1 | LL | / impl SpecMarker for T { diff --git a/src/test/ui/specialization/min_specialization/specialization_trait.stderr b/src/test/ui/specialization/min_specialization/specialization_trait.stderr index 4357d2318fc..8a70d6cc1bf 100644 --- a/src/test/ui/specialization/min_specialization/specialization_trait.stderr +++ b/src/test/ui/specialization/min_specialization/specialization_trait.stderr @@ -16,7 +16,7 @@ LL | | fn f() {} LL | | } | |_^ -error: cannot specialize on trait `std::clone::Clone` +error: cannot specialize on trait `Clone` --> $DIR/specialization_trait.rs:21:1 | LL | / impl SpecMarker for [T] { diff --git a/src/test/ui/specialization/specialization-default-types.stderr b/src/test/ui/specialization/specialization-default-types.stderr index 5e0221f0788..5acfb53e206 100644 --- a/src/test/ui/specialization/specialization-default-types.stderr +++ b/src/test/ui/specialization/specialization-default-types.stderr @@ -15,22 +15,22 @@ LL | default type Output = Box; LL | default fn generate(self) -> Self::Output { | ------------ expected `::Output` because of return type LL | Box::new(self) - | ^^^^^^^^^^^^^^ expected associated type, found struct `std::boxed::Box` + | ^^^^^^^^^^^^^^ expected associated type, found struct `Box` | = note: expected associated type `::Output` - found struct `std::boxed::Box` + found struct `Box` error[E0308]: mismatched types --> $DIR/specialization-default-types.rs:25:5 | LL | fn trouble(t: T) -> Box { - | ------ expected `std::boxed::Box` because of return type + | ------ expected `Box` because of return type LL | Example::generate(t) - | ^^^^^^^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found associated type + | ^^^^^^^^^^^^^^^^^^^^ expected struct `Box`, found associated type | - = note: expected struct `std::boxed::Box` + = note: expected struct `Box` found associated type `::Output` - = help: consider constraining the associated type `::Output` to `std::boxed::Box` + = help: consider constraining the associated type `::Output` to `Box` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error: aborting due to 2 previous errors; 1 warning emitted diff --git a/src/test/ui/specialization/specialization-overlap-negative.stderr b/src/test/ui/specialization/specialization-overlap-negative.stderr index 6141174ba8c..ce95215cfd4 100644 --- a/src/test/ui/specialization/specialization-overlap-negative.stderr +++ b/src/test/ui/specialization/specialization-overlap-negative.stderr @@ -7,7 +7,7 @@ LL | #![feature(specialization)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #31844 for more information -error[E0751]: found both positive and negative implementation of trait `std::marker::Send` for type `TestType<_>`: +error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`: --> $DIR/specialization-overlap-negative.rs:9:1 | LL | unsafe impl Send for TestType {} diff --git a/src/test/ui/specialization/specialization-overlap.stderr b/src/test/ui/specialization/specialization-overlap.stderr index cf0f186a183..d2e55f719a3 100644 --- a/src/test/ui/specialization/specialization-overlap.stderr +++ b/src/test/ui/specialization/specialization-overlap.stderr @@ -7,13 +7,13 @@ LL | #![feature(specialization)] = note: `#[warn(incomplete_features)]` on by default = note: see issue #31844 for more information -error[E0119]: conflicting implementations of trait `Foo` for type `std::vec::Vec<_>`: +error[E0119]: conflicting implementations of trait `Foo` for type `Vec<_>`: --> $DIR/specialization-overlap.rs:5:1 | LL | impl Foo for T {} | ------------------------ first implementation here LL | impl Foo for Vec {} - | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::vec::Vec<_>` + | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Vec<_>` error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`: --> $DIR/specialization-overlap.rs:9:1 diff --git a/src/test/ui/static/static-reference-to-fn-1.stderr b/src/test/ui/static/static-reference-to-fn-1.stderr index 77ab62c321c..67b478bdb75 100644 --- a/src/test/ui/static/static-reference-to-fn-1.stderr +++ b/src/test/ui/static/static-reference-to-fn-1.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | func: &foo, | ^^^^ expected fn pointer, found fn item | - = note: expected reference `&fn() -> std::option::Option` - found reference `&fn() -> std::option::Option {foo}` + = note: expected reference `&fn() -> Option` + found reference `&fn() -> Option {foo}` error: aborting due to previous error diff --git a/src/test/ui/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr index 52d3aefe125..73c03f09f2e 100644 --- a/src/test/ui/str/str-array-assignment.stderr +++ b/src/test/ui/str/str-array-assignment.stderr @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | let v = s[..2]; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature help: consider borrowing here diff --git a/src/test/ui/str/str-concat-on-double-ref.rs b/src/test/ui/str/str-concat-on-double-ref.rs index 23e5f892062..e68210d53b7 100644 --- a/src/test/ui/str/str-concat-on-double-ref.rs +++ b/src/test/ui/str/str-concat-on-double-ref.rs @@ -2,6 +2,6 @@ fn main() { let a: &String = &"1".to_owned(); let b: &str = &"2"; let c = a + b; - //~^ ERROR cannot add `&str` to `&std::string::String` + //~^ ERROR cannot add `&str` to `&String` println!("{:?}", c); } diff --git a/src/test/ui/str/str-concat-on-double-ref.stderr b/src/test/ui/str/str-concat-on-double-ref.stderr index d77e0d8f242..ac87d6ecca5 100644 --- a/src/test/ui/str/str-concat-on-double-ref.stderr +++ b/src/test/ui/str/str-concat-on-double-ref.stderr @@ -1,11 +1,11 @@ -error[E0369]: cannot add `&str` to `&std::string::String` +error[E0369]: cannot add `&str` to `&String` --> $DIR/str-concat-on-double-ref.rs:4:15 | LL | let c = a + b; | - ^ - &str | | | | | `+` cannot be used to concatenate two `&str` strings - | &std::string::String + | &String | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | diff --git a/src/test/ui/str/str-idx.stderr b/src/test/ui/str/str-idx.stderr index 9f21aaaebad..ef7ce735868 100644 --- a/src/test/ui/str/str-idx.stderr +++ b/src/test/ui/str/str-idx.stderr @@ -4,10 +4,10 @@ error[E0277]: the type `str` cannot be indexed by `{integer}` LL | let _: u8 = s[4]; | ^^^^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` + = help: the trait `SliceIndex` is not implemented for `{integer}` = note: you can use `.chars().nth()` or `.bytes().nth()` see chapter in The Book - = note: required because of the requirements on the impl of `std::ops::Index<{integer}>` for `str` + = note: required because of the requirements on the impl of `Index<{integer}>` for `str` error[E0277]: the type `str` cannot be indexed by `{integer}` --> $DIR/str-idx.rs:4:19 @@ -15,7 +15,7 @@ error[E0277]: the type `str` cannot be indexed by `{integer}` LL | let _ = s.get(4); | ^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` + = help: the trait `SliceIndex` is not implemented for `{integer}` = note: you can use `.chars().nth()` or `.bytes().nth()` see chapter in The Book @@ -25,7 +25,7 @@ error[E0277]: the type `str` cannot be indexed by `{integer}` LL | let _ = s.get_unchecked(4); | ^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` + = help: the trait `SliceIndex` is not implemented for `{integer}` = note: you can use `.chars().nth()` or `.bytes().nth()` see chapter in The Book @@ -35,8 +35,8 @@ error[E0277]: the type `str` cannot be indexed by `char` LL | let _: u8 = s['c']; | ^^^^^^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `char` - = note: required because of the requirements on the impl of `std::ops::Index` for `str` + = help: the trait `SliceIndex` is not implemented for `char` + = note: required because of the requirements on the impl of `Index` for `str` error: aborting due to 4 previous errors diff --git a/src/test/ui/str/str-mut-idx.stderr b/src/test/ui/str/str-mut-idx.stderr index 7c834165e7f..abb9b09cf38 100644 --- a/src/test/ui/str/str-mut-idx.stderr +++ b/src/test/ui/str/str-mut-idx.stderr @@ -7,7 +7,7 @@ LL | fn bot() -> T { loop {} } LL | s[1..2] = bot(); | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` help: consider relaxing the implicit `Sized` restriction | LL | fn bot() -> T { loop {} } @@ -19,7 +19,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | s[1..2] = bot(); | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: the left-hand-side of an assignment must have a statically known size error[E0277]: the type `str` cannot be indexed by `usize` @@ -28,8 +28,8 @@ error[E0277]: the type `str` cannot be indexed by `usize` LL | s[1usize] = bot(); | ^^^^^^^^^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `usize` - = note: required because of the requirements on the impl of `std::ops::Index` for `str` + = help: the trait `SliceIndex` is not implemented for `usize` + = note: required because of the requirements on the impl of `Index` for `str` error[E0277]: the type `str` cannot be indexed by `{integer}` --> $DIR/str-mut-idx.rs:9:15 @@ -37,7 +37,7 @@ error[E0277]: the type `str` cannot be indexed by `{integer}` LL | s.get_mut(1); | ^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` + = help: the trait `SliceIndex` is not implemented for `{integer}` = note: you can use `.chars().nth()` or `.bytes().nth()` see chapter in The Book @@ -47,7 +47,7 @@ error[E0277]: the type `str` cannot be indexed by `{integer}` LL | s.get_unchecked_mut(1); | ^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `{integer}` + = help: the trait `SliceIndex` is not implemented for `{integer}` = note: you can use `.chars().nth()` or `.bytes().nth()` see chapter in The Book @@ -57,8 +57,8 @@ error[E0277]: the type `str` cannot be indexed by `char` LL | s['c']; | ^^^^^^ string indices are ranges of `usize` | - = help: the trait `std::slice::SliceIndex` is not implemented for `char` - = note: required because of the requirements on the impl of `std::ops::Index` for `str` + = help: the trait `SliceIndex` is not implemented for `char` + = note: required because of the requirements on the impl of `Index` for `str` error: aborting due to 6 previous errors diff --git a/src/test/ui/structs/struct-field-privacy.rs b/src/test/ui/structs/struct-field-privacy.rs index 5c35c04a69f..898ca475cb1 100644 --- a/src/test/ui/structs/struct-field-privacy.rs +++ b/src/test/ui/structs/struct-field-privacy.rs @@ -32,7 +32,7 @@ fn test(a: A, b: inner::A, c: inner::B, d: xc::A, e: xc::B, z: inner::Z) { e.b; //~ ERROR: field `b` of struct `xc::B` is private z.0; - z.1; //~ ERROR: field `1` of struct `inner::Z` is private + z.1; //~ ERROR: field `1` of struct `Z` is private } fn main() {} diff --git a/src/test/ui/structs/struct-field-privacy.stderr b/src/test/ui/structs/struct-field-privacy.stderr index f8b16ec0d01..ee83e0d6c2d 100644 --- a/src/test/ui/structs/struct-field-privacy.stderr +++ b/src/test/ui/structs/struct-field-privacy.stderr @@ -22,7 +22,7 @@ error[E0616]: field `b` of struct `xc::B` is private LL | e.b; | ^ private field -error[E0616]: field `1` of struct `inner::Z` is private +error[E0616]: field `1` of struct `Z` is private --> $DIR/struct-field-privacy.rs:35:7 | LL | z.1; diff --git a/src/test/ui/structs/struct-path-alias-bounds.rs b/src/test/ui/structs/struct-path-alias-bounds.rs index ae6ca808269..1e2c4b836a1 100644 --- a/src/test/ui/structs/struct-path-alias-bounds.rs +++ b/src/test/ui/structs/struct-path-alias-bounds.rs @@ -7,5 +7,5 @@ type A = S; fn main() { let s = A { a: NoClone }; - //~^ ERROR the trait bound `NoClone: std::clone::Clone` is not satisfied + //~^ ERROR the trait bound `NoClone: Clone` is not satisfied } diff --git a/src/test/ui/structs/struct-path-alias-bounds.stderr b/src/test/ui/structs/struct-path-alias-bounds.stderr index 1c2c205e01c..cea3d5d4df3 100644 --- a/src/test/ui/structs/struct-path-alias-bounds.stderr +++ b/src/test/ui/structs/struct-path-alias-bounds.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `NoClone: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `NoClone: Clone` is not satisfied --> $DIR/struct-path-alias-bounds.rs:9:13 | LL | struct S { a: T } | ------------------ required by `S` ... LL | let s = A { a: NoClone }; - | ^ the trait `std::clone::Clone` is not implemented for `NoClone` + | ^ the trait `Clone` is not implemented for `NoClone` error: aborting due to previous error diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr index 8dab8add80b..89be3d29e0c 100644 --- a/src/test/ui/substs-ppaux.normal.stderr +++ b/src/test/ui/substs-ppaux.normal.stderr @@ -79,7 +79,7 @@ LL | fn bar<'a, T>() where T: 'a {} LL | >::bar; | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: required because of the requirements on the impl of `Foo<'_, '_, u8>` for `str` error: aborting due to 5 previous errors diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr index a40d5e4bf7b..e37d087fcc9 100644 --- a/src/test/ui/substs-ppaux.verbose.stderr +++ b/src/test/ui/substs-ppaux.verbose.stderr @@ -79,7 +79,7 @@ LL | fn bar<'a, T>() where T: 'a {} LL | >::bar; | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: required because of the requirements on the impl of `Foo<'_#0r, '_#1r, u8>` for `str` error: aborting due to 5 previous errors diff --git a/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr b/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr index f4c0d0f96c4..9450612332c 100644 --- a/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr +++ b/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr @@ -5,7 +5,7 @@ LL | struct X(T); | - required by this bound in `X` ... LL | struct Struct5{ - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | _t: X, | ^^^^ doesn't have a size known at compile-time | @@ -28,8 +28,8 @@ LL | struct Struct1{ | help: consider further restricting `Self` | -LL | fn func1() -> Struct1 where Self: std::marker::Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn func1() -> Struct1 where Self: Sized; + | ^^^^^^^^^^^^^^^^^ help: consider relaxing the implicit `Sized` restriction | LL | struct Struct1{ @@ -46,8 +46,8 @@ LL | struct Struct2<'a, T>{ | help: consider further restricting `Self` | -LL | fn func2<'a>() -> Struct2<'a, Self> where Self: std::marker::Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn func2<'a>() -> Struct2<'a, Self> where Self: Sized; + | ^^^^^^^^^^^^^^^^^ help: consider relaxing the implicit `Sized` restriction | LL | struct Struct2<'a, T: ?Sized>{ @@ -71,8 +71,8 @@ LL | _t: T, | - ...if indirection was used here: `Box` help: consider further restricting `Self` | -LL | fn func3() -> Struct3 where Self: std::marker::Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn func3() -> Struct3 where Self: Sized; + | ^^^^^^^^^^^^^^^^^ error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/adt-param-with-implicit-sized-bound.rs:5:19 @@ -85,8 +85,8 @@ LL | struct Struct4{ | help: consider further restricting `Self` | -LL | fn func4() -> Struct4 where Self: std::marker::Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn func4() -> Struct4 where Self: Sized; + | ^^^^^^^^^^^^^^^^^ help: consider relaxing the implicit `Sized` restriction | LL | struct Struct4{ diff --git a/src/test/ui/suggestions/as-ref.stderr b/src/test/ui/suggestions/as-ref.stderr index 8445a706f43..4b5a9be7e5b 100644 --- a/src/test/ui/suggestions/as-ref.stderr +++ b/src/test/ui/suggestions/as-ref.stderr @@ -36,12 +36,12 @@ error[E0308]: mismatched types LL | let y: Option<&usize> = x; | -------------- ^ | | | - | | expected enum `std::option::Option`, found reference + | | expected enum `Option`, found `&Option` | | help: you can convert from `&Option` to `Option<&T>` using `.as_ref()`: `x.as_ref()` | expected due to this | - = note: expected enum `std::option::Option<&usize>` - found reference `&std::option::Option` + = note: expected enum `Option<&usize>` + found reference `&Option` error[E0308]: mismatched types --> $DIR/as-ref.rs:19:35 diff --git a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 11372494772..cb4acc4c392 100644 --- a/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/src/test/ui/suggestions/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -1,4 +1,4 @@ -error[E0277]: `fn() -> impl std::future::Future {foo}` is not a future +error[E0277]: `fn() -> impl Future {foo}` is not a future --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:10:9 | LL | async fn foo() {} @@ -8,9 +8,9 @@ LL | fn bar(f: impl Future) {} | ----------------- required by this bound in `bar` ... LL | bar(foo); - | ^^^ `fn() -> impl std::future::Future {foo}` is not a future + | ^^^ `fn() -> impl Future {foo}` is not a future | - = help: the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}` + = help: the trait `Future` is not implemented for `fn() -> impl Future {foo}` help: use parentheses to call the function | LL | bar(foo()); @@ -27,7 +27,7 @@ LL | let async_closure = async || (); LL | bar(async_closure); | ^^^^^^^^^^^^^ `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` is not a future | - = help: the trait `std::future::Future` is not implemented for `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` + = help: the trait `Future` is not implemented for `[closure@$DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:11:25: 11:36]` help: use parentheses to call the closure | LL | bar(async_closure()); diff --git a/src/test/ui/suggestions/borrow-for-loop-head.stderr b/src/test/ui/suggestions/borrow-for-loop-head.stderr index 36bced9e433..de342a969f4 100644 --- a/src/test/ui/suggestions/borrow-for-loop-head.stderr +++ b/src/test/ui/suggestions/borrow-for-loop-head.stderr @@ -10,7 +10,7 @@ error[E0382]: use of moved value: `a` --> $DIR/borrow-for-loop-head.rs:4:18 | LL | let a = vec![1, 2, 3]; - | - move occurs because `a` has type `std::vec::Vec`, which does not implement the `Copy` trait + | - move occurs because `a` has type `Vec`, which does not implement the `Copy` trait LL | for i in &a { LL | for j in a { | ^ diff --git a/src/test/ui/suggestions/chain-method-call-mutation-in-place.stderr b/src/test/ui/suggestions/chain-method-call-mutation-in-place.stderr index 63e3bb78954..965dbb9679d 100644 --- a/src/test/ui/suggestions/chain-method-call-mutation-in-place.stderr +++ b/src/test/ui/suggestions/chain-method-call-mutation-in-place.stderr @@ -2,9 +2,9 @@ error[E0308]: mismatched types --> $DIR/chain-method-call-mutation-in-place.rs:3:5 | LL | fn foo(mut s: String) -> String { - | ------ expected `std::string::String` because of return type + | ------ expected `String` because of return type LL | s.push_str("asdf") - | ^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found `()` + | ^^^^^^^^^^^^^^^^^^ expected struct `String`, found `()` | note: method `push_str` modifies its receiver in-place --> $DIR/chain-method-call-mutation-in-place.rs:3:7 diff --git a/src/test/ui/suggestions/const-in-struct-pat.stderr b/src/test/ui/suggestions/const-in-struct-pat.stderr index ab336b14d29..df9c230eefd 100644 --- a/src/test/ui/suggestions/const-in-struct-pat.stderr +++ b/src/test/ui/suggestions/const-in-struct-pat.stderr @@ -7,7 +7,7 @@ LL | struct foo; LL | let Thing { foo } = t; | ^^^ - this expression has type `Thing` | | - | expected struct `std::string::String`, found struct `foo` + | expected struct `String`, found struct `foo` | `foo` is interpreted as a unit struct, not a new binding | help: bind the struct field to a different name instead diff --git a/src/test/ui/suggestions/const-no-type.rs b/src/test/ui/suggestions/const-no-type.rs index b931a04c286..2ffb24c6e6c 100644 --- a/src/test/ui/suggestions/const-no-type.rs +++ b/src/test/ui/suggestions/const-no-type.rs @@ -43,7 +43,7 @@ const D = &&42; static S = Vec::::new(); //~^ ERROR missing type for `static` item //~| HELP provide a type for the item -//~| SUGGESTION S: std::vec::Vec +//~| SUGGESTION S: Vec static mut SM = "abc"; //~^ ERROR missing type for `static mut` item diff --git a/src/test/ui/suggestions/const-no-type.stderr b/src/test/ui/suggestions/const-no-type.stderr index 874c1bac10b..b180a6a9a9b 100644 --- a/src/test/ui/suggestions/const-no-type.stderr +++ b/src/test/ui/suggestions/const-no-type.stderr @@ -14,7 +14,7 @@ error: missing type for `static` item --> $DIR/const-no-type.rs:43:8 | LL | static S = Vec::::new(); - | ^ help: provide a type for the item: `S: std::vec::Vec` + | ^ help: provide a type for the item: `S: Vec` error: missing type for `static mut` item --> $DIR/const-no-type.rs:48:12 diff --git a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr index b0cef952b21..0123e617c4f 100644 --- a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr +++ b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | / intrinsic_match! { LL | | "abc" LL | | }; - | |______^ expected `&str`, found struct `std::string::String` + | |______^ expected `&str`, found struct `String` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr index 5550e097cf5..f7528b5ccd2 100644 --- a/src/test/ui/suggestions/dont-suggest-ref/simple.stderr +++ b/src/test/ui/suggestions/dont-suggest-ref/simple.stderr @@ -112,7 +112,7 @@ LL | Either::One(_t) => (), | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:102:17 | LL | let X(_t) = vs[0]; @@ -121,7 +121,7 @@ LL | let X(_t) = vs[0]; | data moved here | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:106:30 | LL | if let Either::One(_t) = vr[0] { } @@ -130,7 +130,7 @@ LL | if let Either::One(_t) = vr[0] { } | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:110:33 | LL | while let Either::One(_t) = vr[0] { } @@ -139,7 +139,7 @@ LL | while let Either::One(_t) = vr[0] { } | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:114:11 | LL | match vr[0] { @@ -151,7 +151,7 @@ LL | Either::One(_t) | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:121:11 | LL | match vr[0] { @@ -163,7 +163,7 @@ LL | Either::One(_t) => (), | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:130:17 | LL | let X(_t) = vsm[0]; @@ -172,7 +172,7 @@ LL | let X(_t) = vsm[0]; | data moved here | move occurs because `_t` has type `Y`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:134:30 | LL | if let Either::One(_t) = vrm[0] { } @@ -181,7 +181,7 @@ LL | if let Either::One(_t) = vrm[0] { } | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:138:33 | LL | while let Either::One(_t) = vrm[0] { } @@ -190,7 +190,7 @@ LL | while let Either::One(_t) = vrm[0] { } | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:142:11 | LL | match vrm[0] { @@ -202,7 +202,7 @@ LL | Either::One(_t) | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:149:11 | LL | match vrm[0] { @@ -214,7 +214,7 @@ LL | Either::One(_t) => (), | data moved here | move occurs because `_t` has type `X`, which does not implement the `Copy` trait -error[E0507]: cannot move out of index of `std::vec::Vec` +error[E0507]: cannot move out of index of `Vec` --> $DIR/simple.rs:157:11 | LL | match vrm[0] { diff --git a/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr b/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr index baa84115e22..32961b7f87b 100644 --- a/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr +++ b/src/test/ui/suggestions/expected-boxed-future-isnt-pinned.stderr @@ -2,27 +2,27 @@ error[E0308]: mismatched types --> $DIR/expected-boxed-future-isnt-pinned.rs:11:5 | LL | fn foo + Send + 'static>(x: F) -> BoxFuture<'static, i32> { - | - this type parameter ----------------------- expected `std::pin::Pin + std::marker::Send + 'static)>>` because of return type + | - this type parameter ----------------------- expected `Pin + Send + 'static)>>` because of return type LL | // We could instead use an `async` block, but this way we have no std spans. LL | x | ^ | | - | expected struct `std::pin::Pin`, found type parameter `F` + | expected struct `Pin`, found type parameter `F` | help: you need to pin and box this expression: `Box::pin(x)` | - = note: expected struct `std::pin::Pin + std::marker::Send + 'static)>>` + = note: expected struct `Pin + Send + 'static)>>` found type parameter `F` error[E0308]: mismatched types --> $DIR/expected-boxed-future-isnt-pinned.rs:18:5 | LL | fn bar + Send + 'static>(x: F) -> BoxFuture<'static, i32> { - | ----------------------- expected `std::pin::Pin + std::marker::Send + 'static)>>` because of return type + | ----------------------- expected `Pin + Send + 'static)>>` because of return type LL | Box::new(x) - | ^^^^^^^^^^^ expected struct `std::pin::Pin`, found struct `std::boxed::Box` + | ^^^^^^^^^^^ expected struct `Pin`, found struct `Box` | - = note: expected struct `std::pin::Pin + std::marker::Send + 'static)>>` - found struct `std::boxed::Box` + = note: expected struct `Pin + Send + 'static)>>` + found struct `Box` = help: use `Box::pin` error[E0308]: mismatched types @@ -33,48 +33,46 @@ LL | fn baz + Send + 'static>(x: F) -> BoxFuture<'static, LL | Pin::new(x) | ^ | | - | expected struct `std::boxed::Box`, found type parameter `F` + | expected struct `Box`, found type parameter `F` | help: store this in the heap by calling `Box::new`: `Box::new(x)` | - = note: expected struct `std::boxed::Box + std::marker::Send>` + = note: expected struct `Box + Send>` found type parameter `F` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html -error[E0277]: `dyn std::future::Future + std::marker::Send` cannot be unpinned +error[E0277]: `dyn Future + Send` cannot be unpinned --> $DIR/expected-boxed-future-isnt-pinned.rs:22:5 | LL | Pin::new(x) - | ^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `dyn std::future::Future + std::marker::Send` + | ^^^^^^^^ the trait `Unpin` is not implemented for `dyn Future + Send` | - = note: consider using `Box::pin` - = note: required by `std::pin::Pin::

::new` + = note: required by `Pin::

::new` -error[E0277]: `dyn std::future::Future + std::marker::Send` cannot be unpinned +error[E0277]: `dyn Future + Send` cannot be unpinned --> $DIR/expected-boxed-future-isnt-pinned.rs:27:5 | LL | Pin::new(Box::new(x)) - | ^^^^^^^^ the trait `std::marker::Unpin` is not implemented for `dyn std::future::Future + std::marker::Send` + | ^^^^^^^^ the trait `Unpin` is not implemented for `dyn Future + Send` | - = note: consider using `Box::pin` - = note: required by `std::pin::Pin::

::new` + = note: required by `Pin::

::new` error[E0308]: mismatched types --> $DIR/expected-boxed-future-isnt-pinned.rs:31:5 | LL | fn zap() -> BoxFuture<'static, i32> { - | ----------------------- expected `std::pin::Pin + std::marker::Send + 'static)>>` because of return type + | ----------------------- expected `Pin + Send + 'static)>>` because of return type LL | / async { LL | | 42 LL | | } - | |_____^ expected struct `std::pin::Pin`, found opaque type + | |_____^ expected struct `Pin`, found opaque type | ::: $SRC_DIR/core/src/future/mod.rs:LL:COL | LL | pub const fn from_generator(gen: T) -> impl Future | ------------------------------- the found opaque type | - = note: expected struct `std::pin::Pin + std::marker::Send + 'static)>>` - found opaque type `impl std::future::Future` + = note: expected struct `Pin + Send + 'static)>>` + found opaque type `impl Future` help: you need to pin and box this expression | LL | Box::pin(async { diff --git a/src/test/ui/suggestions/for-i-in-vec.stderr b/src/test/ui/suggestions/for-i-in-vec.stderr index 576a7cc2f60..48f3f423ac6 100644 --- a/src/test/ui/suggestions/for-i-in-vec.stderr +++ b/src/test/ui/suggestions/for-i-in-vec.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `self.v` which is behind a shared reference LL | for _ in self.v { | ^^^^^^ | | - | move occurs because `self.v` has type `std::vec::Vec`, which does not implement the `Copy` trait + | move occurs because `self.v` has type `Vec`, which does not implement the `Copy` trait | help: consider iterating over a slice of the `Vec<_>`'s content: `&self.v` error: aborting due to previous error diff --git a/src/test/ui/suggestions/format-borrow.stderr b/src/test/ui/suggestions/format-borrow.stderr index 44fac16260a..05d8fcd3ed6 100644 --- a/src/test/ui/suggestions/format-borrow.stderr +++ b/src/test/ui/suggestions/format-borrow.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let a: String = &String::from("a"); | ------ ^^^^^^^^^^^^^^^^^^ | | | - | | expected struct `std::string::String`, found `&std::string::String` + | | expected struct `String`, found `&String` | | help: consider removing the borrow: `String::from("a")` | expected due to this @@ -14,7 +14,7 @@ error[E0308]: mismatched types LL | let b: String = &format!("b"); | ------ ^^^^^^^^^^^^^ | | | - | | expected struct `std::string::String`, found `&std::string::String` + | | expected struct `String`, found `&String` | | help: consider removing the borrow: `format!("b")` | expected due to this diff --git a/src/test/ui/suggestions/if-let-typo.stderr b/src/test/ui/suggestions/if-let-typo.stderr index 09db8e01469..bb2ea8cb477 100644 --- a/src/test/ui/suggestions/if-let-typo.stderr +++ b/src/test/ui/suggestions/if-let-typo.stderr @@ -28,10 +28,10 @@ error[E0308]: mismatched types --> $DIR/if-let-typo.rs:6:12 | LL | if 3 = foo {} - | ^^^ expected integer, found enum `std::option::Option` + | ^^^ expected integer, found enum `Option` | = note: expected type `{integer}` - found enum `std::option::Option<{integer}>` + found enum `Option<{integer}>` error[E0308]: mismatched types --> $DIR/if-let-typo.rs:6:8 diff --git a/src/test/ui/suggestions/imm-ref-trait-object.stderr b/src/test/ui/suggestions/imm-ref-trait-object.stderr index cbaed41cf9e..9f89dcd912e 100644 --- a/src/test/ui/suggestions/imm-ref-trait-object.stderr +++ b/src/test/ui/suggestions/imm-ref-trait-object.stderr @@ -9,7 +9,7 @@ LL | t.min().unwrap() LL | Self: Sized, | ----- this has a `Sized` requirement | - = note: you need `&mut dyn std::iter::Iterator` instead of `&dyn std::iter::Iterator` + = note: you need `&mut dyn Iterator` instead of `&dyn Iterator` error: aborting due to previous error diff --git a/src/test/ui/suggestions/impl-trait-with-missing-bounds.rs b/src/test/ui/suggestions/impl-trait-with-missing-bounds.rs index 6e9e8821cfe..d401328077a 100644 --- a/src/test/ui/suggestions/impl-trait-with-missing-bounds.rs +++ b/src/test/ui/suggestions/impl-trait-with-missing-bounds.rs @@ -4,7 +4,7 @@ fn foo(constraints: impl Iterator) { for constraint in constraints { qux(constraint); -//~^ ERROR `::Item` doesn't implement `std::fmt::Debug` +//~^ ERROR `::Item` doesn't implement `Debug` } } @@ -12,7 +12,7 @@ fn bar(t: T, constraints: impl Iterator) where T: std::fmt::Debug { for constraint in constraints { qux(t); qux(constraint); -//~^ ERROR `::Item` doesn't implement `std::fmt::Debug` +//~^ ERROR `::Item` doesn't implement `Debug` } } @@ -20,7 +20,7 @@ fn baz(t: impl std::fmt::Debug, constraints: impl Iterator) { for constraint in constraints { qux(t); qux(constraint); -//~^ ERROR `::Item` doesn't implement `std::fmt::Debug` +//~^ ERROR `::Item` doesn't implement `Debug` } } @@ -28,14 +28,14 @@ fn bat(t: T, constraints: impl Iterator, _: I) { for constraint in constraints { qux(t); qux(constraint); -//~^ ERROR `::Item` doesn't implement `std::fmt::Debug` +//~^ ERROR `::Item` doesn't implement `Debug` } } fn bak(constraints: impl Iterator + std::fmt::Debug) { for constraint in constraints { qux(constraint); -//~^ ERROR `::Item` doesn't implement +//~^ ERROR `::Item` doesn't implement } } diff --git a/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr b/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr index fb0914a8743..099eb1c9d00 100644 --- a/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr +++ b/src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr @@ -1,77 +1,77 @@ -error[E0277]: `::Item` doesn't implement `std::fmt::Debug` +error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:6:13 | LL | qux(constraint); - | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | fn qux(_: impl std::fmt::Debug) {} | --------------- required by this bound in `qux` | - = help: the trait `std::fmt::Debug` is not implemented for `::Item` + = help: the trait `Debug` is not implemented for `::Item` help: introduce a type parameter with a trait bound instead of using `impl Trait` | -LL | fn foo(constraints: I) where ::Item: std::fmt::Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn foo(constraints: I) where ::Item: Debug { + | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `::Item` doesn't implement `std::fmt::Debug` +error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:14:13 | LL | qux(constraint); - | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | fn qux(_: impl std::fmt::Debug) {} | --------------- required by this bound in `qux` | - = help: the trait `std::fmt::Debug` is not implemented for `::Item` + = help: the trait `Debug` is not implemented for `::Item` help: introduce a type parameter with a trait bound instead of using `impl Trait` | -LL | fn bar(t: T, constraints: I) where T: std::fmt::Debug, ::Item: std::fmt::Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(t: T, constraints: I) where T: std::fmt::Debug, ::Item: Debug { + | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `::Item` doesn't implement `std::fmt::Debug` +error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:22:13 | LL | qux(constraint); - | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | fn qux(_: impl std::fmt::Debug) {} | --------------- required by this bound in `qux` | - = help: the trait `std::fmt::Debug` is not implemented for `::Item` + = help: the trait `Debug` is not implemented for `::Item` help: introduce a type parameter with a trait bound instead of using `impl Trait` | -LL | fn baz(t: impl std::fmt::Debug, constraints: I) where ::Item: std::fmt::Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn baz(t: impl std::fmt::Debug, constraints: I) where ::Item: Debug { + | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `::Item` doesn't implement `std::fmt::Debug` +error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:30:13 | LL | qux(constraint); - | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | fn qux(_: impl std::fmt::Debug) {} | --------------- required by this bound in `qux` | - = help: the trait `std::fmt::Debug` is not implemented for `::Item` + = help: the trait `Debug` is not implemented for `::Item` help: introduce a type parameter with a trait bound instead of using `impl Trait` | -LL | fn bat(t: T, constraints: U, _: I) where ::Item: std::fmt::Debug { - | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bat(t: T, constraints: U, _: I) where ::Item: Debug { + | ^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: `::Item` doesn't implement `std::fmt::Debug` +error[E0277]: `::Item` doesn't implement `Debug` --> $DIR/impl-trait-with-missing-bounds.rs:37:13 | LL | qux(constraint); - | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^ `::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | fn qux(_: impl std::fmt::Debug) {} | --------------- required by this bound in `qux` | - = help: the trait `std::fmt::Debug` is not implemented for `::Item` + = help: the trait `Debug` is not implemented for `::Item` help: introduce a type parameter with a trait bound instead of using `impl Trait` | -LL | fn bak(constraints: I) where ::Item: std::fmt::Debug { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bak(constraints: I) where ::Item: Debug { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors diff --git a/src/test/ui/suggestions/into-str.rs b/src/test/ui/suggestions/into-str.rs index 9793ee801d1..606e44b2eb4 100644 --- a/src/test/ui/suggestions/into-str.rs +++ b/src/test/ui/suggestions/into-str.rs @@ -2,5 +2,5 @@ fn foo<'a, T>(_t: T) where T: Into<&'a str> {} fn main() { foo(String::new()); - //~^ ERROR the trait bound `&str: std::convert::From` is not satisfied + //~^ ERROR the trait bound `&str: From` is not satisfied } diff --git a/src/test/ui/suggestions/into-str.stderr b/src/test/ui/suggestions/into-str.stderr index f7affdbf1b4..2854b830ba8 100644 --- a/src/test/ui/suggestions/into-str.stderr +++ b/src/test/ui/suggestions/into-str.stderr @@ -1,14 +1,13 @@ -error[E0277]: the trait bound `&str: std::convert::From` is not satisfied +error[E0277]: the trait bound `&str: From` is not satisfied --> $DIR/into-str.rs:4:5 | LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {} | ------------- required by this bound in `foo` ... LL | foo(String::new()); - | ^^^ the trait `std::convert::From` is not implemented for `&str` + | ^^^ the trait `From` is not implemented for `&str` | - = note: to coerce a `std::string::String` into a `&str`, use `&*` as a prefix - = note: required because of the requirements on the impl of `std::convert::Into<&str>` for `std::string::String` + = note: required because of the requirements on the impl of `Into<&str>` for `String` error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-52820.stderr b/src/test/ui/suggestions/issue-52820.stderr index 5ad6597b82e..ece784de3e2 100644 --- a/src/test/ui/suggestions/issue-52820.stderr +++ b/src/test/ui/suggestions/issue-52820.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | guts, | ^^^^ | | - | expected struct `std::string::String`, found `&str` + | expected struct `String`, found `&str` | help: try using a conversion method: `guts: guts.to_string()` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | brains: guts.clone(), | ^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found `&str` + | expected struct `String`, found `&str` | help: try using a conversion method: `guts.to_string()` error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/issue-59819.stderr b/src/test/ui/suggestions/issue-59819.stderr index b20327a9ff8..43e0016ee20 100644 --- a/src/test/ui/suggestions/issue-59819.stderr +++ b/src/test/ui/suggestions/issue-59819.stderr @@ -24,7 +24,7 @@ error[E0308]: mismatched types LL | let g: String = f; | ------ ^ | | | - | | expected struct `std::string::String`, found struct `Bar` + | | expected struct `String`, found struct `Bar` | | help: try using a conversion method: `f.to_string()` | expected due to this diff --git a/src/test/ui/suggestions/issue-62843.stderr b/src/test/ui/suggestions/issue-62843.stderr index 3b7f85c5668..b2be09a4c7f 100644 --- a/src/test/ui/suggestions/issue-62843.stderr +++ b/src/test/ui/suggestions/issue-62843.stderr @@ -1,14 +1,14 @@ -error[E0277]: expected a `std::ops::FnMut<(char,)>` closure, found `std::string::String` +error[E0277]: expected a `FnMut<(char,)>` closure, found `String` --> $DIR/issue-62843.rs:4:32 | LL | println!("{:?}", line.find(pattern)); | ^^^^^^^ | | - | expected an implementor of trait `std::str::pattern::Pattern<'_>` + | expected an implementor of trait `Pattern<'_>` | help: consider borrowing here: `&pattern` | - = note: the trait bound `std::string::String: std::str::pattern::Pattern<'_>` is not satisfied - = note: required because of the requirements on the impl of `std::str::pattern::Pattern<'_>` for `std::string::String` + = note: the trait bound `String: Pattern<'_>` is not satisfied + = note: required because of the requirements on the impl of `Pattern<'_>` for `String` error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-71394-no-from-impl.rs b/src/test/ui/suggestions/issue-71394-no-from-impl.rs index 9ffcc3f7bc1..0c35deb51e7 100644 --- a/src/test/ui/suggestions/issue-71394-no-from-impl.rs +++ b/src/test/ui/suggestions/issue-71394-no-from-impl.rs @@ -1,5 +1,5 @@ fn main() { let data: &[u8] = &[0; 10]; let _: &[i8] = data.into(); - //~^ ERROR the trait bound `&[i8]: std::convert::From<&[u8]>` is not satisfied + //~^ ERROR the trait bound `&[i8]: From<&[u8]>` is not satisfied } diff --git a/src/test/ui/suggestions/issue-71394-no-from-impl.stderr b/src/test/ui/suggestions/issue-71394-no-from-impl.stderr index 84c73c2f67e..355f2038df8 100644 --- a/src/test/ui/suggestions/issue-71394-no-from-impl.stderr +++ b/src/test/ui/suggestions/issue-71394-no-from-impl.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `&[i8]: std::convert::From<&[u8]>` is not satisfied +error[E0277]: the trait bound `&[i8]: From<&[u8]>` is not satisfied --> $DIR/issue-71394-no-from-impl.rs:3:25 | LL | let _: &[i8] = data.into(); - | ^^^^ the trait `std::convert::From<&[u8]>` is not implemented for `&[i8]` + | ^^^^ the trait `From<&[u8]>` is not implemented for `&[i8]` | - = note: required because of the requirements on the impl of `std::convert::Into<&[i8]>` for `&[u8]` + = note: required because of the requirements on the impl of `Into<&[i8]>` for `&[u8]` error: aborting due to previous error diff --git a/src/test/ui/suggestions/issue-72766.stderr b/src/test/ui/suggestions/issue-72766.stderr index 4290f3b4bf1..a1a5949b196 100644 --- a/src/test/ui/suggestions/issue-72766.stderr +++ b/src/test/ui/suggestions/issue-72766.stderr @@ -1,14 +1,14 @@ -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/issue-72766.rs:14:5 | LL | SadGirl {}.call()?; | ^^^^^^^^^^^^^^^^^^ | | - | the `?` operator cannot be applied to type `impl std::future::Future` + | the `?` operator cannot be applied to type `impl Future` | help: consider using `.await` here: `SadGirl {}.call().await?` | - = help: the trait `std::ops::Try` is not implemented for `impl std::future::Future` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `impl Future` + = note: required by `into_result` error: aborting due to previous error diff --git a/src/test/ui/suggestions/match-ergonomics.stderr b/src/test/ui/suggestions/match-ergonomics.stderr index 559a2d29551..ca7562beb1f 100644 --- a/src/test/ui/suggestions/match-ergonomics.stderr +++ b/src/test/ui/suggestions/match-ergonomics.stderr @@ -12,17 +12,17 @@ LL | [&v] => {}, = note: expected type `i32` found reference `&_` -error[E0529]: expected an array or slice, found `std::vec::Vec` +error[E0529]: expected an array or slice, found `Vec` --> $DIR/match-ergonomics.rs:8:9 | LL | [&v] => {}, - | ^^^^ pattern cannot match with input type `std::vec::Vec` + | ^^^^ pattern cannot match with input type `Vec` -error[E0529]: expected an array or slice, found `std::vec::Vec` +error[E0529]: expected an array or slice, found `Vec` --> $DIR/match-ergonomics.rs:20:9 | LL | [v] => {}, - | ^^^ pattern cannot match with input type `std::vec::Vec` + | ^^^ pattern cannot match with input type `Vec` error[E0308]: mismatched types --> $DIR/match-ergonomics.rs:29:9 diff --git a/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed b/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed index 64a1aeae3e0..a0cb39a3f8a 100644 --- a/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed +++ b/src/test/ui/suggestions/missing-assoc-fn-applicable-suggestions.fixed @@ -13,7 +13,7 @@ struct S; struct Type; impl TraitA<()> for S { //~ ERROR not all trait items implemented -fn baz(_: T) -> Self where T: TraitB, ::Item: std::marker::Copy { todo!() } +fn baz(_: T) -> Self where T: TraitB, ::Item: Copy { todo!() } fn bar(_: T) -> Self { todo!() } type Type = Type; } diff --git a/src/test/ui/suggestions/missing-assoc-fn.stderr b/src/test/ui/suggestions/missing-assoc-fn.stderr index 4f75e2b8380..136ec2152e0 100644 --- a/src/test/ui/suggestions/missing-assoc-fn.stderr +++ b/src/test/ui/suggestions/missing-assoc-fn.stderr @@ -28,7 +28,7 @@ error[E0046]: not all trait items implemented, missing: `from_iter` LL | impl FromIterator<()> for X { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `from_iter` in implementation | - = help: implement the missing item: `fn from_iter(_: T) -> Self where T: std::iter::IntoIterator, std::iter::IntoIterator::Item = A { todo!() }` + = help: implement the missing item: `fn from_iter(_: T) -> Self where T: IntoIterator, std::iter::IntoIterator::Item = A { todo!() }` error: aborting due to 3 previous errors diff --git a/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr b/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr index c6d94826c0c..eb695379b58 100644 --- a/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr +++ b/src/test/ui/suggestions/missing-trait-bounds-for-method-call.stderr @@ -10,12 +10,12 @@ LL | self.foo(); = note: the method `foo` exists but the following trait bounds were not satisfied: `T: Bar` which is required by `Foo: Bar` - `T: std::default::Default` + `T: Default` which is required by `Foo: Bar` help: consider restricting the type parameters to satisfy the trait bounds | -LL | struct Foo where T: Bar, T: std::default::Default { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | struct Foo where T: Bar, T: Default { + | ^^^^^^^^^^^^^^^^^^^^^^^^ error[E0599]: no method named `foo` found for reference `&Fin` in the current scope --> $DIR/missing-trait-bounds-for-method-call.rs:27:14 @@ -27,12 +27,12 @@ LL | self.foo(); | ^^^ method not found in `&Fin` | = note: the method `foo` exists but the following trait bounds were not satisfied: - `T: std::default::Default` + `T: Default` which is required by `Fin: Bar` help: consider restricting the type parameter to satisfy the trait bound | -LL | struct Fin where T: Bar, T: std::default::Default { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | struct Fin where T: Bar, T: Default { + | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr index c3bb37cf835..c1eea56f70d 100644 --- a/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr +++ b/src/test/ui/suggestions/mut-borrow-needed-by-trait.stderr @@ -5,7 +5,7 @@ LL | let fp = BufWriter::new(fp); | ^^ the trait `std::io::Write` is not implemented for `&dyn std::io::Write` | = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write` - = note: required by `std::io::BufWriter::::new` + = note: required by `BufWriter::::new` error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied --> $DIR/mut-borrow-needed-by-trait.rs:17:14 @@ -16,7 +16,7 @@ LL | let fp = BufWriter::new(fp); ::: $SRC_DIR/std/src/io/buffered.rs:LL:COL | LL | pub struct BufWriter { - | ----- required by this bound in `std::io::BufWriter` + | ----- required by this bound in `BufWriter` | = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write` @@ -29,24 +29,24 @@ LL | let fp = BufWriter::new(fp); ::: $SRC_DIR/std/src/io/buffered.rs:LL:COL | LL | pub struct BufWriter { - | ----- required by this bound in `std::io::BufWriter` + | ----- required by this bound in `BufWriter` | = note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write` -error[E0599]: no method named `write_fmt` found for struct `std::io::BufWriter<&dyn std::io::Write>` in the current scope +error[E0599]: no method named `write_fmt` found for struct `BufWriter<&dyn std::io::Write>` in the current scope --> $DIR/mut-borrow-needed-by-trait.rs:22:5 | LL | writeln!(fp, "hello world").unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `std::io::BufWriter<&dyn std::io::Write>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `BufWriter<&dyn std::io::Write>` | ::: $SRC_DIR/std/src/io/buffered.rs:LL:COL | LL | pub struct BufWriter { - | ------------------------------ doesn't satisfy `_: std::io::Write` + | ------------------------------ doesn't satisfy `BufWriter<&dyn std::io::Write>: std::io::Write` | = note: the method `write_fmt` exists but the following trait bounds were not satisfied: `&dyn std::io::Write: std::io::Write` - which is required by `std::io::BufWriter<&dyn std::io::Write>: std::io::Write` + which is required by `BufWriter<&dyn std::io::Write>: std::io::Write` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/mut-ref-reassignment.stderr b/src/test/ui/suggestions/mut-ref-reassignment.stderr index e7748008494..e31c4dc66c8 100644 --- a/src/test/ui/suggestions/mut-ref-reassignment.stderr +++ b/src/test/ui/suggestions/mut-ref-reassignment.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:2:11 | LL | opt = None; - | ^^^^ expected mutable reference, found enum `std::option::Option` + | ^^^^ expected mutable reference, found enum `Option` | - = note: expected mutable reference `&mut std::option::Option` - found enum `std::option::Option<_>` + = note: expected mutable reference `&mut Option` + found enum `Option<_>` help: consider dereferencing here to assign to the mutable borrowed piece of memory | LL | *opt = None; @@ -15,19 +15,19 @@ error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:6:11 | LL | opt = None - | ^^^^ expected mutable reference, found enum `std::option::Option` + | ^^^^ expected mutable reference, found enum `Option` | - = note: expected mutable reference `&mut std::result::Result` - found enum `std::option::Option<_>` + = note: expected mutable reference `&mut std::result::Result` + found enum `Option<_>` error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:10:11 | LL | opt = Some(String::new()) - | ^^^^^^^^^^^^^^^^^^^ expected mutable reference, found enum `std::option::Option` + | ^^^^^^^^^^^^^^^^^^^ expected mutable reference, found enum `Option` | - = note: expected mutable reference `&mut std::option::Option` - found enum `std::option::Option` + = note: expected mutable reference `&mut Option` + found enum `Option` help: consider dereferencing here to assign to the mutable borrowed piece of memory | LL | *opt = Some(String::new()) @@ -37,10 +37,10 @@ error[E0308]: mismatched types --> $DIR/mut-ref-reassignment.rs:14:11 | LL | opt = Some(42) - | ^^^^^^^^ expected mutable reference, found enum `std::option::Option` + | ^^^^^^^^ expected mutable reference, found enum `Option` | - = note: expected mutable reference `&mut std::option::Option` - found enum `std::option::Option<{integer}>` + = note: expected mutable reference `&mut Option` + found enum `Option<{integer}>` error: aborting due to 4 previous errors diff --git a/src/test/ui/suggestions/opaque-type-error.stderr b/src/test/ui/suggestions/opaque-type-error.stderr index 167d61bdf7c..a7c2b82942f 100644 --- a/src/test/ui/suggestions/opaque-type-error.stderr +++ b/src/test/ui/suggestions/opaque-type-error.stderr @@ -13,10 +13,9 @@ LL | | thing_two() LL | | }.await | |_____- `if` and `else` have incompatible types | - = note: expected type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>) - found opaque type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>) + = note: expected type `impl Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>) + found opaque type `impl Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>) = note: distinct uses of `impl Trait` result in different opaque types - = help: if both `Future`s have the same `Output` type, consider `.await`ing on both of them error: aborting due to previous error diff --git a/src/test/ui/suggestions/option-content-move.stderr b/src/test/ui/suggestions/option-content-move.stderr index c842e7b2930..0f3dd346e85 100644 --- a/src/test/ui/suggestions/option-content-move.stderr +++ b/src/test/ui/suggestions/option-content-move.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `selection.1` which is behind a shared referenc LL | if selection.1.unwrap().contains(selection.0) { | ^^^^^^^^^^^ | | - | move occurs because `selection.1` has type `std::option::Option`, which does not implement the `Copy` trait + | move occurs because `selection.1` has type `Option`, which does not implement the `Copy` trait | help: consider borrowing the `Option`'s content: `selection.1.as_ref()` error[E0507]: cannot move out of `selection.1` which is behind a shared reference @@ -13,7 +13,7 @@ error[E0507]: cannot move out of `selection.1` which is behind a shared referenc LL | if selection.1.unwrap().contains(selection.0) { | ^^^^^^^^^^^ | | - | move occurs because `selection.1` has type `std::result::Result`, which does not implement the `Copy` trait + | move occurs because `selection.1` has type `std::result::Result`, which does not implement the `Copy` trait | help: consider borrowing the `Result`'s content: `selection.1.as_ref()` error: aborting due to 2 previous errors diff --git a/src/test/ui/suggestions/option-content-move2.stderr b/src/test/ui/suggestions/option-content-move2.stderr index 71f745374e5..cfbee1518cd 100644 --- a/src/test/ui/suggestions/option-content-move2.stderr +++ b/src/test/ui/suggestions/option-content-move2.stderr @@ -10,7 +10,7 @@ LL | LL | var = Some(NotCopyable); | --- | | - | move occurs because `var` has type `std::option::Option`, which does not implement the `Copy` trait + | move occurs because `var` has type `Option`, which does not implement the `Copy` trait | move occurs due to use in closure error: aborting due to previous error diff --git a/src/test/ui/suggestions/path-by-value.stderr b/src/test/ui/suggestions/path-by-value.stderr index 2b7c29e20cd..ea0c63ac257 100644 --- a/src/test/ui/suggestions/path-by-value.stderr +++ b/src/test/ui/suggestions/path-by-value.stderr @@ -4,8 +4,8 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | fn f(p: Path) { } | ^ doesn't have a size known at compile-time | - = help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]` - = note: required because it appears within the type `std::path::Path` + = help: within `Path`, the trait `Sized` is not implemented for `[u8]` + = note: required because it appears within the type `Path` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/suggestions/path-display.stderr b/src/test/ui/suggestions/path-display.stderr index 13546cddbd3..b08e22eaab7 100644 --- a/src/test/ui/suggestions/path-display.stderr +++ b/src/test/ui/suggestions/path-display.stderr @@ -1,12 +1,12 @@ -error[E0277]: `std::path::Path` doesn't implement `std::fmt::Display` +error[E0277]: `Path` doesn't implement `std::fmt::Display` --> $DIR/path-display.rs:5:20 | LL | println!("{}", path); - | ^^^^ `std::path::Path` cannot be formatted with the default formatter; call `.display()` on it + | ^^^^ `Path` cannot be formatted with the default formatter | - = help: the trait `std::fmt::Display` is not implemented for `std::path::Path` - = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data - = note: required because of the requirements on the impl of `std::fmt::Display` for `&std::path::Path` + = help: the trait `std::fmt::Display` is not implemented for `Path` + = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead + = note: required because of the requirements on the impl of `std::fmt::Display` for `&Path` = note: required by `std::fmt::Display::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr index 163be4cfce7..aa621111c00 100644 --- a/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr +++ b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr @@ -30,7 +30,7 @@ error[E0308]: mismatched types --> $DIR/recover-from-semicolon-trailing-item.rs:12:20 | LL | let _: usize = X {}; - | ----- ^^^^ expected `usize`, found struct `main::X` + | ----- ^^^^ expected `usize`, found struct `X` | | | expected due to this diff --git a/src/test/ui/suggestions/restrict-type-argument.stderr b/src/test/ui/suggestions/restrict-type-argument.stderr index 33af13d943f..7a7242a6369 100644 --- a/src/test/ui/suggestions/restrict-type-argument.stderr +++ b/src/test/ui/suggestions/restrict-type-argument.stderr @@ -9,8 +9,8 @@ LL | is_send(val); | help: consider further restricting this bound | -LL | fn use_impl_sync(val: impl Sync + std::marker::Send) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn use_impl_sync(val: impl Sync + Send) { + | ^^^^^^ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:8:13 @@ -23,8 +23,8 @@ LL | is_send(val); | help: consider further restricting this bound | -LL | fn use_where(val: S) where S: Sync + std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn use_where(val: S) where S: Sync + Send { + | ^^^^^^ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:12:13 @@ -37,8 +37,8 @@ LL | is_send(val); | help: consider further restricting this bound | -LL | fn use_bound(val: S) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn use_bound(val: S) { + | ^^^^^^ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:20:13 @@ -51,8 +51,8 @@ LL | is_send(val); | help: consider further restricting this bound | -LL | Sync + std::marker::Send - | ^^^^^^^^^^^^^^^^^^^ +LL | Sync + Send + | ^^^^^^ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:24:13 @@ -65,8 +65,8 @@ LL | is_send(val); | help: consider further restricting this bound | -LL | fn use_bound_and_where(val: S) where S: std::fmt::Debug + std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn use_bound_and_where(val: S) where S: std::fmt::Debug + Send { + | ^^^^^^ error[E0277]: `S` cannot be sent between threads safely --> $DIR/restrict-type-argument.rs:28:13 @@ -79,8 +79,8 @@ LL | is_send(val); | help: consider restricting type parameter `S` | -LL | fn use_unbound(val: S) { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn use_unbound(val: S) { + | ^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr index 507f822e7b8..996d5773118 100644 --- a/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr +++ b/src/test/ui/suggestions/suggest-assoc-fn-call-with-turbofish-through-deref.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `hello` found for struct `std::cell::RefMut<'_, HasAssocMethod>` in the current scope +error[E0599]: no method named `hello` found for struct `RefMut<'_, HasAssocMethod>` in the current scope --> $DIR/suggest-assoc-fn-call-with-turbofish-through-deref.rs:11:11 | LL | state.hello(); diff --git a/src/test/ui/suggestions/suggest-box.stderr b/src/test/ui/suggestions/suggest-box.stderr index 19786bee9cb..57c83baf4f8 100644 --- a/src/test/ui/suggestions/suggest-box.stderr +++ b/src/test/ui/suggestions/suggest-box.stderr @@ -8,9 +8,9 @@ LL | let _x: Box Result<(), ()>> = || { LL | | Err(())?; LL | | Ok(()) LL | | }; - | |_____^ expected struct `std::boxed::Box`, found closure + | |_____^ expected struct `Box`, found closure | - = note: expected struct `std::boxed::Box std::result::Result<(), ()>>` + = note: expected struct `Box std::result::Result<(), ()>>` found closure `[closure@$DIR/suggest-box.rs:4:47: 7:6]` = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html help: store this in the heap by calling `Box::new` diff --git a/src/test/ui/suggestions/suggest-methods.stderr b/src/test/ui/suggestions/suggest-methods.stderr index c343071ac3e..535841e535b 100644 --- a/src/test/ui/suggestions/suggest-methods.stderr +++ b/src/test/ui/suggestions/suggest-methods.stderr @@ -7,7 +7,7 @@ LL | struct Foo; LL | f.bat(1.0); | ^^^ help: there is an associated function with a similar name: `bar` -error[E0599]: no method named `is_emtpy` found for struct `std::string::String` in the current scope +error[E0599]: no method named `is_emtpy` found for struct `String` in the current scope --> $DIR/suggest-methods.rs:21:15 | LL | let _ = s.is_emtpy(); diff --git a/src/test/ui/suggestions/suggest-private-fields.rs b/src/test/ui/suggestions/suggest-private-fields.rs index 347c8aeed69..8267a82fe2a 100644 --- a/src/test/ui/suggestions/suggest-private-fields.rs +++ b/src/test/ui/suggestions/suggest-private-fields.rs @@ -13,9 +13,9 @@ fn main () { // external crate struct let k = B { aa: 20, - //~^ ERROR struct `xc::B` has no field named `aa` + //~^ ERROR struct `B` has no field named `aa` bb: 20, - //~^ ERROR struct `xc::B` has no field named `bb` + //~^ ERROR struct `B` has no field named `bb` }; // local crate struct let l = A { diff --git a/src/test/ui/suggestions/suggest-private-fields.stderr b/src/test/ui/suggestions/suggest-private-fields.stderr index 524558e0ec5..d628bd16208 100644 --- a/src/test/ui/suggestions/suggest-private-fields.stderr +++ b/src/test/ui/suggestions/suggest-private-fields.stderr @@ -1,14 +1,14 @@ -error[E0560]: struct `xc::B` has no field named `aa` +error[E0560]: struct `B` has no field named `aa` --> $DIR/suggest-private-fields.rs:15:9 | LL | aa: 20, | ^^ help: a field with a similar name exists: `a` -error[E0560]: struct `xc::B` has no field named `bb` +error[E0560]: struct `B` has no field named `bb` --> $DIR/suggest-private-fields.rs:17:9 | LL | bb: 20, - | ^^ `xc::B` does not have this field + | ^^ `B` does not have this field | = note: available fields are: `a` diff --git a/src/test/ui/suggestions/suggest-remove-refs-1.fixed b/src/test/ui/suggestions/suggest-remove-refs-1.fixed index 042e85b10ae..a39e0fbd119 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-1.fixed +++ b/src/test/ui/suggestions/suggest-remove-refs-1.fixed @@ -4,7 +4,7 @@ fn main() { let v = vec![0, 1, 2, 3]; for (i, _) in v.iter().enumerate() { - //~^ ERROR `&std::iter::Enumerate>` is not an iterator + //~^ ERROR `&Enumerate>` is not an iterator println!("{}", i); } } diff --git a/src/test/ui/suggestions/suggest-remove-refs-1.rs b/src/test/ui/suggestions/suggest-remove-refs-1.rs index 7bdf5dbf358..6f767f2c170 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-1.rs +++ b/src/test/ui/suggestions/suggest-remove-refs-1.rs @@ -4,7 +4,7 @@ fn main() { let v = vec![0, 1, 2, 3]; for (i, _) in &v.iter().enumerate() { - //~^ ERROR `&std::iter::Enumerate>` is not an iterator + //~^ ERROR `&Enumerate>` is not an iterator println!("{}", i); } } diff --git a/src/test/ui/suggestions/suggest-remove-refs-1.stderr b/src/test/ui/suggestions/suggest-remove-refs-1.stderr index 5be0072fa33..0dd1b2a59eb 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-1.stderr +++ b/src/test/ui/suggestions/suggest-remove-refs-1.stderr @@ -1,14 +1,14 @@ -error[E0277]: `&std::iter::Enumerate>` is not an iterator +error[E0277]: `&Enumerate>` is not an iterator --> $DIR/suggest-remove-refs-1.rs:6:19 | LL | for (i, _) in &v.iter().enumerate() { | -^^^^^^^^^^^^^^^^^^^^ | | - | `&std::iter::Enumerate>` is not an iterator + | `&Enumerate>` is not an iterator | help: consider removing the leading `&`-reference | - = help: the trait `std::iter::Iterator` is not implemented for `&std::iter::Enumerate>` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `&Enumerate>` + = note: required by `into_iter` error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-remove-refs-2.fixed b/src/test/ui/suggestions/suggest-remove-refs-2.fixed index bdf47b0e87f..0f9c3abfe8e 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-2.fixed +++ b/src/test/ui/suggestions/suggest-remove-refs-2.fixed @@ -4,7 +4,7 @@ fn main() { let v = vec![0, 1, 2, 3]; for (i, _) in v.iter().enumerate() { - //~^ ERROR `&&&&&std::iter::Enumerate>` is not an iterator + //~^ ERROR `&&&&&Enumerate>` is not an iterator println!("{}", i); } } diff --git a/src/test/ui/suggestions/suggest-remove-refs-2.rs b/src/test/ui/suggestions/suggest-remove-refs-2.rs index 3ed56377e14..6c94b12d209 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-2.rs +++ b/src/test/ui/suggestions/suggest-remove-refs-2.rs @@ -4,7 +4,7 @@ fn main() { let v = vec![0, 1, 2, 3]; for (i, _) in & & & & &v.iter().enumerate() { - //~^ ERROR `&&&&&std::iter::Enumerate>` is not an iterator + //~^ ERROR `&&&&&Enumerate>` is not an iterator println!("{}", i); } } diff --git a/src/test/ui/suggestions/suggest-remove-refs-2.stderr b/src/test/ui/suggestions/suggest-remove-refs-2.stderr index ff84a2ce377..5c2efdb197f 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-2.stderr +++ b/src/test/ui/suggestions/suggest-remove-refs-2.stderr @@ -1,14 +1,14 @@ -error[E0277]: `&&&&&std::iter::Enumerate>` is not an iterator +error[E0277]: `&&&&&Enumerate>` is not an iterator --> $DIR/suggest-remove-refs-2.rs:6:19 | LL | for (i, _) in & & & & &v.iter().enumerate() { | ---------^^^^^^^^^^^^^^^^^^^^ | | - | `&&&&&std::iter::Enumerate>` is not an iterator + | `&&&&&Enumerate>` is not an iterator | help: consider removing 5 leading `&`-references | - = help: the trait `std::iter::Iterator` is not implemented for `&&&&&std::iter::Enumerate>` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `&&&&&Enumerate>` + = note: required by `into_iter` error: aborting due to previous error diff --git a/src/test/ui/suggestions/suggest-remove-refs-3.fixed b/src/test/ui/suggestions/suggest-remove-refs-3.fixed index e0ecafabf39..3148fcbe5da 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-3.fixed +++ b/src/test/ui/suggestions/suggest-remove-refs-3.fixed @@ -6,7 +6,7 @@ fn main() { for (i, _) in v .iter() .enumerate() { - //~^^^^ ERROR `&&&&&std::iter::Enumerate>` is not an + //~^^^^ ERROR `&&&&&Enumerate>` is not an println!("{}", i); } } diff --git a/src/test/ui/suggestions/suggest-remove-refs-3.rs b/src/test/ui/suggestions/suggest-remove-refs-3.rs index e13099e8c32..0622adada0c 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-3.rs +++ b/src/test/ui/suggestions/suggest-remove-refs-3.rs @@ -7,7 +7,7 @@ fn main() { & &v .iter() .enumerate() { - //~^^^^ ERROR `&&&&&std::iter::Enumerate>` is not an + //~^^^^ ERROR `&&&&&Enumerate>` is not an println!("{}", i); } } diff --git a/src/test/ui/suggestions/suggest-remove-refs-3.stderr b/src/test/ui/suggestions/suggest-remove-refs-3.stderr index d2f7c72b0e4..c7fbd3d9bd9 100644 --- a/src/test/ui/suggestions/suggest-remove-refs-3.stderr +++ b/src/test/ui/suggestions/suggest-remove-refs-3.stderr @@ -1,4 +1,4 @@ -error[E0277]: `&&&&&std::iter::Enumerate>` is not an iterator +error[E0277]: `&&&&&Enumerate>` is not an iterator --> $DIR/suggest-remove-refs-3.rs:6:19 | LL | for (i, _) in & & & @@ -9,10 +9,10 @@ LL | || & &v | ||___________- help: consider removing 5 leading `&`-references LL | | .iter() LL | | .enumerate() { - | |_____________________^ `&&&&&std::iter::Enumerate>` is not an iterator + | |_____________________^ `&&&&&Enumerate>` is not an iterator | - = help: the trait `std::iter::Iterator` is not implemented for `&&&&&std::iter::Enumerate>` - = note: required by `std::iter::IntoIterator::into_iter` + = help: the trait `Iterator` is not implemented for `&&&&&Enumerate>` + = note: required by `into_iter` error: aborting due to previous error diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index dca9c6ce4d3..82fea0f14bd 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/switched-expectations.rs:3:30 | LL | let ref string: String = var; - | ^^^ expected struct `std::string::String`, found `i32` + | ^^^ expected struct `String`, found `i32` error: aborting due to previous error diff --git a/src/test/ui/symbol-names/impl1.legacy.stderr b/src/test/ui/symbol-names/impl1.legacy.stderr index 52ee3452a48..e4c20cd8820 100644 --- a/src/test/ui/symbol-names/impl1.legacy.stderr +++ b/src/test/ui/symbol-names/impl1.legacy.stderr @@ -64,7 +64,7 @@ error: demangling-alt(<[&dyn impl1::Foo+Assoc = extern "C" fn(&u8, ::.)+impl1::A LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method) +error: def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as Bar>::method) --> $DIR/impl1.rs:71:13 | LL | #[rustc_def_path] diff --git a/src/test/ui/symbol-names/impl1.rs b/src/test/ui/symbol-names/impl1.rs index 380d20d0b12..1d86abd002c 100644 --- a/src/test/ui/symbol-names/impl1.rs +++ b/src/test/ui/symbol-names/impl1.rs @@ -69,8 +69,8 @@ fn main() { //[v0]~| ERROR demangling(<[&dyn impl1[317d481089b8c8fe]::Foo extern "C" fn(&'a u8, ...)> + impl1[317d481089b8c8fe]::AutoTrait; 3: usize] as impl1[317d481089b8c8fe]::main::{closure#1}::Bar>::method) //[v0]~| ERROR demangling-alt(<[&dyn impl1::Foo extern "C" fn(&'a u8, ...)> + impl1::AutoTrait; 3] as impl1::main::{closure#1}::Bar>::method) #[rustc_def_path] - //[legacy]~^ ERROR def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method) - //[v0]~^^ ERROR def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method) + //[legacy]~^ ERROR def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as Bar>::method) + //[v0]~^^ ERROR def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as Bar>::method) fn method(&self) {} } }; diff --git a/src/test/ui/symbol-names/impl1.v0.stderr b/src/test/ui/symbol-names/impl1.v0.stderr index b6a35d97469..01d047d34a5 100644 --- a/src/test/ui/symbol-names/impl1.v0.stderr +++ b/src/test/ui/symbol-names/impl1.v0.stderr @@ -64,7 +64,7 @@ error: demangling-alt(<[&dyn impl1::Foo extern "C" fn(&'a u8, .. LL | #[rustc_symbol_name] | ^^^^^^^^^^^^^^^^^^^^ -error: def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as main::{{closure}}#1::Bar>::method) +error: def-path(<[&dyn Foo extern "C" fn(&'r u8, ...)> + AutoTrait; 3] as Bar>::method) --> $DIR/impl1.rs:71:13 | LL | #[rustc_def_path] diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.rs b/src/test/ui/tag-that-dare-not-speak-its-name.rs index 4d9a98827de..36e22f0b5f1 100644 --- a/src/test/ui/tag-that-dare-not-speak-its-name.rs +++ b/src/test/ui/tag-that-dare-not-speak-its-name.rs @@ -11,6 +11,6 @@ fn main() { let x : char = last(y); //~^ ERROR mismatched types //~| expected type `char` - //~| found enum `std::option::Option<_>` - //~| expected `char`, found enum `std::option::Option` + //~| found enum `Option<_>` + //~| expected `char`, found enum `Option` } diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.stderr b/src/test/ui/tag-that-dare-not-speak-its-name.stderr index cafb6d2d288..96bab152612 100644 --- a/src/test/ui/tag-that-dare-not-speak-its-name.stderr +++ b/src/test/ui/tag-that-dare-not-speak-its-name.stderr @@ -2,12 +2,12 @@ error[E0308]: mismatched types --> $DIR/tag-that-dare-not-speak-its-name.rs:11:20 | LL | let x : char = last(y); - | ---- ^^^^^^^ expected `char`, found enum `std::option::Option` + | ---- ^^^^^^^ expected `char`, found enum `Option` | | | expected due to this | = note: expected type `char` - found enum `std::option::Option<_>` + found enum `Option<_>` error: aborting due to previous error diff --git a/src/test/ui/terr-sorts.rs b/src/test/ui/terr-sorts.rs index f91185fd7c6..c1e2f7daee5 100644 --- a/src/test/ui/terr-sorts.rs +++ b/src/test/ui/terr-sorts.rs @@ -9,7 +9,7 @@ fn want_foo(f: Foo) {} fn have_bar(b: Bar) { want_foo(b); //~ ERROR mismatched types //~| expected struct `Foo` - //~| found struct `std::boxed::Box` + //~| found struct `Box` } fn main() {} diff --git a/src/test/ui/terr-sorts.stderr b/src/test/ui/terr-sorts.stderr index 2f7cc66f105..869b3729659 100644 --- a/src/test/ui/terr-sorts.stderr +++ b/src/test/ui/terr-sorts.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/terr-sorts.rs:10:14 | LL | want_foo(b); - | ^ expected struct `Foo`, found struct `std::boxed::Box` + | ^ expected struct `Foo`, found struct `Box` | = note: expected struct `Foo` - found struct `std::boxed::Box` + found struct `Box` error: aborting due to previous error diff --git a/src/test/ui/traits/cycle-cache-err-60010.stderr b/src/test/ui/traits/cycle-cache-err-60010.stderr index 324316ceaf6..25b1f427f3a 100644 --- a/src/test/ui/traits/cycle-cache-err-60010.stderr +++ b/src/test/ui/traits/cycle-cache-err-60010.stderr @@ -6,7 +6,7 @@ LL | _parse: >::Data, | = note: required because of the requirements on the impl of `Query` for `ParseQuery` -error[E0275]: overflow evaluating the requirement `Runtime: std::panic::RefUnwindSafe` +error[E0275]: overflow evaluating the requirement `Runtime: RefUnwindSafe` --> $DIR/cycle-cache-err-60010.rs:31:20 | LL | trait Database { diff --git a/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr b/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr index 446b8dbf114..83b1b83d193 100644 --- a/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr +++ b/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr @@ -7,7 +7,7 @@ LL | struct Outer(T); LL | Outer(TestType); | ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `dummy::TestType` + = help: the trait `Send` is not implemented for `dummy::TestType` error[E0277]: `dummy::TestType` cannot be sent between threads safely --> $DIR/negated-auto-traits-error.rs:23:5 @@ -18,7 +18,7 @@ LL | struct Outer(T); LL | Outer(TestType); | ^^^^^^^^^^^^^^^ `dummy::TestType` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `dummy::TestType` + = help: the trait `Send` is not implemented for `dummy::TestType` error[E0277]: `dummy1b::TestType` cannot be sent between threads safely --> $DIR/negated-auto-traits-error.rs:32:13 @@ -29,7 +29,7 @@ LL | fn is_send(_: T) {} LL | is_send(TestType); | ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `dummy1b::TestType` + = help: the trait `Send` is not implemented for `dummy1b::TestType` error[E0277]: `dummy1c::TestType` cannot be sent between threads safely --> $DIR/negated-auto-traits-error.rs:40:13 @@ -40,7 +40,7 @@ LL | fn is_send(_: T) {} LL | is_send((8, TestType)); | ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely | - = help: within `({integer}, dummy1c::TestType)`, the trait `std::marker::Send` is not implemented for `dummy1c::TestType` + = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType` = note: required because it appears within the type `({integer}, dummy1c::TestType)` error[E0277]: `dummy2::TestType` cannot be sent between threads safely @@ -52,12 +52,12 @@ LL | fn is_send(_: T) {} LL | is_send(Box::new(TestType)); | ^^^^^^^^^^^^^^^^^^ | | - | expected an implementor of trait `std::marker::Send` + | expected an implementor of trait `Send` | help: consider borrowing here: `&Box::new(TestType)` | - = note: the trait bound `dummy2::TestType: std::marker::Send` is not satisfied - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique` - = note: required because it appears within the type `std::boxed::Box` + = note: the trait bound `dummy2::TestType: Send` is not satisfied + = note: required because of the requirements on the impl of `Send` for `Unique` + = note: required because it appears within the type `Box` error[E0277]: `dummy3::TestType` cannot be sent between threads safely --> $DIR/negated-auto-traits-error.rs:56:13 @@ -68,10 +68,10 @@ LL | fn is_send(_: T) {} LL | is_send(Box::new(Outer2(TestType))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely | - = help: within `Outer2`, the trait `std::marker::Send` is not implemented for `dummy3::TestType` + = help: within `Outer2`, the trait `Send` is not implemented for `dummy3::TestType` = note: required because it appears within the type `Outer2` - = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique>` - = note: required because it appears within the type `std::boxed::Box>` + = note: required because of the requirements on the impl of `Send` for `Unique>` + = note: required because it appears within the type `Box>` error[E0277]: `main::TestType` cannot be sent between threads safely --> $DIR/negated-auto-traits-error.rs:66:13 @@ -82,11 +82,11 @@ LL | fn is_sync(_: T) {} LL | is_sync(Outer2(TestType)); | ^^^^^^^^^^^^^^^^ | | - | expected an implementor of trait `std::marker::Sync` + | expected an implementor of trait `Sync` | help: consider borrowing here: `&Outer2(TestType)` | - = note: the trait bound `main::TestType: std::marker::Sync` is not satisfied - = note: required because of the requirements on the impl of `std::marker::Sync` for `Outer2` + = note: the trait bound `main::TestType: Sync` is not satisfied + = note: required because of the requirements on the impl of `Sync` for `Outer2` error: aborting due to 7 previous errors diff --git a/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr b/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr index d7039e3db6b..a87acb1fb09 100644 --- a/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr +++ b/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-clone.stderr @@ -1,4 +1,4 @@ -error[E0751]: found both positive and negative implementation of trait `std::clone::Clone` for type `&mut MyType<'_>`: +error[E0751]: found both positive and negative implementation of trait `Clone` for type `&mut MyType<'_>`: --> $DIR/pin-unsound-issue-66544-clone.rs:7:1 | LL | impl<'a> Clone for &'a mut MyType<'a> { diff --git a/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr b/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr index a0b62a8bab6..9185e8f8430 100644 --- a/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr +++ b/src/test/ui/traits/negative-impls/pin-unsound-issue-66544-derefmut.stderr @@ -1,4 +1,4 @@ -error[E0751]: found both positive and negative implementation of trait `std::ops::DerefMut` for type `&MyType<'_>`: +error[E0751]: found both positive and negative implementation of trait `DerefMut` for type `&MyType<'_>`: --> $DIR/pin-unsound-issue-66544-derefmut.rs:12:1 | LL | impl<'a> DerefMut for &'a MyType<'a> { diff --git a/src/test/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.stderr b/src/test/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.stderr index 7cce45d2c8f..635e2b02483 100644 --- a/src/test/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.stderr +++ b/src/test/ui/traits/negative-impls/rely-on-negative-impl-in-coherence.stderr @@ -1,10 +1,10 @@ -error[E0119]: conflicting implementations of trait `LocalTrait` for type `std::string::String`: +error[E0119]: conflicting implementations of trait `LocalTrait` for type `String`: --> $DIR/rely-on-negative-impl-in-coherence.rs:19:1 | LL | impl LocalTrait for T { } | -------------------------------------- first implementation here LL | impl LocalTrait for String { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::string::String` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `String` error: aborting due to previous error diff --git a/src/test/ui/traits/overlap-not-permitted-for-builtin-trait.stderr b/src/test/ui/traits/overlap-not-permitted-for-builtin-trait.stderr index 94a0c287f4a..3bc277ca074 100644 --- a/src/test/ui/traits/overlap-not-permitted-for-builtin-trait.stderr +++ b/src/test/ui/traits/overlap-not-permitted-for-builtin-trait.stderr @@ -1,4 +1,4 @@ -error[E0119]: conflicting implementations of trait `std::marker::Send` for type `MyStruct`: +error[E0119]: conflicting implementations of trait `Send` for type `MyStruct`: --> $DIR/overlap-not-permitted-for-builtin-trait.rs:7:1 | LL | impl !Send for MyStruct {} diff --git a/src/test/ui/traits/trait-alias-ambiguous.stderr b/src/test/ui/traits/trait-alias-ambiguous.stderr index 7c00bb5207b..f692e92d861 100644 --- a/src/test/ui/traits/trait-alias-ambiguous.stderr +++ b/src/test/ui/traits/trait-alias-ambiguous.stderr @@ -4,24 +4,24 @@ error[E0034]: multiple applicable items in scope LL | t.foo(); | ^^^ multiple `foo` found | -note: candidate #1 is defined in an impl of the trait `inner::A` for the type `u8` +note: candidate #1 is defined in an impl of the trait `A` for the type `u8` --> $DIR/trait-alias-ambiguous.rs:8:9 | LL | fn foo(&self) {} | ^^^^^^^^^^^^^ -note: candidate #2 is defined in an impl of the trait `inner::B` for the type `u8` +note: candidate #2 is defined in an impl of the trait `B` for the type `u8` --> $DIR/trait-alias-ambiguous.rs:11:9 | LL | fn foo(&self) {} | ^^^^^^^^^^^^^ help: disambiguate the associated function for candidate #1 | -LL | inner::A::foo(&t); - | ^^^^^^^^^^^^^^^^^ +LL | A::foo(&t); + | ^^^^^^^^^^ help: disambiguate the associated function for candidate #2 | -LL | inner::B::foo(&t); - | ^^^^^^^^^^^^^^^^^ +LL | B::foo(&t); + | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs b/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs index 259fc4fa5d1..14edfdd7a3d 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs +++ b/src/test/ui/traits/trait-alias/trait-alias-cross-crate.rs @@ -12,6 +12,6 @@ fn use_alias() {} fn main() { use_alias::(); use_alias::>(); - //~^ ERROR `std::rc::Rc` cannot be sent between threads safely [E0277] - //~^^ ERROR `std::rc::Rc` cannot be shared between threads safely [E0277] + //~^ ERROR `Rc` cannot be sent between threads safely [E0277] + //~^^ ERROR `Rc` cannot be shared between threads safely [E0277] } diff --git a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr b/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr index 04c86cb2403..60a4a46a055 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr +++ b/src/test/ui/traits/trait-alias/trait-alias-cross-crate.stderr @@ -1,24 +1,24 @@ -error[E0277]: `std::rc::Rc` cannot be sent between threads safely +error[E0277]: `Rc` cannot be sent between threads safely --> $DIR/trait-alias-cross-crate.rs:14:17 | LL | fn use_alias() {} | -------- required by this bound in `use_alias` ... LL | use_alias::>(); - | ^^^^^^^ `std::rc::Rc` cannot be sent between threads safely + | ^^^^^^^ `Rc` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `std::rc::Rc` + = help: the trait `Send` is not implemented for `Rc` -error[E0277]: `std::rc::Rc` cannot be shared between threads safely +error[E0277]: `Rc` cannot be shared between threads safely --> $DIR/trait-alias-cross-crate.rs:14:17 | LL | fn use_alias() {} | -------- required by this bound in `use_alias` ... LL | use_alias::>(); - | ^^^^^^^ `std::rc::Rc` cannot be shared between threads safely + | ^^^^^^^ `Rc` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::rc::Rc` + = help: the trait `Sync` is not implemented for `Rc` error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs b/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs index d62fd7e59c9..5c753ff207c 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs +++ b/src/test/ui/traits/trait-alias/trait-alias-object-fail.rs @@ -5,7 +5,7 @@ trait IteratorAlias = Iterator; fn main() { let _: &dyn EqAlias = &123; - //~^ ERROR the trait `std::cmp::Eq` cannot be made into an object [E0038] + //~^ ERROR the trait `Eq` cannot be made into an object [E0038] let _: &dyn IteratorAlias = &vec![123].into_iter(); //~^ ERROR must be specified } diff --git a/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr b/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr index 4cad7107898..1f54e03ee6e 100644 --- a/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr +++ b/src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr @@ -1,15 +1,15 @@ -error[E0038]: the trait `std::cmp::Eq` cannot be made into an object +error[E0038]: the trait `Eq` cannot be made into an object --> $DIR/trait-alias-object-fail.rs:7:13 | LL | let _: &dyn EqAlias = &123; - | ^^^^^^^^^^^ the trait `std::cmp::Eq` cannot be made into an object + | ^^^^^^^^^^^ the trait `Eq` cannot be made into an object | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub trait Eq: PartialEq { | --------------- the trait cannot be made into an object because it uses `Self` as a type parameter in this -error[E0191]: the value of the associated type `Item` (from trait `std::iter::Iterator`) must be specified +error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified --> $DIR/trait-alias-object-fail.rs:9:17 | LL | let _: &dyn IteratorAlias = &vec![123].into_iter(); diff --git a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr b/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr index daca91abff8..b403fb4184d 100644 --- a/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr +++ b/src/test/ui/traits/trait-bounds-not-on-bare-trait.stderr @@ -6,13 +6,13 @@ LL | fn foo(_x: Foo + Send) { | = note: `#[warn(bare_trait_objects)]` on by default -error[E0277]: the size for values of type `(dyn Foo + std::marker::Send + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be known at compilation time --> $DIR/trait-bounds-not-on-bare-trait.rs:7:8 | LL | fn foo(_x: Foo + Send) { | ^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn Foo + std::marker::Send + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr index d2fa211b487..3e8c727dda0 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr +++ b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc.stderr @@ -1,24 +1,24 @@ -error[E0277]: the trait bound `usize: trait_bounds_on_structs_and_enums_xc::Trait` is not satisfied +error[E0277]: the trait bound `usize: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums-xc.rs:7:15 | LL | fn explode(x: Foo) {} - | ^^^^^^^^^^ the trait `trait_bounds_on_structs_and_enums_xc::Trait` is not implemented for `usize` + | ^^^^^^^^^^ the trait `Trait` is not implemented for `usize` | ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:5:18 | LL | pub struct Foo { - | ----- required by this bound in `trait_bounds_on_structs_and_enums_xc::Foo` + | ----- required by this bound in `Foo` -error[E0277]: the trait bound `f32: trait_bounds_on_structs_and_enums_xc::Trait` is not satisfied +error[E0277]: the trait bound `f32: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums-xc.rs:10:14 | LL | fn kaboom(y: Bar) {} - | ^^^^^^^^ the trait `trait_bounds_on_structs_and_enums_xc::Trait` is not implemented for `f32` + | ^^^^^^^^ the trait `Trait` is not implemented for `f32` | ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16 | LL | pub enum Bar { - | ----- required by this bound in `trait_bounds_on_structs_and_enums_xc::Bar` + | ----- required by this bound in `Bar` error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr index ee3e755c953..899e9941995 100644 --- a/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr +++ b/src/test/ui/traits/trait-bounds-on-structs-and-enums-xc1.stderr @@ -1,21 +1,21 @@ -error[E0277]: the trait bound `f64: trait_bounds_on_structs_and_enums_xc::Trait` is not satisfied +error[E0277]: the trait bound `f64: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:12:14 | LL | let bar: Bar = return; - | ^^^^^^^^ the trait `trait_bounds_on_structs_and_enums_xc::Trait` is not implemented for `f64` + | ^^^^^^^^ the trait `Trait` is not implemented for `f64` | ::: $DIR/auxiliary/trait_bounds_on_structs_and_enums_xc.rs:9:16 | LL | pub enum Bar { - | ----- required by this bound in `trait_bounds_on_structs_and_enums_xc::Bar` + | ----- required by this bound in `Bar` -error[E0277]: the trait bound `{integer}: trait_bounds_on_structs_and_enums_xc::Trait` is not satisfied +error[E0277]: the trait bound `{integer}: Trait` is not satisfied --> $DIR/trait-bounds-on-structs-and-enums-xc1.rs:8:15 | LL | let foo = Foo { - | ^^^ the trait `trait_bounds_on_structs_and_enums_xc::Trait` is not implemented for `{integer}` + | ^^^ the trait `Trait` is not implemented for `{integer}` | - = note: required by `trait_bounds_on_structs_and_enums_xc::Foo` + = note: required by `Foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/traits/trait-bounds-same-crate-name.stderr b/src/test/ui/traits/trait-bounds-same-crate-name.stderr index 8a6e059604d..af5ba8808ff 100644 --- a/src/test/ui/traits/trait-bounds-same-crate-name.stderr +++ b/src/test/ui/traits/trait-bounds-same-crate-name.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `main::a::Foo: main::a::Bar` is not satisfied +error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied --> $DIR/trait-bounds-same-crate-name.rs:31:20 | LL | a::try_foo(foo); - | ^^^ the trait `main::a::Bar` is not implemented for `main::a::Foo` + | ^^^ the trait `main::a::Bar` is not implemented for `Foo` | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} - | --- required by this bound in `main::a::try_foo` + | --- required by this bound in `try_foo` | help: trait impl with same name found --> $DIR/auxiliary/crate_a2.rs:5:1 @@ -16,27 +16,27 @@ LL | impl Bar for Foo {} | ^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `crate_a2` are being used? -error[E0277]: the trait bound `main::a::DoesNotImplementTrait: main::a::Bar` is not satisfied +error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied --> $DIR/trait-bounds-same-crate-name.rs:38:20 | LL | a::try_foo(implements_no_traits); - | ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `main::a::DoesNotImplementTrait` + | ^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait` | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} - | --- required by this bound in `main::a::try_foo` + | --- required by this bound in `try_foo` -error[E0277]: the trait bound `main::a::ImplementsWrongTraitConditionally: main::a::Bar` is not satisfied +error[E0277]: the trait bound `ImplementsWrongTraitConditionally: main::a::Bar` is not satisfied --> $DIR/trait-bounds-same-crate-name.rs:45:20 | LL | a::try_foo(other_variant_implements_mismatched_trait); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `main::a::ImplementsWrongTraitConditionally` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally` | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} - | --- required by this bound in `main::a::try_foo` + | --- required by this bound in `try_foo` | help: trait impl with same name found --> $DIR/auxiliary/crate_a2.rs:13:1 @@ -45,19 +45,19 @@ LL | impl Bar for ImplementsWrongTraitConditionally {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `crate_a2` are being used? -error[E0277]: the trait bound `main::a::ImplementsTraitForUsize: main::a::Bar` is not satisfied +error[E0277]: the trait bound `ImplementsTraitForUsize: main::a::Bar` is not satisfied --> $DIR/trait-bounds-same-crate-name.rs:51:20 | LL | a::try_foo(other_variant_implements_correct_trait); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `main::a::ImplementsTraitForUsize` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize` | ::: $DIR/auxiliary/crate_a1.rs:3:24 | LL | pub fn try_foo(x: impl Bar) {} - | --- required by this bound in `main::a::try_foo` + | --- required by this bound in `try_foo` | = help: the following implementations were found: - as main::a::Bar> + as main::a::Bar> error: aborting due to 4 previous errors diff --git a/src/test/ui/traits/trait-bounds-sugar.stderr b/src/test/ui/traits/trait-bounds-sugar.stderr index 5ee8be51dd5..6bd335fe473 100644 --- a/src/test/ui/traits/trait-bounds-sugar.stderr +++ b/src/test/ui/traits/trait-bounds-sugar.stderr @@ -2,10 +2,10 @@ error[E0308]: mismatched types --> $DIR/trait-bounds-sugar.rs:12:7 | LL | a(x); - | ^ expected trait `Foo + std::marker::Send`, found trait `Foo + std::marker::Sync` + | ^ expected trait `Foo + Send`, found trait `Foo + Sync` | - = note: expected struct `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>` - found struct `std::boxed::Box<(dyn Foo + std::marker::Sync + 'static)>` + = note: expected struct `Box<(dyn Foo + Send + 'static)>` + found struct `Box<(dyn Foo + Sync + 'static)>` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-object-macro-matcher.rs b/src/test/ui/traits/trait-object-macro-matcher.rs index a6852569f3a..91097874997 100644 --- a/src/test/ui/traits/trait-object-macro-matcher.rs +++ b/src/test/ui/traits/trait-object-macro-matcher.rs @@ -6,7 +6,7 @@ macro_rules! m { fn main() { m!(dyn Copy + Send + 'static); - //~^ ERROR the trait `std::marker::Copy` cannot be made into an object + //~^ ERROR the trait `Copy` cannot be made into an object m!(dyn 'static + Send); m!(dyn 'static +); //~ ERROR at least one trait is required for an object type } diff --git a/src/test/ui/traits/trait-object-macro-matcher.stderr b/src/test/ui/traits/trait-object-macro-matcher.stderr index cb48bd1258e..bc567360734 100644 --- a/src/test/ui/traits/trait-object-macro-matcher.stderr +++ b/src/test/ui/traits/trait-object-macro-matcher.stderr @@ -4,11 +4,11 @@ error[E0224]: at least one trait is required for an object type LL | m!(dyn 'static +); | ^^^^^^^^^^^^^ -error[E0038]: the trait `std::marker::Copy` cannot be made into an object +error[E0038]: the trait `Copy` cannot be made into an object --> $DIR/trait-object-macro-matcher.rs:8:8 | LL | m!(dyn Copy + Send + 'static); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` diff --git a/src/test/ui/traits/trait-object-safety.stderr b/src/test/ui/traits/trait-object-safety.stderr index 162e9249b88..3fa7c0c484e 100644 --- a/src/test/ui/traits/trait-object-safety.stderr +++ b/src/test/ui/traits/trait-object-safety.stderr @@ -9,7 +9,7 @@ LL | fn foo(); LL | let _: &dyn Tr = &St; | ^^^ the trait `Tr` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Tr>` for `&St` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Tr>` for `&St` = note: required by cast to type `&dyn Tr` help: consider turning `foo` into a method by giving it a `&self` argument or constraining it so it does not apply to trait objects | diff --git a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr b/src/test/ui/traits/trait-safety-trait-impl-cc.stderr index 5234e205a84..2fcedc5cc52 100644 --- a/src/test/ui/traits/trait-safety-trait-impl-cc.stderr +++ b/src/test/ui/traits/trait-safety-trait-impl-cc.stderr @@ -1,4 +1,4 @@ -error[E0200]: the trait `lib::Foo` requires an `unsafe impl` declaration +error[E0200]: the trait `Foo` requires an `unsafe impl` declaration --> $DIR/trait-safety-trait-impl-cc.rs:9:1 | LL | / impl lib::Foo for Bar { diff --git a/src/test/ui/traits/trait-static-method-generic-inference.stderr b/src/test/ui/traits/trait-static-method-generic-inference.stderr index 8f20cc5093e..6a7e8f59d87 100644 --- a/src/test/ui/traits/trait-static-method-generic-inference.stderr +++ b/src/test/ui/traits/trait-static-method-generic-inference.stderr @@ -2,12 +2,12 @@ error[E0283]: type annotations needed --> $DIR/trait-static-method-generic-inference.rs:24:25 | LL | fn new() -> T; - | -------------- required by `base::HasNew::new` + | -------------- required by `HasNew::new` ... LL | let _f: base::Foo = base::HasNew::new(); | ^^^^^^^^^^^^^^^^^ cannot infer type | - = note: cannot satisfy `_: base::HasNew` + = note: cannot satisfy `_: HasNew` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed b/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed index 2bb34b0ebee..a1abf668b8b 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed +++ b/src/test/ui/traits/trait-suggest-deferences-issue-39029.fixed @@ -14,5 +14,5 @@ fn main() { let _works = TcpListener::bind("some string"); let bad = NoToSocketAddrs("bad".to_owned()); let _errors = TcpListener::bind(&*bad); - //~^ ERROR the trait bound `NoToSocketAddrs: std::net::ToSocketAddrs` is not satisfied + //~^ ERROR the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied } diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs b/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs index 33d524608a0..90d097105ed 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs +++ b/src/test/ui/traits/trait-suggest-deferences-issue-39029.rs @@ -14,5 +14,5 @@ fn main() { let _works = TcpListener::bind("some string"); let bad = NoToSocketAddrs("bad".to_owned()); let _errors = TcpListener::bind(&bad); - //~^ ERROR the trait bound `NoToSocketAddrs: std::net::ToSocketAddrs` is not satisfied + //~^ ERROR the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied } diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr b/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr index 6dff2e418c4..4273b8e3f3e 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr +++ b/src/test/ui/traits/trait-suggest-deferences-issue-39029.stderr @@ -1,18 +1,18 @@ -error[E0277]: the trait bound `NoToSocketAddrs: std::net::ToSocketAddrs` is not satisfied +error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied --> $DIR/trait-suggest-deferences-issue-39029.rs:16:37 | LL | let _errors = TcpListener::bind(&bad); | ^^^^ | | - | the trait `std::net::ToSocketAddrs` is not implemented for `NoToSocketAddrs` + | the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs` | help: consider adding dereference here: `&*bad` | ::: $SRC_DIR/std/src/net/tcp.rs:LL:COL | LL | pub fn bind(addr: A) -> io::Result { - | ------------- required by this bound in `std::net::TcpListener::bind` + | ------------- required by this bound in `TcpListener::bind` | - = note: required because of the requirements on the impl of `std::net::ToSocketAddrs` for `&NoToSocketAddrs` + = note: required because of the requirements on the impl of `ToSocketAddrs` for `&NoToSocketAddrs` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed b/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed index fa7b9167d8d..406caaa007f 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed +++ b/src/test/ui/traits/trait-suggest-deferences-issue-62530.fixed @@ -11,5 +11,5 @@ fn main() { let string = String::new(); takes_str(&string); // Ok takes_type_parameter(&*string); // Error - //~^ ERROR the trait bound `&std::string::String: SomeTrait` is not satisfied + //~^ ERROR the trait bound `&String: SomeTrait` is not satisfied } diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs b/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs index e785f012177..53846be7306 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs +++ b/src/test/ui/traits/trait-suggest-deferences-issue-62530.rs @@ -11,5 +11,5 @@ fn main() { let string = String::new(); takes_str(&string); // Ok takes_type_parameter(&string); // Error - //~^ ERROR the trait bound `&std::string::String: SomeTrait` is not satisfied + //~^ ERROR the trait bound `&String: SomeTrait` is not satisfied } diff --git a/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr b/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr index 9c2a582638e..eaec87d01da 100644 --- a/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr +++ b/src/test/ui/traits/trait-suggest-deferences-issue-62530.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&std::string::String: SomeTrait` is not satisfied +error[E0277]: the trait bound `&String: SomeTrait` is not satisfied --> $DIR/trait-suggest-deferences-issue-62530.rs:13:26 | LL | fn takes_type_parameter(_x: T) where T: SomeTrait {} @@ -7,7 +7,7 @@ LL | fn takes_type_parameter(_x: T) where T: SomeTrait {} LL | takes_type_parameter(&string); // Error | ^^^^^^^ | | - | the trait `SomeTrait` is not implemented for `&std::string::String` + | the trait `SomeTrait` is not implemented for `&String` | help: consider adding dereference here: `&*string` error: aborting due to previous error diff --git a/src/test/ui/traits/trait-suggest-where-clause.rs b/src/test/ui/traits/trait-suggest-where-clause.rs index 8405e5ff62e..46d047a2de3 100644 --- a/src/test/ui/traits/trait-suggest-where-clause.rs +++ b/src/test/ui/traits/trait-suggest-where-clause.rs @@ -13,15 +13,15 @@ fn check() { // ... even if T occurs as a type parameter >::from; - //~^ ERROR `u64: std::convert::From` is not satisfied + //~^ ERROR `u64: From` is not satisfied ::Item>>::from; - //~^ ERROR `u64: std::convert::From<::Item>` is not satisfied + //~^ ERROR `u64: From<::Item>` is not satisfied // ... but not if there are inference variables as From>::from; - //~^ ERROR `Misc<_>: std::convert::From` is not satisfied + //~^ ERROR `Misc<_>: From` is not satisfied // ... and also not if the error is not related to the type diff --git a/src/test/ui/traits/trait-suggest-where-clause.stderr b/src/test/ui/traits/trait-suggest-where-clause.stderr index 73da2a6eb4c..0f6f8d75c5e 100644 --- a/src/test/ui/traits/trait-suggest-where-clause.stderr +++ b/src/test/ui/traits/trait-suggest-where-clause.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `U` cannot be known at compilation tim --> $DIR/trait-suggest-where-clause.rs:7:20 | LL | fn check() { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | // suggest a where-clause, if needed LL | mem::size_of::(); | ^ doesn't have a size known at compile-time @@ -16,7 +16,7 @@ error[E0277]: the size for values of type `U` cannot be known at compilation tim --> $DIR/trait-suggest-where-clause.rs:10:5 | LL | fn check() { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | mem::size_of::>(); | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -28,29 +28,29 @@ LL | pub const fn size_of() -> usize { | = note: required because it appears within the type `Misc` -error[E0277]: the trait bound `u64: std::convert::From` is not satisfied +error[E0277]: the trait bound `u64: From` is not satisfied --> $DIR/trait-suggest-where-clause.rs:15:5 | LL | >::from; - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `u64` + | ^^^^^^^^^^^^^^^^^^^^^^ the trait `From` is not implemented for `u64` | - = note: required by `std::convert::From::from` + = note: required by `from` -error[E0277]: the trait bound `u64: std::convert::From<::Item>` is not satisfied +error[E0277]: the trait bound `u64: From<::Item>` is not satisfied --> $DIR/trait-suggest-where-clause.rs:18:5 | LL | ::Item>>::from; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<::Item>` is not implemented for `u64` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<::Item>` is not implemented for `u64` | - = note: required by `std::convert::From::from` + = note: required by `from` -error[E0277]: the trait bound `Misc<_>: std::convert::From` is not satisfied +error[E0277]: the trait bound `Misc<_>: From` is not satisfied --> $DIR/trait-suggest-where-clause.rs:23:5 | LL | as From>::from; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `Misc<_>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From` is not implemented for `Misc<_>` | - = note: required by `std::convert::From::from` + = note: required by `from` error[E0277]: the size for values of type `[T]` cannot be known at compilation time --> $DIR/trait-suggest-where-clause.rs:28:20 @@ -63,7 +63,7 @@ LL | mem::size_of::<[T]>(); LL | pub const fn size_of() -> usize { | - required by this bound in `std::mem::size_of` | - = help: the trait `std::marker::Sized` is not implemented for `[T]` + = help: the trait `Sized` is not implemented for `[T]` error[E0277]: the size for values of type `[&U]` cannot be known at compilation time --> $DIR/trait-suggest-where-clause.rs:31:5 @@ -76,7 +76,7 @@ LL | mem::size_of::<[&U]>(); LL | pub const fn size_of() -> usize { | - required by this bound in `std::mem::size_of` | - = help: the trait `std::marker::Sized` is not implemented for `[&U]` + = help: the trait `Sized` is not implemented for `[&U]` error: aborting due to 7 previous errors diff --git a/src/test/ui/traits/trait-test-2.stderr b/src/test/ui/traits/trait-test-2.stderr index 9d1eef54756..0a62f1aeb27 100644 --- a/src/test/ui/traits/trait-test-2.stderr +++ b/src/test/ui/traits/trait-test-2.stderr @@ -39,8 +39,8 @@ LL | (box 10 as Box).dup(); | = help: consider moving `dup` to another trait = help: consider moving `blah` to another trait - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::boxed::Box<{integer}>` - = note: required by cast to type `std::boxed::Box` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Box<{integer}>` + = note: required by cast to type `Box` error: aborting due to 4 previous errors diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr b/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr index 604763f8e35..5ac7b08e52f 100644 --- a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr +++ b/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving ` as std::iter::Iterator>::Item == u32` +error[E0271]: type mismatch resolving ` as Iterator>::Item == u32` --> $DIR/traits-assoc-type-in-supertrait-bad.rs:12:16 | LL | type Key = u32; diff --git a/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr b/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr index 9a227229ea4..b904826081f 100644 --- a/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-lifetime.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `std::boxed::Box>>: NotAuto` +error[E0275]: overflow evaluating the requirement `Box>>: NotAuto` --> $DIR/traits-inductive-overflow-lifetime.rs:27:5 | LL | fn is_send() {} diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr index b97197285ed..c11234ee48a 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr @@ -6,14 +6,14 @@ LL | auto trait Magic: Copy {} | | | auto trait cannot have super traits -error[E0277]: the trait bound `NoClone: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `NoClone: Copy` is not satisfied --> $DIR/traits-inductive-overflow-supertrait-oibit.rs:16:23 | LL | fn copy(x: T) -> (T, T) { (x, x) } | ----- required by this bound in `copy` ... LL | let (a, b) = copy(NoClone); - | ^^^^^^^ the trait `std::marker::Copy` is not implemented for `NoClone` + | ^^^^^^^ the trait `Copy` is not implemented for `NoClone` | = note: required because of the requirements on the impl of `Magic` for `NoClone` diff --git a/src/test/ui/traits/traits-issue-71136.stderr b/src/test/ui/traits/traits-issue-71136.stderr index 4c0a43062f6..23a8040f6ff 100644 --- a/src/test/ui/traits/traits-issue-71136.stderr +++ b/src/test/ui/traits/traits-issue-71136.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `Foo: std::clone::Clone` is not satisfied +error[E0277]: the trait bound `Foo: Clone` is not satisfied --> $DIR/traits-issue-71136.rs:5:5 | LL | the_foos: Vec, - | ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `std::clone::Clone` + | ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone` | - = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec` - = note: required by `std::clone::Clone::clone` + = note: required because of the requirements on the impl of `Clone` for `Vec` + = note: required by `clone` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error 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 1a6093343ab..aefe3fb8e25 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 @@ -13,7 +13,7 @@ error[E0591]: can't transmute zero-sized type LL | let p = mem::transmute(foo); | ^^^^^^^^^^^^^^ | - = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} + = note: source type: unsafe fn() -> (i8, *const (), Option) {foo} = note: target type: *const () = help: cast with `as` to a pointer instead @@ -24,7 +24,7 @@ LL | let of = mem::transmute(main); | ^^^^^^^^^^^^^^ | = note: source type: fn() {main} - = note: target type: std::option::Option + = note: target type: Option = help: cast with `as` to a pointer instead error[E0512]: cannot transmute between types of different sizes, or dependently-sized types @@ -42,7 +42,7 @@ error[E0591]: can't transmute zero-sized type LL | mem::transmute::<_, *mut ()>(foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} + = note: source type: unsafe fn() -> (i8, *const (), Option) {foo} = note: target type: *mut () = help: cast with `as` to a pointer instead @@ -62,7 +62,7 @@ error[E0591]: can't transmute zero-sized type LL | mem::transmute::<_, *mut ()>(Some(foo)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: source type: unsafe fn() -> (i8, *const (), std::option::Option) {foo} + = note: source type: unsafe fn() -> (i8, *const (), Option) {foo} = note: target type: *mut () = help: cast with `as` to a pointer instead @@ -83,7 +83,7 @@ LL | mem::transmute::<_, Option>(Some(baz)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: source type: unsafe fn() {baz} - = note: target type: std::option::Option + = note: target type: Option = help: cast with `as` to a pointer instead error: aborting due to 9 previous errors diff --git a/src/test/ui/transmute/transmute-type-parameters.stderr b/src/test/ui/transmute/transmute-type-parameters.stderr index a355a1bf318..220b929d4fd 100644 --- a/src/test/ui/transmute/transmute-type-parameters.stderr +++ b/src/test/ui/transmute/transmute-type-parameters.stderr @@ -49,7 +49,7 @@ error[E0512]: cannot transmute between types of different sizes, or dependently- LL | let _: i32 = transmute(x); | ^^^^^^^^^ | - = note: source type: `std::option::Option` (size can vary because of T) + = note: source type: `Option` (size can vary because of T) = note: target type: `i32` (32 bits) error: aborting due to 6 previous errors diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr index 39f7fb148f0..7bd951febf5 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-copy.stderr @@ -1,4 +1,4 @@ -warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters +warning: Trait bound String: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:5:51 | LL | fn copy_string(t: String) -> String where String: Copy { @@ -6,19 +6,19 @@ LL | fn copy_string(t: String) -> String where String: Copy { | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters +warning: Trait bound String: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:12:56 | LL | fn copy_out_string(t: &String) -> String where String: Copy { | ^^^^ -warning: Trait bound std::string::String: std::marker::Copy does not depend on any type or lifetime parameters +warning: Trait bound String: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:16:55 | LL | fn copy_string_with_param(x: String) where String: Copy { | ^^^^ -warning: Trait bound for<'b> &'b mut i32: std::marker::Copy does not depend on any type or lifetime parameters +warning: Trait bound for<'b> &'b mut i32: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-copy.rs:22:76 | LL | fn copy_mut<'a>(t: &&'a mut i32) -> &'a mut i32 where for<'b> &'b mut i32: Copy { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr index aa5d4fcc724..ff254edbd7b 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-sized.stderr @@ -1,4 +1,4 @@ -warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters +warning: Trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:14:31 | LL | struct S(str, str) where str: Sized; @@ -6,13 +6,13 @@ LL | struct S(str, str) where str: Sized; | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound for<'a> T<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters +warning: Trait bound for<'a> T<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:17:49 | LL | fn unsized_local() where for<'a> T: Sized { | ^^^^^ -warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters +warning: Trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-sized.rs:22:35 | LL | fn return_str() -> str where str: Sized { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr index ffcfbdf54a7..a9905052ffd 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-well-formed.stderr @@ -1,4 +1,4 @@ -warning: Trait bound std::vec::Vec: std::fmt::Debug does not depend on any type or lifetime parameters +warning: Trait bound Vec: Debug does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-well-formed.rs:7:30 | LL | pub fn foo() where Vec: Debug, str: Copy { @@ -6,7 +6,7 @@ LL | pub fn foo() where Vec: Debug, str: Copy { | = note: `#[warn(trivial_bounds)]` on by default -warning: Trait bound str: std::marker::Copy does not depend on any type or lifetime parameters +warning: Trait bound str: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent-well-formed.rs:7:42 | LL | pub fn foo() where Vec: Debug, str: Copy { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr index d863cf62491..38245010c78 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent.stderr @@ -60,31 +60,31 @@ warning: Trait bound &'static str: Foo does not depend on any type or lifetime p LL | fn g() where &'static str: Foo { | ^^^ -warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters +warning: Trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:55:37 | LL | struct TwoStrs(str, str) where str: Sized; | ^^^^^ -warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters +warning: Trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:57:51 | LL | fn unsized_local() where for<'a> Dst: Sized { | ^^^^^ -warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters +warning: Trait bound str: Sized does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:61:35 | LL | fn return_str() -> str where str: Sized { | ^^^^^ -warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters +warning: Trait bound String: Neg does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:65:46 | LL | fn use_op(s: String) -> String where String: ::std::ops::Neg { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters +warning: Trait bound i32: Iterator does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-inconsistent.rs:70:25 | LL | fn use_for() where i32: Iterator { diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr b/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr index e96a2419686..b3ec3cd8d9d 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak-copy.stderr @@ -2,7 +2,7 @@ error[E0507]: cannot move out of `*t` which is behind a shared reference --> $DIR/trivial-bounds-leak-copy.rs:9:5 | LL | *t - | ^^ move occurs because `*t` has type `std::string::String`, which does not implement the `Copy` trait + | ^^ move occurs because `*t` has type `String`, which does not implement the `Copy` trait error: aborting due to previous error diff --git a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr index 4f4695612de..de7a431d6ff 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-leak.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | fn cant_return_str() -> str { | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = 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 diff --git a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr index 3f2162365d9..c685d9e7409 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-lint.stderr @@ -1,4 +1,4 @@ -error: Trait bound i32: std::marker::Copy does not depend on any type or lifetime parameters +error: Trait bound i32: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:5:21 | LL | struct A where i32: Copy; @@ -40,7 +40,7 @@ error: Lifetime bound 'static: 'static does not depend on any type or lifetime p LL | fn global_outlives() where 'static: 'static {} | ^^^^^^^ -error: Trait bound i32: std::marker::Copy does not depend on any type or lifetime parameters +error: Trait bound i32: Copy does not depend on any type or lifetime parameters --> $DIR/trivial-bounds-lint.rs:38:46 | LL | fn mixed_bounds() where i32: X + Copy {} diff --git a/src/test/ui/trivial_casts.rs b/src/test/ui/trivial_casts.rs index dd578e074fd..0a8b9de1de3 100644 --- a/src/test/ui/trivial_casts.rs +++ b/src/test/ui/trivial_casts.rs @@ -43,7 +43,7 @@ pub fn main() { let x: Box<[u32; 3]> = Box::new([42, 43, 44]); let _ = x as Box<[u32]>; - //~^ ERROR trivial cast: `std::boxed::Box<[u32; 3]>` as `std::boxed::Box<[u32]>` + //~^ ERROR trivial cast: `Box<[u32; 3]>` as `Box<[u32]>` let x: Box<[u32; 3]> = Box::new([42, 43, 44]); let _: Box<[u32]> = x; @@ -61,13 +61,13 @@ pub fn main() { let _: *mut dyn Foo = x; let x: Box = Box::new(Bar); - let _ = x as Box; //~ERROR `std::boxed::Box` as `std::boxed::Box` + let _ = x as Box; //~ERROR `Box` as `Box` let x: Box = Box::new(Bar); let _: Box = x; // functions fn baz(_x: i32) {} - let _ = &baz as &dyn Fn(i32); //~ERROR `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)` + let _ = &baz as &dyn Fn(i32); //~ERROR `&fn(i32) {baz}` as `&dyn Fn(i32)` let _: &dyn Fn(i32) = &baz; let x = |_x: i32| {}; let _ = &x as &dyn Fn(i32); //~ERROR trivial cast diff --git a/src/test/ui/trivial_casts.stderr b/src/test/ui/trivial_casts.stderr index 70954f00bad..141703460ba 100644 --- a/src/test/ui/trivial_casts.stderr +++ b/src/test/ui/trivial_casts.stderr @@ -72,7 +72,7 @@ LL | let _ = x as *mut [u32]; | = help: cast can be replaced by coercion; this might require a temporary variable -error: trivial cast: `std::boxed::Box<[u32; 3]>` as `std::boxed::Box<[u32]>` +error: trivial cast: `Box<[u32; 3]>` as `Box<[u32]>` --> $DIR/trivial_casts.rs:45:13 | LL | let _ = x as Box<[u32]>; @@ -112,7 +112,7 @@ LL | let _ = x as *mut dyn Foo; | = help: cast can be replaced by coercion; this might require a temporary variable -error: trivial cast: `std::boxed::Box` as `std::boxed::Box` +error: trivial cast: `Box` as `Box` --> $DIR/trivial_casts.rs:64:13 | LL | let _ = x as Box; @@ -120,7 +120,7 @@ LL | let _ = x as Box; | = help: cast can be replaced by coercion; this might require a temporary variable -error: trivial cast: `&fn(i32) {main::baz}` as `&dyn std::ops::Fn(i32)` +error: trivial cast: `&fn(i32) {baz}` as `&dyn Fn(i32)` --> $DIR/trivial_casts.rs:70:13 | LL | let _ = &baz as &dyn Fn(i32); @@ -128,7 +128,7 @@ LL | let _ = &baz as &dyn Fn(i32); | = help: cast can be replaced by coercion; this might require a temporary variable -error: trivial cast: `&[closure@$DIR/trivial_casts.rs:72:13: 72:25]` as `&dyn std::ops::Fn(i32)` +error: trivial cast: `&[closure@$DIR/trivial_casts.rs:72:13: 72:25]` as `&dyn Fn(i32)` --> $DIR/trivial_casts.rs:73:13 | LL | let _ = &x as &dyn Fn(i32); diff --git a/src/test/ui/try-block/try-block-bad-type.rs b/src/test/ui/try-block/try-block-bad-type.rs index 4dfc8e6a2fc..c338294913f 100644 --- a/src/test/ui/try-block/try-block-bad-type.rs +++ b/src/test/ui/try-block/try-block-bad-type.rs @@ -14,7 +14,7 @@ pub fn main() { let res: Result = try { }; //~ ERROR type mismatch - let res: () = try { }; //~ the trait bound `(): std::ops::Try` is not satisfied + let res: () = try { }; //~ the trait bound `(): Try` is not satisfied - let res: i32 = try { 5 }; //~ ERROR the trait bound `i32: std::ops::Try` is not satisfied + let res: i32 = try { 5 }; //~ ERROR the trait bound `i32: Try` is not satisfied } diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr index 414c3f24d3a..03d5d3661dd 100644 --- a/src/test/ui/try-block/try-block-bad-type.stderr +++ b/src/test/ui/try-block/try-block-bad-type.stderr @@ -2,44 +2,44 @@ error[E0277]: `?` couldn't convert the error to `i32` --> $DIR/try-block-bad-type.rs:7:16 | LL | Err("")?; - | ^ the trait `std::convert::From<&str>` is not implemented for `i32` + | ^ the trait `From<&str>` is not implemented for `i32` | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait = help: the following implementations were found: - > - > - > - > + > + > + > + > and 2 others - = note: required by `std::convert::From::from` + = note: required by `from` -error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == &str` +error[E0271]: type mismatch resolving ` as Try>::Ok == &str` --> $DIR/try-block-bad-type.rs:12:9 | LL | "" | ^^ expected `i32`, found `&str` -error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` +error[E0271]: type mismatch resolving ` as Try>::Ok == ()` --> $DIR/try-block-bad-type.rs:15:39 | LL | let res: Result = try { }; | ^ expected `i32`, found `()` -error[E0277]: the trait bound `(): std::ops::Try` is not satisfied +error[E0277]: the trait bound `(): Try` is not satisfied --> $DIR/try-block-bad-type.rs:17:23 | LL | let res: () = try { }; - | ^^^ the trait `std::ops::Try` is not implemented for `()` + | ^^^ the trait `Try` is not implemented for `()` | - = note: required by `std::ops::Try::from_ok` + = note: required by `from_ok` -error[E0277]: the trait bound `i32: std::ops::Try` is not satisfied +error[E0277]: the trait bound `i32: Try` is not satisfied --> $DIR/try-block-bad-type.rs:19:24 | LL | let res: i32 = try { 5 }; - | ^^^^^ the trait `std::ops::Try` is not implemented for `i32` + | ^^^^^ the trait `Try` is not implemented for `i32` | - = note: required by `std::ops::Try::from_ok` + = note: required by `from_ok` error: aborting due to 5 previous errors diff --git a/src/test/ui/try-block/try-block-in-while.rs b/src/test/ui/try-block/try-block-in-while.rs index 33d27236519..5d8748f1dd3 100644 --- a/src/test/ui/try-block/try-block-in-while.rs +++ b/src/test/ui/try-block/try-block-in-while.rs @@ -4,5 +4,5 @@ fn main() { while try { false } {} - //~^ ERROR the trait bound `bool: std::ops::Try` is not satisfied + //~^ ERROR the trait bound `bool: Try` is not satisfied } diff --git a/src/test/ui/try-block/try-block-in-while.stderr b/src/test/ui/try-block/try-block-in-while.stderr index ac41ddfd8c0..bc0f5bb6505 100644 --- a/src/test/ui/try-block/try-block-in-while.stderr +++ b/src/test/ui/try-block/try-block-in-while.stderr @@ -1,10 +1,10 @@ -error[E0277]: the trait bound `bool: std::ops::Try` is not satisfied +error[E0277]: the trait bound `bool: Try` is not satisfied --> $DIR/try-block-in-while.rs:6:15 | LL | while try { false } {} - | ^^^^^^^^^ the trait `std::ops::Try` is not implemented for `bool` + | ^^^^^^^^^ the trait `Try` is not implemented for `bool` | - = note: required by `std::ops::Try::from_ok` + = note: required by `from_ok` error: aborting due to previous error diff --git a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr index 1f0e09277ba..c092aa26946 100644 --- a/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr +++ b/src/test/ui/try-block/try-block-maybe-bad-lifetime.stderr @@ -14,7 +14,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/try-block-maybe-bad-lifetime.rs:28:24 | LL | let x = String::new(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait ... LL | ::std::mem::drop(x); | - value moved here diff --git a/src/test/ui/try-block/try-block-type-error.stderr b/src/test/ui/try-block/try-block-type-error.stderr index f779121bbc6..df1441c83d4 100644 --- a/src/test/ui/try-block/try-block-type-error.stderr +++ b/src/test/ui/try-block/try-block-type-error.stderr @@ -1,4 +1,4 @@ -error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == {integer}` +error[E0271]: type mismatch resolving ` as Try>::Ok == {integer}` --> $DIR/try-block-type-error.rs:10:9 | LL | 42 @@ -7,7 +7,7 @@ LL | 42 | expected `f32`, found integer | help: use a float literal: `42.0` -error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` +error[E0271]: type mismatch resolving ` as Try>::Ok == ()` --> $DIR/try-block-type-error.rs:16:5 | LL | }; diff --git a/src/test/ui/try-on-option-diagnostics.stderr b/src/test/ui/try-on-option-diagnostics.stderr index c9dc3f1b879..a71ee20aacf 100644 --- a/src/test/ui/try-on-option-diagnostics.stderr +++ b/src/test/ui/try-on-option-diagnostics.stderr @@ -1,4 +1,4 @@ -error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-diagnostics.rs:7:5 | LL | / fn a_function() -> u32 { @@ -9,10 +9,10 @@ LL | | 22 LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `u32` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `u32` + = note: required by `from_error` -error[E0277]: the `?` operator can only be used in a closure that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a closure that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-diagnostics.rs:14:9 | LL | let a_closure = || { @@ -24,10 +24,10 @@ LL | | 22 LL | | }; | |_____- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `{integer}` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `{integer}` + = note: required by `from_error` -error[E0277]: the `?` operator can only be used in a method that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a method that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-diagnostics.rs:26:13 | LL | / fn a_method() { @@ -37,10 +37,10 @@ LL | | x?; LL | | } | |_________- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `()` + = note: required by `from_error` -error[E0277]: the `?` operator can only be used in a trait method that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a trait method that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option-diagnostics.rs:39:13 | LL | / fn a_trait_method() { @@ -50,8 +50,8 @@ LL | | x?; LL | | } | |_________- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `()` + = note: required by `from_error` error: aborting due to 4 previous errors diff --git a/src/test/ui/try-on-option.stderr b/src/test/ui/try-on-option.stderr index 33ca58bf7fe..ecd12c430f1 100644 --- a/src/test/ui/try-on-option.stderr +++ b/src/test/ui/try-on-option.stderr @@ -5,16 +5,16 @@ LL | fn foo() -> Result { | --------------- expected `()` because of this LL | let x: Option = None; LL | x?; - | ^ the trait `std::convert::From` is not implemented for `()` + | ^ the trait `From` is not implemented for `()` | = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait - = note: required by `std::convert::From::from` + = note: required by `from` help: consider converting the `Option` into a `Result` using `Option::ok_or` or `Option::ok_or_else` | LL | x.ok_or_else(|| /* error value */)?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-on-option.rs:13:5 | LL | / fn bar() -> u32 { @@ -25,8 +25,8 @@ LL | | 22 LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `u32` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `u32` + = note: required by `from_error` error: aborting due to 2 previous errors diff --git a/src/test/ui/try-operator-on-main.rs b/src/test/ui/try-operator-on-main.rs index 602c3c5c359..a8a99a150c1 100644 --- a/src/test/ui/try-operator-on-main.rs +++ b/src/test/ui/try-operator-on-main.rs @@ -19,7 +19,7 @@ fn main() { fn try_trait_generic() -> T { // and a non-`Try` object on a `Try` fn. - ()?; //~ ERROR the `?` operator can only be applied to values that implement `std::ops::Try` + ()?; //~ ERROR the `?` operator can only be applied to values that implement `Try` loop {} } diff --git a/src/test/ui/try-operator-on-main.stderr b/src/test/ui/try-operator-on-main.stderr index ecad5a7d11a..f2e17812aed 100644 --- a/src/test/ui/try-operator-on-main.stderr +++ b/src/test/ui/try-operator-on-main.stderr @@ -1,4 +1,4 @@ -error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`) +error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `Try`) --> $DIR/try-operator-on-main.rs:9:5 | LL | / fn main() { @@ -11,35 +11,35 @@ LL | | try_trait_generic::<()>(); LL | | } | |_- this function should return `Result` or `Option` to accept `?` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::from_error` + = help: the trait `Try` is not implemented for `()` + = note: required by `from_error` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/try-operator-on-main.rs:12:5 | LL | ()?; | ^^^ the `?` operator cannot be applied to type `()` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `()` + = note: required by `into_result` -error[E0277]: the trait bound `(): std::ops::Try` is not satisfied +error[E0277]: the trait bound `(): Try` is not satisfied --> $DIR/try-operator-on-main.rs:15:25 | LL | try_trait_generic::<()>(); - | ^^ the trait `std::ops::Try` is not implemented for `()` + | ^^ the trait `Try` is not implemented for `()` ... LL | fn try_trait_generic() -> T { | --- required by this bound in `try_trait_generic` -error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` +error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/try-operator-on-main.rs:22:5 | LL | ()?; | ^^^ the `?` operator cannot be applied to type `()` | - = help: the trait `std::ops::Try` is not implemented for `()` - = note: required by `std::ops::Try::into_result` + = help: the trait `Try` is not implemented for `()` + = note: required by `into_result` error: aborting due to 4 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs index 87b8aaad957..4ac32e8a870 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs @@ -3,7 +3,7 @@ fn main() {} type Underconstrained = impl 'static; -//~^ ERROR `U` doesn't implement `std::fmt::Debug` +//~^ ERROR `U` doesn't implement `Debug` //~^^ ERROR: at least one trait must be specified // not a defining use, because it doesn't define *all* possible generics @@ -12,7 +12,7 @@ fn underconstrained(_: U) -> Underconstrained { } type Underconstrained2 = impl 'static; -//~^ ERROR `V` doesn't implement `std::fmt::Debug` +//~^ ERROR `V` doesn't implement `Debug` //~^^ ERROR: at least one trait must be specified // not a defining use, because it doesn't define *all* possible generics diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr index 28e30cbdd9d..5ff82d4ad25 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr @@ -10,11 +10,11 @@ error: at least one trait must be specified LL | type Underconstrained2 = impl 'static; | ^^^^^^^^^^^^ -error[E0277]: `U` doesn't implement `std::fmt::Debug` +error[E0277]: `U` doesn't implement `Debug` --> $DIR/generic_underconstrained2.rs:5:45 | LL | type Underconstrained = impl 'static; - | ^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | 5u32 | ---- this returned value is of type `u32` @@ -22,14 +22,14 @@ LL | 5u32 = note: the return type of a function must have a statically known size help: consider restricting type parameter `U` | -LL | fn underconstrained(_: U) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^ +LL | fn underconstrained(_: U) -> Underconstrained { + | ^^^^^^^ -error[E0277]: `V` doesn't implement `std::fmt::Debug` +error[E0277]: `V` doesn't implement `Debug` --> $DIR/generic_underconstrained2.rs:14:46 | LL | type Underconstrained2 = impl 'static; - | ^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` + | ^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug` ... LL | 5u32 | ---- this returned value is of type `u32` @@ -37,8 +37,8 @@ LL | 5u32 = note: the return type of a function must have a statically known size help: consider restricting type parameter `V` | -LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { - | ^^^^^^^^^^^^^^^^^ +LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { + | ^^^^^^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr index f8e1e55f23f..9ae14587ea1 100644 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr @@ -1,12 +1,12 @@ -error[E0119]: conflicting implementations of trait `std::ops::FnOnce<()>` for type `&_`: +error[E0119]: conflicting implementations of trait `FnOnce<()>` for type `&_`: --> $DIR/incoherent-assoc-imp-trait.rs:10:1 | LL | impl FnOnce<()> for &F { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: conflicting implementation in crate `core`: - - impl std::ops::FnOnce for &F - where F: std::ops::Fn, F: ?Sized; + - impl FnOnce for &F + where F: Fn, F: ?Sized; error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) --> $DIR/incoherent-assoc-imp-trait.rs:10:6 diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr index 13069126bab..d82050e263e 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr @@ -2,7 +2,7 @@ error: concrete type differs from previous defining opaque type use --> $DIR/issue-52843-closure-constrain.rs:10:16 | LL | let null = || -> Opaque { 0 }; - | ^^^^^^^^^^^^^^^^^^ expected `std::string::String`, got `i32` + | ^^^^^^^^^^^^^^^^^^ expected `String`, got `i32` | note: previous use here --> $DIR/issue-52843-closure-constrain.rs:9:5 diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr index cd637056c94..a8706aa9a24 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | - = note: expected type `std::ops::FnOnce<(&X,)>` - found type `std::ops::FnOnce<(&X,)>` + = note: expected type `FnOnce<(&X,)>` + found type `FnOnce<(&X,)>` error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.stderr index d07f64c3312..9ad181b3684 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63279.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-63279.stderr @@ -1,10 +1,10 @@ -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:8:5: 8:28] as std::ops::FnOnce<()>>::Output == ()` +error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:8:5: 8:28] as FnOnce<()>>::Output == ()` --> $DIR/issue-63279.rs:5:16 | LL | type Closure = impl FnOnce(); | ^^^^^^^^^^^^^ expected opaque type, found `()` | - = note: expected opaque type `impl std::ops::FnOnce<()>` + = note: expected opaque type `impl FnOnce<()>` found unit type `()` = note: the return type of a function must have a statically known size diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr index a6b7e35b488..b438f844516 100644 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr @@ -10,9 +10,9 @@ LL | let _: &'static str = x; | expected due to this | = note: expected reference `&'static str` - found opaque type `impl std::fmt::Debug` + found opaque type `impl Debug` -error[E0605]: non-primitive cast: `impl std::fmt::Debug` as `&'static str` +error[E0605]: non-primitive cast: `impl Debug` as `&'static str` --> $DIR/never_reveal_concrete_type.rs:14:13 | LL | let _ = x as &'static str; diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr index d237cc6238a..67752acb8c9 100644 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr @@ -10,7 +10,7 @@ LL | let _: &str = bomp(); | expected due to this | = note: expected reference `&str` - found opaque type `impl std::fmt::Debug` + found opaque type `impl Debug` error[E0308]: mismatched types --> $DIR/no_revealing_outside_defining_module.rs:19:5 @@ -19,11 +19,11 @@ LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the expected opaque type ... LL | fn bomp() -> boo::Boo { - | -------- expected `impl std::fmt::Debug` because of return type + | -------- expected `impl Debug` because of return type LL | "" | ^^ expected opaque type, found `&str` | - = note: expected opaque type `impl std::fmt::Debug` + = note: expected opaque type `impl Debug` found reference `&'static str` error: aborting due to 2 previous errors diff --git a/src/test/ui/type/type-annotation-needed.stderr b/src/test/ui/type/type-annotation-needed.stderr index 927cc507265..97817a1f9fd 100644 --- a/src/test/ui/type/type-annotation-needed.stderr +++ b/src/test/ui/type/type-annotation-needed.stderr @@ -7,7 +7,7 @@ LL | fn foo>(x: i32) {} LL | foo(42); | ^^^ cannot infer type for type parameter `T` declared on the function `foo` | - = note: cannot satisfy `_: std::convert::Into` + = note: cannot satisfy `_: Into` help: consider specifying the type argument in the function call | LL | foo::(42); diff --git a/src/test/ui/type/type-check-defaults.rs b/src/test/ui/type/type-check-defaults.rs index 5380fae5417..6a0a7ed338a 100644 --- a/src/test/ui/type/type-check-defaults.rs +++ b/src/test/ui/type/type-check-defaults.rs @@ -9,17 +9,17 @@ struct WellFormedNoBounds>(Z); //~^ ERROR a value of type `i32` cannot be built from an iterator over elements of type `i32` struct Bounds(T); -//~^ ERROR the trait bound `std::string::String: std::marker::Copy` is not satisfied [E0277] +//~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] struct WhereClause(T) where T: Copy; -//~^ ERROR the trait bound `std::string::String: std::marker::Copy` is not satisfied [E0277] +//~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] trait TraitBound {} -//~^ ERROR the trait bound `std::string::String: std::marker::Copy` is not satisfied [E0277] +//~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] trait Super { } trait Base: Super { } -//~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied [E0277] +//~^ ERROR the trait bound `T: Copy` is not satisfied [E0277] trait ProjectionPred> where T::Item : Add {} //~^ ERROR cannot add `u8` to `i32` [E0277] diff --git a/src/test/ui/type/type-check-defaults.stderr b/src/test/ui/type/type-check-defaults.stderr index e2729c65e02..fa6f3422410 100644 --- a/src/test/ui/type/type-check-defaults.stderr +++ b/src/test/ui/type/type-check-defaults.stderr @@ -6,7 +6,7 @@ LL | struct Foo>(T, U); LL | struct WellFormed>(Z); | ^ value of type `i32` cannot be built from `std::iter::Iterator` | - = help: the trait `std::iter::FromIterator` is not implemented for `i32` + = help: the trait `FromIterator` is not implemented for `i32` error[E0277]: a value of type `i32` cannot be built from an iterator over elements of type `i32` --> $DIR/type-check-defaults.rs:8:27 @@ -17,47 +17,47 @@ LL | struct Foo>(T, U); LL | struct WellFormedNoBounds>(Z); | ^ value of type `i32` cannot be built from `std::iter::Iterator` | - = help: the trait `std::iter::FromIterator` is not implemented for `i32` + = help: the trait `FromIterator` is not implemented for `i32` -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/type-check-defaults.rs:11:17 | LL | struct Bounds(T); | ----------------^^^^------------ | | | - | | the trait `std::marker::Copy` is not implemented for `std::string::String` + | | the trait `Copy` is not implemented for `String` | required by `Bounds` -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/type-check-defaults.rs:14:42 | LL | struct WhereClause(T) where T: Copy; | -----------------------------------------^^^^- | | | - | | the trait `std::marker::Copy` is not implemented for `std::string::String` + | | the trait `Copy` is not implemented for `String` | required by `WhereClause` -error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/type-check-defaults.rs:17:20 | LL | trait TraitBound {} | -------------------^^^^-------- | | | - | | the trait `std::marker::Copy` is not implemented for `std::string::String` + | | the trait `Copy` is not implemented for `String` | required by `TraitBound` -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/type-check-defaults.rs:21:25 | LL | trait Super { } | ---- required by this bound in `Super` LL | trait Base: Super { } - | ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider further restricting type parameter `T` | -LL | trait Base: Super, T: std::marker::Copy { } - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | trait Base: Super, T: Copy { } + | ^^^^^^^^^ error[E0277]: cannot add `u8` to `i32` --> $DIR/type-check-defaults.rs:24:66 @@ -68,7 +68,7 @@ LL | trait ProjectionPred> where T::Item : Add {} | | no implementation for `i32 + u8` | required by `ProjectionPred` | - = help: the trait `std::ops::Add` is not implemented for `i32` + = help: the trait `Add` is not implemented for `i32` error: aborting due to 7 previous errors diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr index 8162fed2cd8..729a8c63b62 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_vec.stderr @@ -1,10 +1,10 @@ -error[E0282]: type annotations needed for `std::vec::Vec` +error[E0282]: type annotations needed for `Vec` --> $DIR/cannot_infer_local_or_vec.rs:2:13 | LL | let x = vec![]; | - ^^^^^^ cannot infer type for type parameter `T` | | - | consider giving `x` the explicit type `std::vec::Vec`, where the type parameter `T` is specified + | consider giving `x` the explicit type `Vec`, where the type parameter `T` is specified | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr index e62565c8f9b..e24593a89b3 100644 --- a/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr +++ b/src/test/ui/type/type-check/cannot_infer_local_or_vec_in_tuples.stderr @@ -1,10 +1,10 @@ -error[E0282]: type annotations needed for `(std::vec::Vec,)` +error[E0282]: type annotations needed for `(Vec,)` --> $DIR/cannot_infer_local_or_vec_in_tuples.rs:2:18 | LL | let (x, ) = (vec![], ); | ----- ^^^^^^ cannot infer type for type parameter `T` | | - | consider giving this pattern the explicit type `(std::vec::Vec,)`, where the type parameter `T` is specified + | consider giving this pattern the explicit type `(Vec,)`, where the type parameter `T` is specified | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/type/type-mismatch-same-crate-name.rs b/src/test/ui/type/type-mismatch-same-crate-name.rs index eeda5460ac3..c9cdc874c02 100644 --- a/src/test/ui/type/type-mismatch-same-crate-name.rs +++ b/src/test/ui/type/type-mismatch-same-crate-name.rs @@ -21,7 +21,7 @@ fn main() { //~^ ERROR mismatched types //~| perhaps two different versions of crate `crate_a1` //~| expected trait `main::a::Bar` - //~| expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>` - //~| found struct `std::boxed::Box` + //~| expected struct `Box<(dyn main::a::Bar + 'static)>` + //~| found struct `Box` } } diff --git a/src/test/ui/type/type-mismatch-same-crate-name.stderr b/src/test/ui/type/type-mismatch-same-crate-name.stderr index be5406696b7..49d40ebed13 100644 --- a/src/test/ui/type/type-mismatch-same-crate-name.stderr +++ b/src/test/ui/type/type-mismatch-same-crate-name.stderr @@ -12,8 +12,8 @@ error[E0308]: mismatched types LL | a::try_bar(bar2); | ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar` | - = note: expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>` - found struct `std::boxed::Box` + = note: expected struct `Box<(dyn main::a::Bar + 'static)>` + found struct `Box` = note: perhaps two different versions of crate `crate_a1` are being used? error: aborting due to 2 previous errors diff --git a/src/test/ui/type_length_limit.stderr b/src/test/ui/type_length_limit.stderr index 0d90f06076a..f12f259d2f6 100644 --- a/src/test/ui/type_length_limit.stderr +++ b/src/test/ui/type_length_limit.stderr @@ -1,4 +1,4 @@ -error: reached the type-length limit while instantiating `std::mem::drop::>` +error: reached the type-length limit while instantiating `std::mem::drop::>` --> $SRC_DIR/core/src/mem/mod.rs:LL:COL | LL | pub fn drop(_x: T) {} diff --git a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr index a656b20c23e..b4d7dfe06be 100644 --- a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr +++ b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr @@ -4,10 +4,10 @@ error[E0308]: mismatched types LL | fn ice(x: Box>) { | - possibly return type missing here? LL | *x - | ^^ expected `()`, found trait object `dyn std::iter::Iterator` + | ^^ expected `()`, found trait object `dyn Iterator` | = note: expected unit type `()` - found trait object `(dyn std::iter::Iterator + 'static)` + found trait object `(dyn Iterator + 'static)` error: aborting due to previous error diff --git a/src/test/ui/typeck/issue-67971.stderr b/src/test/ui/typeck/issue-67971.stderr index 36ad3fcb342..5d07f9cc748 100644 --- a/src/test/ui/typeck/issue-67971.stderr +++ b/src/test/ui/typeck/issue-67971.stderr @@ -8,7 +8,7 @@ error[E0308]: mismatched types --> $DIR/issue-67971.rs:3:24 | LL | fn foo(ctx: &mut S) -> String { - | --- ^^^^^^ expected struct `std::string::String`, found `()` + | --- ^^^^^^ expected struct `String`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed index dd1195b99f6..a9107f99873 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed +++ b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.fixed @@ -7,7 +7,7 @@ trait Trait { type AssocType; fn dummy(&self) { } } -fn bar() where ::AssocType: std::marker::Send { +fn bar() where ::AssocType: Send { is_send::(); //~ ERROR E0277 } diff --git a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr index f97d41637ba..17ad0172941 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-assoc-type.stderr @@ -7,11 +7,11 @@ LL | is_send::(); LL | fn is_send() { | ---- required by this bound in `is_send` | - = help: the trait `std::marker::Send` is not implemented for `::AssocType` + = help: the trait `Send` is not implemented for `::AssocType` help: consider further restricting the associated type | -LL | fn bar() where ::AssocType: std::marker::Send { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bar() where ::AssocType: Send { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr index a54826787da..90ab5be016c 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-cross-crate-coherence.stderr @@ -20,7 +20,7 @@ LL | impl !DefaultedTrait for (B,) { } | = note: define and implement a trait or new type instead -error[E0321]: cross-crate traits with a default impl, like `lib::DefaultedTrait`, can only be implemented for a struct/enum type defined in the current crate +error[E0321]: cross-crate traits with a default impl, like `DefaultedTrait`, can only be implemented for a struct/enum type defined in the current crate --> $DIR/typeck-default-trait-impl-cross-crate-coherence.rs:20:1 | LL | impl DefaultedTrait for Box { } @@ -32,7 +32,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar LL | impl DefaultedTrait for lib::Something { } | ^^^^^^^^^^^^^^^^^^^^^^^^----------------- | | | - | | `lib::Something` is not defined in the current crate + | | `Something` is not defined in the current crate | impl doesn't use only types from inside the current crate | = note: define and implement a trait or new type instead diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr index b6ab36f5159..e164bb01f70 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-send.stderr @@ -7,7 +7,7 @@ LL | fn is_send() {} LL | is_send::(); | ^^^^^^^^^^^^^ `MyNotSendable` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `MyNotSendable` + = help: the trait `Send` is not implemented for `MyNotSendable` error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs index 2734b761e61..b9042188ada 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.rs @@ -34,7 +34,7 @@ fn main() { //~^ ERROR `MyNotSync` cannot be shared between threads safely [E0277] is_sync::(); - //~^ ERROR `std::cell::UnsafeCell` cannot be shared between threads safely [E0277] + //~^ ERROR `UnsafeCell` cannot be shared between threads safely [E0277] is_sync::(); //~^ ERROR `Managed` cannot be shared between threads safely [E0277] diff --git a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr index d671b8eb754..1f21e125970 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr @@ -7,18 +7,18 @@ LL | fn is_sync() {} LL | is_sync::(); | ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `MyNotSync` + = help: the trait `Sync` is not implemented for `MyNotSync` -error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely +error[E0277]: `UnsafeCell` cannot be shared between threads safely --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:5 | LL | fn is_sync() {} | ---- required by this bound in `is_sync` ... LL | is_sync::(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely + | ^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell` cannot be shared between threads safely | - = help: within `MyTypeWUnsafe`, the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` + = help: within `MyTypeWUnsafe`, the trait `Sync` is not implemented for `UnsafeCell` = note: required because it appears within the type `MyTypeWUnsafe` error[E0277]: `Managed` cannot be shared between threads safely @@ -30,7 +30,7 @@ LL | fn is_sync() {} LL | is_sync::(); | ^^^^^^^^^^^^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely | - = help: within `MyTypeManaged`, the trait `std::marker::Sync` is not implemented for `Managed` + = help: within `MyTypeManaged`, the trait `Sync` is not implemented for `Managed` = note: required because it appears within the type `MyTypeManaged` error: aborting due to 3 previous errors diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr index 7398b48a238..4fb423b9a2c 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr @@ -9,8 +9,8 @@ LL | fn is_send() { | help: consider restricting type parameter `T` | -LL | fn foo() { - | ^^^^^^^^^^^^^^^^^^^ +LL | fn foo() { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/typeck/typeck-unsafe-always-share.rs b/src/test/ui/typeck/typeck-unsafe-always-share.rs index dc5ddf51563..be87ab17265 100644 --- a/src/test/ui/typeck/typeck-unsafe-always-share.rs +++ b/src/test/ui/typeck/typeck-unsafe-always-share.rs @@ -17,15 +17,15 @@ fn test(s: T) {} fn main() { let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0)}); test(us); - //~^ ERROR `std::cell::UnsafeCell>` cannot be shared between threads safely + //~^ ERROR `UnsafeCell>` cannot be shared between threads safely let uns = UnsafeCell::new(NoSync); test(uns); - //~^ ERROR `std::cell::UnsafeCell` cannot be shared between threads safely [E0277] + //~^ ERROR `UnsafeCell` cannot be shared between threads safely [E0277] let ms = MySync{u: uns}; test(ms); - //~^ ERROR `std::cell::UnsafeCell` cannot be shared between threads safely [E0277] + //~^ ERROR `UnsafeCell` cannot be shared between threads safely [E0277] test(NoSync); //~^ ERROR `NoSync` cannot be shared between threads safely [E0277] diff --git a/src/test/ui/typeck/typeck-unsafe-always-share.stderr b/src/test/ui/typeck/typeck-unsafe-always-share.stderr index 61585fcc1c8..2a6ae736d7a 100644 --- a/src/test/ui/typeck/typeck-unsafe-always-share.stderr +++ b/src/test/ui/typeck/typeck-unsafe-always-share.stderr @@ -1,35 +1,35 @@ -error[E0277]: `std::cell::UnsafeCell>` cannot be shared between threads safely +error[E0277]: `UnsafeCell>` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:19:10 | LL | fn test(s: T) {} | ---- required by this bound in `test` ... LL | test(us); - | ^^ `std::cell::UnsafeCell>` cannot be shared between threads safely + | ^^ `UnsafeCell>` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell>` + = help: the trait `Sync` is not implemented for `UnsafeCell>` -error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely +error[E0277]: `UnsafeCell` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:23:10 | LL | fn test(s: T) {} | ---- required by this bound in `test` ... LL | test(uns); - | ^^^ `std::cell::UnsafeCell` cannot be shared between threads safely + | ^^^ `UnsafeCell` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` + = help: the trait `Sync` is not implemented for `UnsafeCell` -error[E0277]: `std::cell::UnsafeCell` cannot be shared between threads safely +error[E0277]: `UnsafeCell` cannot be shared between threads safely --> $DIR/typeck-unsafe-always-share.rs:27:5 | LL | fn test(s: T) {} | ---- required by this bound in `test` ... LL | test(ms); - | ^^^^ `std::cell::UnsafeCell` cannot be shared between threads safely + | ^^^^ `UnsafeCell` cannot be shared between threads safely | - = help: within `MySync`, the trait `std::marker::Sync` is not implemented for `std::cell::UnsafeCell` + = help: within `MySync`, the trait `Sync` is not implemented for `UnsafeCell` = note: required because it appears within the type `MySync` error[E0277]: `NoSync` cannot be shared between threads safely @@ -41,7 +41,7 @@ LL | fn test(s: T) {} LL | test(NoSync); | ^^^^^^ `NoSync` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `NoSync` + = help: the trait `Sync` is not implemented for `NoSync` error: aborting due to 4 previous errors diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.stderr index 782ff4948cd..48ff1a2c513 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item.stderr +++ b/src/test/ui/typeck/typeck_type_placeholder_item.stderr @@ -585,7 +585,7 @@ LL | fn clone(&self) -> _ { FnTest9 } | ^ | | | not allowed in type signatures - | help: replace with the correct return type: `main::FnTest9` + | help: replace with the correct return type: `FnTest9` error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item.rs:201:14 diff --git a/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr b/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr index e3bc059d1f1..88133814d29 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr +++ b/src/test/ui/typeck/typeck_type_placeholder_item_help.stderr @@ -5,7 +5,7 @@ LL | fn test1() -> _ { Some(42) } | ^ | | | not allowed in type signatures - | help: replace with the correct return type: `std::option::Option` + | help: replace with the correct return type: `Option` error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item_help.rs:7:14 @@ -23,7 +23,7 @@ LL | const TEST3: _ = Some(42); | ^ | | | not allowed in type signatures - | help: replace `_` with the correct type: `std::option::Option` + | help: replace `_` with the correct type: `Option` error[E0121]: the type placeholder `_` is not allowed within types on item signatures --> $DIR/typeck_type_placeholder_item_help.rs:14:18 diff --git a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr index 59f699b7024..9e710c15fdb 100644 --- a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr +++ b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr @@ -4,7 +4,7 @@ error[E0277]: cannot add `u32` to `i32` LL | >::add(1, 2); | ^^^^^^^^^^^^^^^^^^^^^^ no implementation for `i32 + u32` | - = help: the trait `std::ops::Add` is not implemented for `i32` + = help: the trait `Add` is not implemented for `i32` error[E0308]: mismatched types --> $DIR/ufcs-qpath-self-mismatch.rs:6:28 diff --git a/src/test/ui/unboxed-closures/issue-30906.stderr b/src/test/ui/unboxed-closures/issue-30906.stderr index 5c3a1154e74..5f343ff74a1 100644 --- a/src/test/ui/unboxed-closures/issue-30906.stderr +++ b/src/test/ui/unboxed-closures/issue-30906.stderr @@ -4,8 +4,8 @@ error[E0308]: mismatched types LL | test(Compose(f, |_| {})); | ^^^^ one type is more general than the other | - = note: expected type `std::ops::FnOnce<(&'x str,)>` - found type `std::ops::FnOnce<(&str,)>` + = note: expected type `FnOnce<(&'x str,)>` + found type `FnOnce<(&str,)>` error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr index 58062872aa3..f8c90176ff1 100644 --- a/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closure-illegal-move.stderr @@ -4,7 +4,7 @@ error[E0507]: cannot move out of `x`, a captured variable in an `Fn` closure LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn(|| drop(x)); - | ^ move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `x` has type `Box`, which does not implement the `Copy` trait error[E0507]: cannot move out of `x`, a captured variable in an `FnMut` closure --> $DIR/unboxed-closure-illegal-move.rs:19:35 @@ -12,7 +12,7 @@ error[E0507]: cannot move out of `x`, a captured variable in an `FnMut` closure LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn_mut(|| drop(x)); - | ^ move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `x` has type `Box`, which does not implement the `Copy` trait error[E0507]: cannot move out of `x`, a captured variable in an `Fn` closure --> $DIR/unboxed-closure-illegal-move.rs:28:36 @@ -20,7 +20,7 @@ error[E0507]: cannot move out of `x`, a captured variable in an `Fn` closure LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn(move || drop(x)); - | ^ move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `x` has type `Box`, which does not implement the `Copy` trait error[E0507]: cannot move out of `x`, a captured variable in an `FnMut` closure --> $DIR/unboxed-closure-illegal-move.rs:32:40 @@ -28,7 +28,7 @@ error[E0507]: cannot move out of `x`, a captured variable in an `FnMut` closure LL | let x = Box::new(0); | - captured outer variable LL | let f = to_fn_mut(move || drop(x)); - | ^ move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | ^ move occurs because `x` has type `Box`, which does not implement the `Copy` trait error: aborting due to 4 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr index 0466887e371..94de194705d 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-1.stderr @@ -10,7 +10,7 @@ LL | } | - | | | `factorial` dropped here while still borrowed - | borrow might be used here, when `factorial` is dropped and runs the destructor for type `std::option::Option u32>>` + | borrow might be used here, when `factorial` is dropped and runs the destructor for type `Option u32>>` error[E0506]: cannot assign to `factorial` because it is borrowed --> $DIR/unboxed-closures-failed-recursive-fn-1.rs:20:5 diff --git a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr index 18af3dc640d..de20a38c447 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-failed-recursive-fn-2.stderr @@ -1,8 +1,8 @@ -error[E0282]: type annotations needed for `std::option::Option` +error[E0282]: type annotations needed for `Option` --> $DIR/unboxed-closures-failed-recursive-fn-2.rs:16:32 | LL | let mut closure0 = None; - | ------------ consider giving `closure0` the explicit type `std::option::Option`, with the type parameters specified + | ------------ consider giving `closure0` the explicit type `Option`, with the type parameters specified ... LL | return c(); | ^^^ cannot infer type diff --git a/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr index d427873ebcb..df3563455b6 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `S` +error[E0277]: expected a `Fn<(isize,)>` closure, found `S` --> $DIR/unboxed-closures-fnmut-as-fn.rs:28:21 | LL | fn call_itisize>(f: &F, x: isize) -> isize { @@ -7,7 +7,7 @@ LL | fn call_itisize>(f: &F, x: isize) -> isize { LL | let x = call_it(&S, 22); | ^^ expected an `Fn<(isize,)>` closure, found `S` | - = help: the trait `std::ops::Fn<(isize,)>` is not implemented for `S` + = help: the trait `Fn<(isize,)>` is not implemented for `S` error: aborting due to previous error diff --git a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr index ead42c14889..e97157b8398 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-infer-argument-types-two-region-pointers.nll.stderr @@ -4,7 +4,7 @@ error: lifetime may not live long enough LL | doit(0, &|x, y| { | - - has type `&'1 i32` | | - | has type `&std::cell::Cell<&'2 i32>` + | has type `&Cell<&'2 i32>` LL | x.set(y); | ^^^^^^^^ argument requires that `'1` must outlive `'2` diff --git a/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr index b06f745e7c1..d1f433e92d7 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` +error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` --> $DIR/unboxed-closures-unsafe-extern-fn.rs:20:21 | LL | fn call_it isize>(_: &F, _: isize) -> isize { @@ -7,9 +7,9 @@ LL | fn call_it isize>(_: &F, _: isize) -> isize { LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::Fn<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}` + = help: the trait `for<'r> Fn<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}` -error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` +error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` --> $DIR/unboxed-closures-unsafe-extern-fn.rs:25:25 | LL | fn call_it_mut isize>(_: &mut F, _: isize) -> isize { @@ -18,9 +18,9 @@ LL | fn call_it_mut isize>(_: &mut F, _: isize) -> isize { LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::FnMut<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}` + = help: the trait `for<'r> FnMut<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}` -error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` +error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` --> $DIR/unboxed-closures-unsafe-extern-fn.rs:30:26 | LL | fn call_it_once isize>(_: F, _: isize) -> isize { @@ -29,7 +29,7 @@ LL | fn call_it_once isize>(_: F, _: isize) -> isize { LL | let z = call_it_once(square, 22); | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> unsafe fn(&'r isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::FnOnce<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}` + = help: the trait `for<'r> FnOnce<(&'r isize,)>` is not implemented for `for<'r> unsafe fn(&'r isize) -> isize {square}` error: aborting due to 3 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr b/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr index 8f6945cda80..05b532e983a 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr @@ -1,4 +1,4 @@ -error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` +error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` --> $DIR/unboxed-closures-wrong-abi.rs:20:21 | LL | fn call_it isize>(_: &F, _: isize) -> isize { @@ -7,9 +7,9 @@ LL | fn call_it isize>(_: &F, _: isize) -> isize { LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::Fn<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}` + = help: the trait `for<'r> Fn<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}` -error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` +error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` --> $DIR/unboxed-closures-wrong-abi.rs:25:25 | LL | fn call_it_mut isize>(_: &mut F, _: isize) -> isize { @@ -18,9 +18,9 @@ LL | fn call_it_mut isize>(_: &mut F, _: isize) -> isize { LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::FnMut<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}` + = help: the trait `for<'r> FnMut<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}` -error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` +error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` --> $DIR/unboxed-closures-wrong-abi.rs:30:26 | LL | fn call_it_once isize>(_: F, _: isize) -> isize { @@ -29,7 +29,7 @@ LL | fn call_it_once isize>(_: F, _: isize) -> isize { LL | let z = call_it_once(square, 22); | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'r> extern "C" fn(&'r isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::FnOnce<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}` + = help: the trait `for<'r> FnOnce<(&'r isize,)>` is not implemented for `for<'r> extern "C" fn(&'r isize) -> isize {square}` error: aborting due to 3 previous errors diff --git a/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr b/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr index 93a645b485e..3b88b35d4ba 100644 --- a/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr +++ b/src/test/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: expected a `std::ops::Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` +error[E0277]: expected a `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:21:21 | LL | fn call_it isize>(_: &F, _: isize) -> isize { @@ -7,9 +7,9 @@ LL | fn call_it isize>(_: &F, _: isize) -> isize { LL | let x = call_it(&square, 22); | ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::Fn<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}` + = help: the trait `for<'r> Fn<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}` -error[E0277]: expected a `std::ops::FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` +error[E0277]: expected a `FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:26:25 | LL | fn call_it_mut isize>(_: &mut F, _: isize) -> isize { @@ -18,9 +18,9 @@ LL | fn call_it_mut isize>(_: &mut F, _: isize) -> isize { LL | let y = call_it_mut(&mut square, 22); | ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::FnMut<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}` + = help: the trait `for<'r> FnMut<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}` -error[E0277]: expected a `std::ops::FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` +error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:31:26 | LL | fn call_it_once isize>(_: F, _: isize) -> isize { @@ -29,7 +29,7 @@ LL | fn call_it_once isize>(_: F, _: isize) -> isize { LL | let z = call_it_once(square, 22); | ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}` | - = help: the trait `for<'r> std::ops::FnOnce<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}` + = help: the trait `for<'r> FnOnce<(&'r isize,)>` is not implemented for `unsafe fn(isize) -> isize {square}` error: aborting due to 3 previous errors diff --git a/src/test/ui/union/union-derive-clone.rs b/src/test/ui/union/union-derive-clone.rs index 4a106cc940a..8126980604a 100644 --- a/src/test/ui/union/union-derive-clone.rs +++ b/src/test/ui/union/union-derive-clone.rs @@ -2,7 +2,7 @@ use std::mem::ManuallyDrop; -#[derive(Clone)] //~ ERROR the trait bound `U1: std::marker::Copy` is not satisfied +#[derive(Clone)] //~ ERROR the trait bound `U1: Copy` is not satisfied union U1 { a: u8, } diff --git a/src/test/ui/union/union-derive-clone.stderr b/src/test/ui/union/union-derive-clone.stderr index f02b7605a38..7a59f539c37 100644 --- a/src/test/ui/union/union-derive-clone.stderr +++ b/src/test/ui/union/union-derive-clone.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U1: Copy` is not satisfied --> $DIR/union-derive-clone.rs:5:10 | LL | #[derive(Clone)] - | ^^^^^ the trait `std::marker::Copy` is not implemented for `U1` + | ^^^^^ the trait `Copy` is not implemented for `U1` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | pub struct AssertParamIsCopy { - | ---- required by this bound in `std::clone::AssertParamIsCopy` + | ---- required by this bound in `AssertParamIsCopy` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -18,10 +18,10 @@ LL | union U5 { | ----------- | | | method `clone` not found for this - | doesn't satisfy `U5: std::clone::Clone` + | doesn't satisfy `U5: Clone` ... LL | struct CloneNoCopy; - | ------------------- doesn't satisfy `CloneNoCopy: std::marker::Copy` + | ------------------- doesn't satisfy `CloneNoCopy: Copy` ... LL | let w = u.clone(); | ^^^^^ method not found in `U5` @@ -31,12 +31,12 @@ LL | let w = u.clone(); LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc>` here - | the method is available for `std::rc::Rc>` here + | the method is available for `Arc>` here + | the method is available for `Rc>` here | = note: the method `clone` exists but the following trait bounds were not satisfied: - `CloneNoCopy: std::marker::Copy` - which is required by `U5: std::clone::Clone` + `CloneNoCopy: Copy` + which is required by `U5: Clone` error: aborting due to 2 previous errors diff --git a/src/test/ui/union/union-derive-eq.rs b/src/test/ui/union/union-derive-eq.rs index 698c38fac72..ac5808e4361 100644 --- a/src/test/ui/union/union-derive-eq.rs +++ b/src/test/ui/union/union-derive-eq.rs @@ -12,7 +12,7 @@ struct PartialEqNotEq; #[derive(Eq)] union U2 { - a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied + a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: Eq` is not satisfied } impl PartialEq for U2 { fn eq(&self, rhs: &Self) -> bool { true } } diff --git a/src/test/ui/union/union-derive-eq.stderr b/src/test/ui/union/union-derive-eq.stderr index 4a9b689b441..c4d437c6cdd 100644 --- a/src/test/ui/union/union-derive-eq.stderr +++ b/src/test/ui/union/union-derive-eq.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `PartialEqNotEq: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `PartialEqNotEq: Eq` is not satisfied --> $DIR/union-derive-eq.rs:15:5 | LL | a: PartialEqNotEq, - | ^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `PartialEqNotEq` + | ^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `PartialEqNotEq` | ::: $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub struct AssertParamIsEq { - | -- required by this bound in `std::cmp::AssertParamIsEq` + | -- required by this bound in `AssertParamIsEq` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/src/test/ui/union/union-generic.rs b/src/test/ui/union/union-generic.rs index 4b2ccbdb7b4..ff877892579 100644 --- a/src/test/ui/union/union-generic.rs +++ b/src/test/ui/union/union-generic.rs @@ -6,7 +6,7 @@ union U { fn main() { let u = U { a: Rc::new(0u32) }; - //~^ ERROR the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `Rc: Copy` is not satisfied let u = U::> { a: Default::default() }; - //~^ ERROR the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `Rc: Copy` is not satisfied } diff --git a/src/test/ui/union/union-generic.stderr b/src/test/ui/union/union-generic.stderr index f13b2def6db..c418b27ce65 100644 --- a/src/test/ui/union/union-generic.stderr +++ b/src/test/ui/union/union-generic.stderr @@ -1,20 +1,20 @@ -error[E0277]: the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Rc: Copy` is not satisfied --> $DIR/union-generic.rs:8:13 | LL | union U { | ---------------- required by `U` ... LL | let u = U { a: Rc::new(0u32) }; - | ^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc` + | ^ the trait `Copy` is not implemented for `Rc` -error[E0277]: the trait bound `std::rc::Rc: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `Rc: Copy` is not satisfied --> $DIR/union-generic.rs:10:13 | LL | union U { | ---------------- required by `U` ... LL | let u = U::> { a: Default::default() }; - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::rc::Rc` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc` error: aborting due to 2 previous errors diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index b916bbe8ad1..cebeeb59a78 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/union-sized-field.rs:4:12 | LL | union Foo { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | value: T, | ^ doesn't have a size known at compile-time | @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/union-sized-field.rs:9:12 | LL | struct Foo2 { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | value: T, | ^ doesn't have a size known at compile-time | @@ -40,7 +40,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim --> $DIR/union-sized-field.rs:15:11 | LL | enum Foo3 { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | Value(T), | ^ doesn't have a size known at compile-time | diff --git a/src/test/ui/union/union-unsized.stderr b/src/test/ui/union/union-unsized.stderr index f62a3b4d14b..454580dcbab 100644 --- a/src/test/ui/union/union-unsized.stderr +++ b/src/test/ui/union/union-unsized.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | a: str, | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: no field of a union may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -22,7 +22,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | b: str, | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: no field of a union may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size diff --git a/src/test/ui/unique-object-noncopyable.stderr b/src/test/ui/unique-object-noncopyable.stderr index 5b4c8922997..423350cd936 100644 --- a/src/test/ui/unique-object-noncopyable.stderr +++ b/src/test/ui/unique-object-noncopyable.stderr @@ -1,33 +1,33 @@ -error[E0599]: no method named `clone` found for struct `std::boxed::Box` in the current scope +error[E0599]: no method named `clone` found for struct `Box` in the current scope --> $DIR/unique-object-noncopyable.rs:24:16 | LL | trait Foo { | --------- | | - | doesn't satisfy `dyn Foo: std::clone::Clone` - | doesn't satisfy `dyn Foo: std::marker::Sized` + | doesn't satisfy `dyn Foo: Clone` + | doesn't satisfy `dyn Foo: Sized` ... LL | let _z = y.clone(); - | ^^^^^ method not found in `std::boxed::Box` + | ^^^^^ method not found in `Box` | ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | pub struct Box(Unique); - | ------------------------------------- doesn't satisfy `std::boxed::Box: std::clone::Clone` + | ------------------------------------- doesn't satisfy `Box: Clone` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc>` here - | the method is available for `std::rc::Rc>` here + | the method is available for `Arc>` here + | the method is available for `Rc>` here | = note: the method `clone` exists but the following trait bounds were not satisfied: - `dyn Foo: std::marker::Sized` - which is required by `std::boxed::Box: std::clone::Clone` - `dyn Foo: std::clone::Clone` - which is required by `std::boxed::Box: std::clone::Clone` + `dyn Foo: Sized` + which is required by `Box: Clone` + `dyn Foo: Clone` + which is required by `Box: Clone` error: aborting due to previous error diff --git a/src/test/ui/unique-pinned-nocopy.stderr b/src/test/ui/unique-pinned-nocopy.stderr index ef3dcb478c7..d39db225043 100644 --- a/src/test/ui/unique-pinned-nocopy.stderr +++ b/src/test/ui/unique-pinned-nocopy.stderr @@ -1,31 +1,31 @@ -error[E0599]: no method named `clone` found for struct `std::boxed::Box` in the current scope +error[E0599]: no method named `clone` found for struct `Box` in the current scope --> $DIR/unique-pinned-nocopy.rs:12:16 | LL | struct R { - | -------- doesn't satisfy `R: std::clone::Clone` + | -------- doesn't satisfy `R: Clone` ... LL | let _j = i.clone(); - | ^^^^^ method not found in `std::boxed::Box` + | ^^^^^ method not found in `Box` | ::: $SRC_DIR/alloc/src/boxed.rs:LL:COL | LL | pub struct Box(Unique); - | ------------------------------------- doesn't satisfy `std::boxed::Box: std::clone::Clone` + | ------------------------------------- doesn't satisfy `Box: Clone` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | fn clone(&self) -> Self; | ----- | | - | the method is available for `std::sync::Arc>` here - | the method is available for `std::rc::Rc>` here + | the method is available for `Arc>` here + | the method is available for `Rc>` here | = note: the method `clone` exists but the following trait bounds were not satisfied: - `R: std::clone::Clone` - which is required by `std::boxed::Box: std::clone::Clone` + `R: Clone` + which is required by `Box: Clone` = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `clone`, perhaps you need to implement it: - candidate #1: `std::clone::Clone` + candidate #1: `Clone` error: aborting due to previous error diff --git a/src/test/ui/unsafe/unsafe-subtyping.stderr b/src/test/ui/unsafe/unsafe-subtyping.stderr index 19f5ef463ce..2db7cc31280 100644 --- a/src/test/ui/unsafe/unsafe-subtyping.stderr +++ b/src/test/ui/unsafe/unsafe-subtyping.stderr @@ -2,12 +2,12 @@ error[E0308]: mismatched types --> $DIR/unsafe-subtyping.rs:4:5 | LL | fn foo(x: Option) -> Option { - | ---------------------- expected `std::option::Option` because of return type + | ---------------------- expected `Option` because of return type LL | x | ^ expected unsafe fn, found normal fn | - = note: expected enum `std::option::Option` - found enum `std::option::Option` + = note: expected enum `Option` + found enum `Option` error: aborting due to previous error diff --git a/src/test/ui/unsized-locals/borrow-after-move.stderr b/src/test/ui/unsized-locals/borrow-after-move.stderr index 13f9507d8db..b49c32f5f80 100644 --- a/src/test/ui/unsized-locals/borrow-after-move.stderr +++ b/src/test/ui/unsized-locals/borrow-after-move.stderr @@ -52,7 +52,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/borrow-after-move.rs:39:24 | LL | let x = "hello".to_owned().into_boxed_str(); - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | x.foo(); | - value moved here LL | println!("{}", &x); diff --git a/src/test/ui/unsized-locals/double-move.stderr b/src/test/ui/unsized-locals/double-move.stderr index 5b29314ad55..36fb32ae09c 100644 --- a/src/test/ui/unsized-locals/double-move.stderr +++ b/src/test/ui/unsized-locals/double-move.stderr @@ -22,7 +22,7 @@ error[E0382]: use of moved value: `*x` --> $DIR/double-move.rs:32:18 | LL | let x = "hello".to_owned().into_boxed_str(); - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | drop_unsized(x); | - value moved here LL | let _y = *x; @@ -58,7 +58,7 @@ error[E0382]: use of moved value: `*x` --> $DIR/double-move.rs:51:18 | LL | let x = "hello".to_owned().into_boxed_str(); - | - move occurs because `x` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `x` has type `Box`, which does not implement the `Copy` trait LL | x.foo(); | - value moved here LL | let _y = *x; diff --git a/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr b/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr index 2ed35dc0e2c..46e381611a1 100644 --- a/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr +++ b/src/test/ui/unsized-locals/issue-30276-feature-flagged.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation LL | let _x: fn(_) -> Test = Test; | ^^^^ doesn't have a size known at compile-time | - = help: within `Test`, the trait `std::marker::Sized` is not implemented for `[i32]` + = help: within `Test`, the trait `Sized` is not implemented for `[i32]` = note: required because it appears within the type `Test` = note: the return type of a function must have a statically known size diff --git a/src/test/ui/unsized-locals/issue-30276.stderr b/src/test/ui/unsized-locals/issue-30276.stderr index 461efcf3dbf..e9258a61c32 100644 --- a/src/test/ui/unsized-locals/issue-30276.stderr +++ b/src/test/ui/unsized-locals/issue-30276.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation LL | let _x: fn(_) -> Test = Test; | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[i32]` + = help: the trait `Sized` is not implemented for `[i32]` = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/src/test/ui/unsized-locals/issue-50940-with-feature.stderr b/src/test/ui/unsized-locals/issue-50940-with-feature.stderr index 04a8de1b5dc..dc20b92b423 100644 --- a/src/test/ui/unsized-locals/issue-50940-with-feature.stderr +++ b/src/test/ui/unsized-locals/issue-50940-with-feature.stderr @@ -4,8 +4,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | A as fn(str) -> A; | ^ doesn't have a size known at compile-time | - = help: within `main::A`, the trait `std::marker::Sized` is not implemented for `str` - = note: required because it appears within the type `main::A` + = help: within `A`, the trait `Sized` is not implemented for `str` + = note: required because it appears within the type `A` = note: the return type of a function must have a statically known size error: aborting due to previous error diff --git a/src/test/ui/unsized-locals/issue-50940.stderr b/src/test/ui/unsized-locals/issue-50940.stderr index 8e5f7530827..c602fae883c 100644 --- a/src/test/ui/unsized-locals/issue-50940.stderr +++ b/src/test/ui/unsized-locals/issue-50940.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | A as fn(str) -> A; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/src/test/ui/unsized-locals/unsized-exprs.stderr b/src/test/ui/unsized-locals/unsized-exprs.stderr index 0a9b43dac33..9fb401aec2c 100644 --- a/src/test/ui/unsized-locals/unsized-exprs.stderr +++ b/src/test/ui/unsized-locals/unsized-exprs.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | udrop::<(i32, [u8])>((42, *foo())); | ^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `({integer}, [u8])`, the trait `std::marker::Sized` is not implemented for `[u8]` + = help: within `({integer}, [u8])`, the trait `Sized` is not implemented for `[u8]` = note: required because it appears within the type `({integer}, [u8])` = note: tuples must have a statically known size to be initialized @@ -14,7 +14,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | udrop::>(A { 0: *foo() }); | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `A<[u8]>`, the trait `std::marker::Sized` is not implemented for `[u8]` + = help: within `A<[u8]>`, the trait `Sized` is not implemented for `[u8]` = note: required because it appears within the type `A<[u8]>` = note: structs must have a statically known size to be initialized @@ -24,7 +24,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | udrop::>(A(*foo())); | ^ doesn't have a size known at compile-time | - = help: within `A<[u8]>`, the trait `std::marker::Sized` is not implemented for `[u8]` + = help: within `A<[u8]>`, the trait `Sized` is not implemented for `[u8]` = note: required because it appears within the type `A<[u8]>` = note: the return type of a function must have a statically known size diff --git a/src/test/ui/unsized-locals/unsized-exprs3.stderr b/src/test/ui/unsized-locals/unsized-exprs3.stderr index 11435ec0353..426262e82b7 100644 --- a/src/test/ui/unsized-locals/unsized-exprs3.stderr +++ b/src/test/ui/unsized-locals/unsized-exprs3.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | udrop as fn([u8]); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: all function arguments must have a statically known size = help: unsized locals are gated as an unstable feature diff --git a/src/test/ui/unsized/unsized-bare-typaram.stderr b/src/test/ui/unsized/unsized-bare-typaram.stderr index 19978ae24ca..b2ff3159c95 100644 --- a/src/test/ui/unsized/unsized-bare-typaram.stderr +++ b/src/test/ui/unsized/unsized-bare-typaram.stderr @@ -6,7 +6,7 @@ LL | fn bar() { } LL | fn foo() { bar::() } | - ^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-enum.stderr b/src/test/ui/unsized/unsized-enum.stderr index fdfdb9b4e2a..795c7beab0a 100644 --- a/src/test/ui/unsized/unsized-enum.stderr +++ b/src/test/ui/unsized/unsized-enum.stderr @@ -7,7 +7,7 @@ LL | fn foo1() { not_sized::>() } // Hunky dory. LL | fn foo2() { not_sized::>() } | - ^^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | help: you could relax the implicit `Sized` bound on `U` if it were used through indirection like `&U` or `Box` --> $DIR/unsized-enum.rs:4:10 diff --git a/src/test/ui/unsized/unsized-enum2.stderr b/src/test/ui/unsized/unsized-enum2.stderr index 988c3101676..0a0896638e0 100644 --- a/src/test/ui/unsized/unsized-enum2.stderr +++ b/src/test/ui/unsized/unsized-enum2.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `W` cannot be known at compilation tim --> $DIR/unsized-enum2.rs:23:8 | LL | enum E { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | // parameter LL | VA(W), | ^ doesn't have a size known at compile-time @@ -22,7 +22,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized-enum2.rs:25:11 | LL | enum E { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | VB{x: X}, | ^ doesn't have a size known at compile-time @@ -42,7 +42,7 @@ error[E0277]: the size for values of type `Y` cannot be known at compilation tim --> $DIR/unsized-enum2.rs:27:15 | LL | enum E { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | VC(isize, Y), | ^ doesn't have a size known at compile-time @@ -62,7 +62,7 @@ error[E0277]: the size for values of type `Z` cannot be known at compilation tim --> $DIR/unsized-enum2.rs:29:21 | LL | enum E { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | VD{u: isize, x: Z}, | ^ doesn't have a size known at compile-time @@ -84,7 +84,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | VE([u8]), | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -102,7 +102,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | VF{x: str}, | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -120,7 +120,7 @@ error[E0277]: the size for values of type `[f32]` cannot be known at compilation LL | VG(isize, [f32]), | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[f32]` + = help: the trait `Sized` is not implemented for `[f32]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -138,7 +138,7 @@ error[E0277]: the size for values of type `[u32]` cannot be known at compilation LL | VH{u: isize, x: [u32]}, | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u32]` + = help: the trait `Sized` is not implemented for `[u32]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -156,7 +156,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | VM(dyn Foo), | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -174,7 +174,7 @@ error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known LL | VN{x: dyn Bar}, | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn Bar + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Bar + 'static)` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -192,7 +192,7 @@ error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be kno LL | VO(isize, dyn FooBar), | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn FooBar + 'static)` + = help: the trait `Sized` is not implemented for `(dyn FooBar + 'static)` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -210,7 +210,7 @@ error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be kno LL | VP{u: isize, x: dyn BarFoo}, | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `(dyn BarFoo + 'static)` + = help: the trait `Sized` is not implemented for `(dyn BarFoo + 'static)` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -228,7 +228,7 @@ error[E0277]: the size for values of type `[i8]` cannot be known at compilation LL | VQ(<&'static [i8] as Deref>::Target), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[i8]` + = help: the trait `Sized` is not implemented for `[i8]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -246,7 +246,7 @@ error[E0277]: the size for values of type `[char]` cannot be known at compilatio LL | VR{x: <&'static [char] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[char]` + = help: the trait `Sized` is not implemented for `[char]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -264,7 +264,7 @@ error[E0277]: the size for values of type `[f64]` cannot be known at compilation LL | VS(isize, <&'static [f64] as Deref>::Target), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[f64]` + = help: the trait `Sized` is not implemented for `[f64]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -282,7 +282,7 @@ error[E0277]: the size for values of type `[i32]` cannot be known at compilation LL | VT{u: isize, x: <&'static [i32] as Deref>::Target}, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[i32]` + = help: the trait `Sized` is not implemented for `[i32]` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -300,7 +300,7 @@ error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot b LL | VI(Path1), | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path1`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper1 + 'static)` + = help: within `Path1`, the trait `Sized` is not implemented for `(dyn PathHelper1 + 'static)` = note: required because it appears within the type `Path1` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size @@ -319,7 +319,7 @@ error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot b LL | VJ{x: Path2}, | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path2`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper2 + 'static)` + = help: within `Path2`, the trait `Sized` is not implemented for `(dyn PathHelper2 + 'static)` = note: required because it appears within the type `Path2` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size @@ -338,7 +338,7 @@ error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot b LL | VK(isize, Path3), | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path3`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper3 + 'static)` + = help: within `Path3`, the trait `Sized` is not implemented for `(dyn PathHelper3 + 'static)` = note: required because it appears within the type `Path3` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size @@ -357,7 +357,7 @@ error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot b LL | VL{u: isize, x: Path4}, | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path4`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper4 + 'static)` + = help: within `Path4`, the trait `Sized` is not implemented for `(dyn PathHelper4 + 'static)` = note: required because it appears within the type `Path4` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size diff --git a/src/test/ui/unsized/unsized-fn-param.stderr b/src/test/ui/unsized/unsized-fn-param.stderr index 6b54db7148a..b498259efe7 100644 --- a/src/test/ui/unsized/unsized-fn-param.stderr +++ b/src/test/ui/unsized/unsized-fn-param.stderr @@ -4,8 +4,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | foo11("bar", &"baz"); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` - = note: required for the cast to the object type `dyn std::convert::AsRef` + = help: the trait `Sized` is not implemented for `str` + = note: required for the cast to the object type `dyn AsRef` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-fn-param.rs:13:19 @@ -13,8 +13,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | foo12(&"bar", "baz"); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` - = note: required for the cast to the object type `dyn std::convert::AsRef` + = help: the trait `Sized` is not implemented for `str` + = note: required for the cast to the object type `dyn AsRef` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-fn-param.rs:16:11 @@ -22,8 +22,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | foo21("bar", &"baz"); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` - = note: required for the cast to the object type `dyn std::convert::AsRef` + = help: the trait `Sized` is not implemented for `str` + = note: required for the cast to the object type `dyn AsRef` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-fn-param.rs:18:19 @@ -31,8 +31,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | foo22(&"bar", "baz"); | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` - = note: required for the cast to the object type `dyn std::convert::AsRef` + = help: the trait `Sized` is not implemented for `str` + = note: required for the cast to the object type `dyn AsRef` error: aborting due to 4 previous errors diff --git a/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr b/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr index 50b54593f3a..9efebe3aeff 100644 --- a/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr +++ b/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr @@ -7,7 +7,7 @@ LL | LL | impl S5 { | - ^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box` --> $DIR/unsized-inherent-impl-self-type.rs:5:11 diff --git a/src/test/ui/unsized/unsized-struct.stderr b/src/test/ui/unsized/unsized-struct.stderr index 0c8529bf1a9..e013b8fc69e 100644 --- a/src/test/ui/unsized/unsized-struct.stderr +++ b/src/test/ui/unsized/unsized-struct.stderr @@ -7,7 +7,7 @@ LL | fn foo1() { not_sized::>() } // Hunky dory. LL | fn foo2() { not_sized::>() } | - ^^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/unsized-struct.rs:4:12 @@ -26,7 +26,7 @@ LL | fn is_sized() { } LL | fn bar2() { is_sized::>() } | - ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | = note: required because it appears within the type `Bar` diff --git a/src/test/ui/unsized/unsized-trait-impl-self-type.stderr b/src/test/ui/unsized/unsized-trait-impl-self-type.stderr index 071547c945e..516c750cb34 100644 --- a/src/test/ui/unsized/unsized-trait-impl-self-type.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-self-type.stderr @@ -7,7 +7,7 @@ LL | LL | impl T3 for S5 { | - ^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box` --> $DIR/unsized-trait-impl-self-type.rs:8:11 diff --git a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr index f48d4ef9f14..17fe16ed4fc 100644 --- a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr @@ -7,7 +7,7 @@ LL | trait T2 { LL | impl T2 for S4 { | - ^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | help: consider relaxing the implicit `Sized` restriction | diff --git a/src/test/ui/unsized3.stderr b/src/test/ui/unsized3.stderr index ddddae4eaba..7ed43c38f1d 100644 --- a/src/test/ui/unsized3.stderr +++ b/src/test/ui/unsized3.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized3.rs:7:13 | LL | fn f1(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f2::(x); | ^ doesn't have a size known at compile-time ... @@ -18,7 +18,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized3.rs:18:13 | LL | fn f3(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f4::(x); | ^ doesn't have a size known at compile-time ... @@ -37,7 +37,7 @@ LL | fn f5(x: &Y) {} | - required by this bound in `f5` ... LL | fn f8(x1: &S, x2: &S) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f5(x1); | ^^ doesn't have a size known at compile-time | @@ -51,7 +51,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized3.rs:40:8 | LL | fn f9(x1: Box>) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f5(&(*x1, 34)); | ^^^^^^^^^^ doesn't have a size known at compile-time | @@ -62,7 +62,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized3.rs:45:9 | LL | fn f10(x1: Box>) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f5(&(32, *x1)); | ^^^^^^^^^ doesn't have a size known at compile-time | @@ -77,7 +77,7 @@ LL | fn f5(x: &Y) {} | - required by this bound in `f5` ... LL | fn f10(x1: Box>) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f5(&(32, *x1)); | ^^^^^^^^^^ doesn't have a size known at compile-time | diff --git a/src/test/ui/unsized5.stderr b/src/test/ui/unsized5.stderr index 3fd0b429bec..a7539b0672a 100644 --- a/src/test/ui/unsized5.stderr +++ b/src/test/ui/unsized5.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized5.rs:4:9 | LL | struct S1 { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f1: X, | ^ doesn't have a size known at compile-time | @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized5.rs:10:8 | LL | struct S2 { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | f: isize, LL | g: X, | ^ doesn't have a size known at compile-time @@ -43,7 +43,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t LL | f: str, | ^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `str` + = help: the trait `Sized` is not implemented for `str` = note: only the last field of a struct may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -61,7 +61,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | f: [u8], | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: only the last field of a struct may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -77,7 +77,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized5.rs:25:8 | LL | enum E { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | V1(X, isize), | ^ doesn't have a size known at compile-time | @@ -96,7 +96,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized5.rs:29:12 | LL | enum F { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | V2{f1: X, f: isize}, | ^ doesn't have a size known at compile-time | diff --git a/src/test/ui/unsized6.stderr b/src/test/ui/unsized6.stderr index f045bfe2444..e85b73355e9 100644 --- a/src/test/ui/unsized6.stderr +++ b/src/test/ui/unsized6.stderr @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `Y` cannot be known at compilation tim --> $DIR/unsized6.rs:9:9 | LL | fn f1(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let y: Y; | ^ doesn't have a size known at compile-time @@ -14,7 +14,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:7:12 | LL | fn f1(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let _: W; // <-- this is OK, no bindings created, no initializer. LL | let _: (isize, (X, isize)); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -25,7 +25,7 @@ error[E0277]: the size for values of type `Z` cannot be known at compilation tim --> $DIR/unsized6.rs:11:12 | LL | fn f1(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let y: (isize, (Z, usize)); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -36,7 +36,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:15:9 | LL | fn f2(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let y: X; | ^ doesn't have a size known at compile-time | @@ -47,7 +47,7 @@ error[E0277]: the size for values of type `Y` cannot be known at compilation tim --> $DIR/unsized6.rs:17:12 | LL | fn f2(x: &X) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let y: (isize, (Y, isize)); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time @@ -58,7 +58,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:22:9 | LL | fn f3(x1: Box, x2: Box, x3: Box) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let y: X = *x1; | ^ doesn't have a size known at compile-time | @@ -69,7 +69,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:24:9 | LL | fn f3(x1: Box, x2: Box, x3: Box) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let y = *x2; | ^ doesn't have a size known at compile-time @@ -81,7 +81,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:26:10 | LL | fn f3(x1: Box, x2: Box, x3: Box) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let (y, z) = (*x3, 4); | ^ doesn't have a size known at compile-time @@ -93,7 +93,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:30:9 | LL | fn f4(x1: Box, x2: Box, x3: Box) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` LL | let y: X = *x1; | ^ doesn't have a size known at compile-time | @@ -104,7 +104,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:32:9 | LL | fn f4(x1: Box, x2: Box, x3: Box) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let y = *x2; | ^ doesn't have a size known at compile-time @@ -116,7 +116,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim --> $DIR/unsized6.rs:34:10 | LL | fn f4(x1: Box, x2: Box, x3: Box) { - | - this type parameter needs to be `std::marker::Sized` + | - this type parameter needs to be `Sized` ... LL | let (y, z) = (*x3, 4); | ^ doesn't have a size known at compile-time @@ -130,7 +130,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim LL | fn g1(x: X) {} | - ^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size @@ -144,7 +144,7 @@ error[E0277]: the size for values of type `X` cannot be known at compilation tim LL | fn g2(x: X) {} | - ^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size diff --git a/src/test/ui/unsized7.stderr b/src/test/ui/unsized7.stderr index 7dbddd4ed24..5f9a2604ed5 100644 --- a/src/test/ui/unsized7.stderr +++ b/src/test/ui/unsized7.stderr @@ -7,7 +7,7 @@ LL | trait T1 { LL | impl T1 for S3 { | - ^^^^^ doesn't have a size known at compile-time | | - | this type parameter needs to be `std::marker::Sized` + | this type parameter needs to be `Sized` | help: consider relaxing the implicit `Sized` restriction | diff --git a/src/test/ui/unused/unused-closure.rs b/src/test/ui/unused/unused-closure.rs index 637d8bb43a7..5100636842b 100644 --- a/src/test/ui/unused/unused-closure.rs +++ b/src/test/ui/unused/unused-closure.rs @@ -11,7 +11,7 @@ fn unused() { println!("Hello!"); }; - async {}; //~ ERROR unused implementer of `std::future::Future` that must be used + async {}; //~ ERROR unused implementer of `Future` that must be used || async {}; //~ ERROR unused closure that must be used async || {}; //~ ERROR unused closure that must be used diff --git a/src/test/ui/unused/unused-closure.stderr b/src/test/ui/unused/unused-closure.stderr index 9dc73fb7abe..f8b4cbb02c4 100644 --- a/src/test/ui/unused/unused-closure.stderr +++ b/src/test/ui/unused/unused-closure.stderr @@ -13,7 +13,7 @@ LL | #![deny(unused_must_use)] | ^^^^^^^^^^^^^^^ = note: closures are lazy and do nothing unless called -error: unused implementer of `std::future::Future` that must be used +error: unused implementer of `Future` that must be used --> $DIR/unused-closure.rs:14:5 | LL | async {}; diff --git a/src/test/ui/use/use-after-move-based-on-type.stderr b/src/test/ui/use/use-after-move-based-on-type.stderr index 520f88f55dc..11ce005bb45 100644 --- a/src/test/ui/use/use-after-move-based-on-type.stderr +++ b/src/test/ui/use/use-after-move-based-on-type.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `x` --> $DIR/use-after-move-based-on-type.rs:4:20 | LL | let x = "Hello!".to_string(); - | - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait + | - move occurs because `x` has type `String`, which does not implement the `Copy` trait LL | let _y = x; | - value moved here LL | println!("{}", x); diff --git a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr index e16bca38067..b3266562d14 100644 --- a/src/test/ui/use/use-after-move-implicity-coerced-object.stderr +++ b/src/test/ui/use/use-after-move-implicity-coerced-object.stderr @@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `n` --> $DIR/use-after-move-implicity-coerced-object.rs:28:13 | LL | let n: Box<_> = box Number { n: 42 }; - | - move occurs because `n` has type `std::boxed::Box`, which does not implement the `Copy` trait + | - move occurs because `n` has type `Box`, which does not implement the `Copy` trait LL | let mut l: Box<_> = box List { list: Vec::new() }; LL | l.push(n); | - value moved here diff --git a/src/test/ui/variance/variance-regions-unused-direct.stderr b/src/test/ui/variance/variance-regions-unused-direct.stderr index cf375ccae87..1a600f5b058 100644 --- a/src/test/ui/variance/variance-regions-unused-direct.stderr +++ b/src/test/ui/variance/variance-regions-unused-direct.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct Bivariant<'a>; | ^^ unused parameter | - = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` error[E0392]: parameter `'d` is never used --> $DIR/variance-regions-unused-direct.rs:7:19 @@ -12,7 +12,7 @@ error[E0392]: parameter `'d` is never used LL | struct Struct<'a, 'd> { | ^^ unused parameter | - = help: consider removing `'d`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'d`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-regions-unused-indirect.stderr b/src/test/ui/variance/variance-regions-unused-indirect.stderr index 7c7ba69db21..93710cc133a 100644 --- a/src/test/ui/variance/variance-regions-unused-indirect.stderr +++ b/src/test/ui/variance/variance-regions-unused-indirect.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | enum Foo<'a> { | ^^ unused parameter | - = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` error[E0392]: parameter `'a` is never used --> $DIR/variance-regions-unused-indirect.rs:7:10 @@ -12,7 +12,7 @@ error[E0392]: parameter `'a` is never used LL | enum Bar<'a> { | ^^ unused parameter | - = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-unused-region-param.stderr b/src/test/ui/variance/variance-unused-region-param.stderr index 4cd31358031..7c7ec40ba35 100644 --- a/src/test/ui/variance/variance-unused-region-param.stderr +++ b/src/test/ui/variance/variance-unused-region-param.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `'a` is never used LL | struct SomeStruct<'a> { x: u32 } | ^^ unused parameter | - = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` error[E0392]: parameter `'a` is never used --> $DIR/variance-unused-region-param.rs:4:15 @@ -12,7 +12,7 @@ error[E0392]: parameter `'a` is never used LL | enum SomeEnum<'a> { Nothing } | ^^ unused parameter | - = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 2 previous errors diff --git a/src/test/ui/variance/variance-unused-type-param.stderr b/src/test/ui/variance/variance-unused-type-param.stderr index b648e3c1d5f..a4d636bc03c 100644 --- a/src/test/ui/variance/variance-unused-type-param.stderr +++ b/src/test/ui/variance/variance-unused-type-param.stderr @@ -4,7 +4,7 @@ error[E0392]: parameter `A` is never used LL | struct SomeStruct { x: u32 } | ^ unused parameter | - = help: consider removing `A`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, referring to it in a field, or using a marker such as `PhantomData` error[E0392]: parameter `A` is never used --> $DIR/variance-unused-type-param.rs:9:15 @@ -12,7 +12,7 @@ error[E0392]: parameter `A` is never used LL | enum SomeEnum { Nothing } | ^ unused parameter | - = help: consider removing `A`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `A`, referring to it in a field, or using a marker such as `PhantomData` error[E0392]: parameter `T` is never used --> $DIR/variance-unused-type-param.rs:13:15 @@ -20,7 +20,7 @@ error[E0392]: parameter `T` is never used LL | enum ListCell { | ^ unused parameter | - = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData` + = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` error: aborting due to 3 previous errors diff --git a/src/test/ui/vec/vec-res-add.rs b/src/test/ui/vec/vec-res-add.rs index 4785178fb25..57b552ee558 100644 --- a/src/test/ui/vec/vec-res-add.rs +++ b/src/test/ui/vec/vec-res-add.rs @@ -14,6 +14,6 @@ fn main() { let i = vec![r(0)]; let j = vec![r(1)]; let k = i + j; - //~^ ERROR cannot add `std::vec::Vec` to `std::vec::Vec` + //~^ ERROR cannot add `Vec` to `Vec` println!("{:?}", j); } diff --git a/src/test/ui/vec/vec-res-add.stderr b/src/test/ui/vec/vec-res-add.stderr index 2d41583268c..7511271361d 100644 --- a/src/test/ui/vec/vec-res-add.stderr +++ b/src/test/ui/vec/vec-res-add.stderr @@ -1,10 +1,10 @@ -error[E0369]: cannot add `std::vec::Vec` to `std::vec::Vec` +error[E0369]: cannot add `Vec` to `Vec` --> $DIR/vec-res-add.rs:16:15 | LL | let k = i + j; - | - ^ - std::vec::Vec + | - ^ - Vec | | - | std::vec::Vec + | Vec error: aborting due to previous error diff --git a/src/test/ui/vector-no-ann.stderr b/src/test/ui/vector-no-ann.stderr index 62fc42fbae4..8a7b8d22760 100644 --- a/src/test/ui/vector-no-ann.stderr +++ b/src/test/ui/vector-no-ann.stderr @@ -1,10 +1,10 @@ -error[E0282]: type annotations needed for `std::vec::Vec` +error[E0282]: type annotations needed for `Vec` --> $DIR/vector-no-ann.rs:2:16 | LL | let _foo = Vec::new(); | ---- ^^^^^^^^ cannot infer type for type parameter `T` | | - | consider giving `_foo` the explicit type `std::vec::Vec`, where the type parameter `T` is specified + | consider giving `_foo` the explicit type `Vec`, where the type parameter `T` is specified error: aborting due to previous error diff --git a/src/test/ui/wf/wf-array-elem-sized.stderr b/src/test/ui/wf/wf-array-elem-sized.stderr index fedec1909fd..7f3c58d6bba 100644 --- a/src/test/ui/wf/wf-array-elem-sized.stderr +++ b/src/test/ui/wf/wf-array-elem-sized.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation LL | foo: [[u8]], | ^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` = note: slice and array elements must have `Sized` type error: aborting due to previous error diff --git a/src/test/ui/wf/wf-const-type.stderr b/src/test/ui/wf/wf-const-type.stderr index 1b7f8b6fca1..d2e68548805 100644 --- a/src/test/ui/wf/wf-const-type.stderr +++ b/src/test/ui/wf/wf-const-type.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `NotCopy: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-const-type.rs:10:12 | LL | struct IsCopy { t: T } | ---- required by this bound in `IsCopy` ... LL | const FOO: IsCopy> = IsCopy { t: None }; - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `NotCopy` + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `std::option::Option` + = note: required because of the requirements on the impl of `Copy` for `Option` error: aborting due to previous error diff --git a/src/test/ui/wf/wf-convert-unsafe-trait-obj-box.stderr b/src/test/ui/wf/wf-convert-unsafe-trait-obj-box.stderr index eefb450155c..e707839a97e 100644 --- a/src/test/ui/wf/wf-convert-unsafe-trait-obj-box.stderr +++ b/src/test/ui/wf/wf-convert-unsafe-trait-obj-box.stderr @@ -9,8 +9,8 @@ LL | trait Trait: Sized {} LL | let t_box: Box = Box::new(S); | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::boxed::Box` - = note: required by cast to type `std::boxed::Box` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Box` + = note: required by cast to type `Box` error[E0038]: the trait `Trait` cannot be made into an object --> $DIR/wf-convert-unsafe-trait-obj-box.rs:17:15 @@ -23,8 +23,8 @@ LL | trait Trait: Sized {} LL | takes_box(Box::new(S)); | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::boxed::Box` - = note: required by cast to type `std::boxed::Box<(dyn Trait + 'static)>` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Box` + = note: required by cast to type `Box<(dyn Trait + 'static)>` error[E0038]: the trait `Trait` cannot be made into an object --> $DIR/wf-convert-unsafe-trait-obj-box.rs:15:5 @@ -37,8 +37,8 @@ LL | trait Trait: Sized {} LL | Box::new(S) as Box; | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized>` for `std::boxed::Box` - = note: required by cast to type `std::boxed::Box` + = note: required because of the requirements on the impl of `CoerceUnsized>` for `Box` + = note: required by cast to type `Box` error: aborting due to 3 previous errors diff --git a/src/test/ui/wf/wf-convert-unsafe-trait-obj.stderr b/src/test/ui/wf/wf-convert-unsafe-trait-obj.stderr index 5e645382d1b..08d4808b77d 100644 --- a/src/test/ui/wf/wf-convert-unsafe-trait-obj.stderr +++ b/src/test/ui/wf/wf-convert-unsafe-trait-obj.stderr @@ -9,7 +9,7 @@ LL | trait Trait: Sized {} LL | let t: &dyn Trait = &S; | ^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Trait>` for `&S` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` = note: required by cast to type `&dyn Trait` error[E0038]: the trait `Trait` cannot be made into an object @@ -23,7 +23,7 @@ LL | trait Trait: Sized {} LL | takes_trait(&S); | ^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Trait>` for `&S` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` = note: required by cast to type `&dyn Trait` error[E0038]: the trait `Trait` cannot be made into an object @@ -37,7 +37,7 @@ LL | trait Trait: Sized {} LL | &S as &dyn Trait; | ^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Trait>` for `&S` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` = note: required by cast to type `&dyn Trait` error: aborting due to 3 previous errors diff --git a/src/test/ui/wf/wf-enum-bound.stderr b/src/test/ui/wf/wf-enum-bound.stderr index 962a1b839a7..e7bc8582251 100644 --- a/src/test/ui/wf/wf-enum-bound.stderr +++ b/src/test/ui/wf/wf-enum-bound.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-enum-bound.rs:10:14 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` ... LL | where T: ExtraCopy - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider further restricting type parameter `U` | -LL | where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | where T: ExtraCopy, U: Copy + | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-enum-fields-struct-variant.stderr b/src/test/ui/wf/wf-enum-fields-struct-variant.stderr index 1eb7010c77a..c97ce53885b 100644 --- a/src/test/ui/wf/wf-enum-fields-struct-variant.stderr +++ b/src/test/ui/wf/wf-enum-fields-struct-variant.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `A: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `A: Copy` is not satisfied --> $DIR/wf-enum-fields-struct-variant.rs:13:12 | LL | struct IsCopy { | ---- required by this bound in `IsCopy` ... LL | f: IsCopy - | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `A` + | ^^^^^^^^^ the trait `Copy` is not implemented for `A` | help: consider restricting type parameter `A` | -LL | enum AnotherEnum { - | ^^^^^^^^^^^^^^^^^^^ +LL | enum AnotherEnum { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-enum-fields.stderr b/src/test/ui/wf/wf-enum-fields.stderr index a833eeacbdf..85da1bf5839 100644 --- a/src/test/ui/wf/wf-enum-fields.stderr +++ b/src/test/ui/wf/wf-enum-fields.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `A: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `A: Copy` is not satisfied --> $DIR/wf-enum-fields.rs:12:17 | LL | struct IsCopy { | ---- required by this bound in `IsCopy` ... LL | SomeVariant(IsCopy) - | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `A` + | ^^^^^^^^^ the trait `Copy` is not implemented for `A` | help: consider restricting type parameter `A` | -LL | enum SomeEnum { - | ^^^^^^^^^^^^^^^^^^^ +LL | enum SomeEnum { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-fn-where-clause.stderr b/src/test/ui/wf/wf-fn-where-clause.stderr index 938336d3ace..e7921f3496c 100644 --- a/src/test/ui/wf/wf-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-fn-where-clause.stderr @@ -1,18 +1,18 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-fn-where-clause.rs:8:24 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` LL | LL | fn foo() where T: ExtraCopy - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider further restricting type parameter `U` | -LL | fn foo() where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | fn foo() where T: ExtraCopy, U: Copy + | ^^^^^^^^^ -error[E0277]: the size for values of type `(dyn std::marker::Copy + 'static)` cannot be known at compilation time +error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known at compilation time --> $DIR/wf-fn-where-clause.rs:12:16 | LL | fn bar() where Vec:, {} @@ -21,7 +21,7 @@ LL | fn bar() where Vec:, {} LL | struct Vec { | - required by this bound in `Vec` | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::marker::Copy + 'static)` + = help: the trait `Sized` is not implemented for `(dyn Copy + 'static)` help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/wf-fn-where-clause.rs:16:12 | @@ -30,11 +30,11 @@ LL | struct Vec { LL | t: T, | - ...if indirection was used here: `Box` -error[E0038]: the trait `std::marker::Copy` cannot be made into an object +error[E0038]: the trait `Copy` cannot be made into an object --> $DIR/wf-fn-where-clause.rs:12:16 | LL | fn bar() where Vec:, {} - | ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object + | ^^^^^^^^^^^^^ the trait `Copy` cannot be made into an object | = note: the trait cannot be made into an object because it requires `Self: Sized` diff --git a/src/test/ui/wf/wf-impl-self-type.stderr b/src/test/ui/wf/wf-impl-self-type.stderr index 0c24cafb248..bc30fc90f3a 100644 --- a/src/test/ui/wf/wf-impl-self-type.stderr +++ b/src/test/ui/wf/wf-impl-self-type.stderr @@ -7,9 +7,9 @@ LL | impl Foo for Option<[u8]> {} ::: $SRC_DIR/core/src/option.rs:LL:COL | LL | pub enum Option { - | - required by this bound in `std::option::Option` + | - required by this bound in `Option` | - = help: the trait `std::marker::Sized` is not implemented for `[u8]` + = help: the trait `Sized` is not implemented for `[u8]` error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-arg.stderr b/src/test/ui/wf/wf-in-fn-arg.stderr index 84adf04a68a..d6010d1d79e 100644 --- a/src/test/ui/wf/wf-in-fn-arg.stderr +++ b/src/test/ui/wf/wf-in-fn-arg.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-in-fn-arg.rs:10:14 | LL | struct MustBeCopy { | ---- required by this bound in `MustBeCopy` ... LL | fn bar(_: &MustBeCopy) - | ^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | fn bar(_: &MustBeCopy) - | ^^^^^^^^^^^^^^^^^^^ +LL | fn bar(_: &MustBeCopy) + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-ret.stderr b/src/test/ui/wf/wf-in-fn-ret.stderr index 68ef734be55..c22252657f1 100644 --- a/src/test/ui/wf/wf-in-fn-ret.stderr +++ b/src/test/ui/wf/wf-in-fn-ret.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-in-fn-ret.rs:10:16 | LL | struct MustBeCopy { | ---- required by this bound in `MustBeCopy` ... LL | fn bar() -> MustBeCopy - | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | fn bar() -> MustBeCopy - | ^^^^^^^^^^^^^^^^^^^ +LL | fn bar() -> MustBeCopy + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-type-arg.stderr b/src/test/ui/wf/wf-in-fn-type-arg.stderr index 212c61e1e5e..6d249f5f918 100644 --- a/src/test/ui/wf/wf-in-fn-type-arg.stderr +++ b/src/test/ui/wf/wf-in-fn-type-arg.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-in-fn-type-arg.rs:9:8 | LL | struct MustBeCopy { | ---- required by this bound in `MustBeCopy` ... LL | x: fn(MustBeCopy) - | ^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | struct Bar { - | ^^^^^^^^^^^^^^^^^^^ +LL | struct Bar { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-type-ret.stderr b/src/test/ui/wf/wf-in-fn-type-ret.stderr index 3fb05fe8176..30ff365b116 100644 --- a/src/test/ui/wf/wf-in-fn-type-ret.stderr +++ b/src/test/ui/wf/wf-in-fn-type-ret.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-in-fn-type-ret.rs:9:8 | LL | struct MustBeCopy { | ---- required by this bound in `MustBeCopy` ... LL | x: fn() -> MustBeCopy - | ^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | struct Foo { - | ^^^^^^^^^^^^^^^^^^^ +LL | struct Foo { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-fn-where-clause.stderr b/src/test/ui/wf/wf-in-fn-where-clause.stderr index 41cfb186310..64e9694c0e1 100644 --- a/src/test/ui/wf/wf-in-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-in-fn-where-clause.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-in-fn-where-clause.rs:10:14 | LL | trait MustBeCopy { | ---- required by this bound in `MustBeCopy` ... LL | where T: MustBeCopy - | ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider further restricting type parameter `U` | -LL | where T: MustBeCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | where T: MustBeCopy, U: Copy + | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-in-obj-type-trait.stderr b/src/test/ui/wf/wf-in-obj-type-trait.stderr index 129f9484df2..55ea08ccbe7 100644 --- a/src/test/ui/wf/wf-in-obj-type-trait.stderr +++ b/src/test/ui/wf/wf-in-obj-type-trait.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-in-obj-type-trait.rs:11:8 | LL | struct MustBeCopy { | ---- required by this bound in `MustBeCopy` ... LL | x: dyn Object> - | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | struct Bar { - | ^^^^^^^^^^^^^^^^^^^ +LL | struct Bar { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr b/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr index 1a2a20ec684..7bbdd4bcf24 100644 --- a/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr +++ b/src/test/ui/wf/wf-inherent-impl-method-where-clause.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-inherent-impl-method-where-clause.rs:12:27 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` ... LL | fn foo(self) where T: ExtraCopy - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider restricting type parameter `U` | -LL | impl Foo { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-inherent-impl-where-clause.stderr b/src/test/ui/wf/wf-inherent-impl-where-clause.stderr index ba1d4a036c6..2a44e1cdc71 100644 --- a/src/test/ui/wf/wf-inherent-impl-where-clause.stderr +++ b/src/test/ui/wf/wf-inherent-impl-where-clause.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-inherent-impl-where-clause.rs:11:29 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` ... LL | impl Foo where T: ExtraCopy - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider further restricting type parameter `U` | -LL | impl Foo where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | impl Foo where T: ExtraCopy, U: Copy + | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-static-type.stderr b/src/test/ui/wf/wf-static-type.stderr index 4e78090f998..a98184633b5 100644 --- a/src/test/ui/wf/wf-static-type.stderr +++ b/src/test/ui/wf/wf-static-type.stderr @@ -1,13 +1,13 @@ -error[E0277]: the trait bound `NotCopy: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | struct IsCopy { t: T } | ---- required by this bound in `IsCopy` ... LL | static FOO: IsCopy> = IsCopy { t: None }; - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `NotCopy` + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | - = note: required because of the requirements on the impl of `std::marker::Copy` for `std::option::Option` + = note: required because of the requirements on the impl of `Copy` for `Option` error: aborting due to previous error diff --git a/src/test/ui/wf/wf-struct-bound.stderr b/src/test/ui/wf/wf-struct-bound.stderr index d9d193aa79d..948693ac6f8 100644 --- a/src/test/ui/wf/wf-struct-bound.stderr +++ b/src/test/ui/wf/wf-struct-bound.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-struct-bound.rs:10:14 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` ... LL | where T: ExtraCopy - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider further restricting type parameter `U` | -LL | where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | where T: ExtraCopy, U: Copy + | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-struct-field.stderr b/src/test/ui/wf/wf-struct-field.stderr index d7d0b7a0820..04e62a7fcb7 100644 --- a/src/test/ui/wf/wf-struct-field.stderr +++ b/src/test/ui/wf/wf-struct-field.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `A: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `A: Copy` is not satisfied --> $DIR/wf-struct-field.rs:12:11 | LL | struct IsCopy { | ---- required by this bound in `IsCopy` ... LL | data: IsCopy - | ^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `A` + | ^^^^^^^^^ the trait `Copy` is not implemented for `A` | help: consider restricting type parameter `A` | -LL | struct SomeStruct { - | ^^^^^^^^^^^^^^^^^^^ +LL | struct SomeStruct { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-associated-type-bound.stderr b/src/test/ui/wf/wf-trait-associated-type-bound.stderr index a4ceb41ffa5..166e3626f09 100644 --- a/src/test/ui/wf/wf-trait-associated-type-bound.stderr +++ b/src/test/ui/wf/wf-trait-associated-type-bound.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-trait-associated-type-bound.rs:10:17 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` ... LL | type Type1: ExtraCopy; - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | trait SomeTrait { - | ^^^^^^^^^^^^^^^^^^^ +LL | trait SomeTrait { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-associated-type-trait.stderr b/src/test/ui/wf/wf-trait-associated-type-trait.stderr index e2892e3d248..a139186ebb6 100644 --- a/src/test/ui/wf/wf-trait-associated-type-trait.stderr +++ b/src/test/ui/wf/wf-trait-associated-type-trait.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `::Type1: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `::Type1: Copy` is not satisfied --> $DIR/wf-trait-associated-type-trait.rs:11:5 | LL | struct IsCopy { x: T } | ---- required by this bound in `IsCopy` ... LL | type Type2 = IsCopy; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `::Type1` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `::Type1` | help: consider further restricting the associated type | -LL | trait SomeTrait where ::Type1: std::marker::Copy { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | trait SomeTrait where ::Type1: Copy { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-bound.stderr b/src/test/ui/wf/wf-trait-bound.stderr index 384d668d800..abb97adcfd4 100644 --- a/src/test/ui/wf/wf-trait-bound.stderr +++ b/src/test/ui/wf/wf-trait-bound.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `U: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `U: Copy` is not satisfied --> $DIR/wf-trait-bound.rs:10:14 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` ... LL | where T: ExtraCopy - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `U` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `U` | help: consider further restricting type parameter `U` | -LL | where T: ExtraCopy, U: std::marker::Copy - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | where T: ExtraCopy, U: Copy + | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-default-fn-arg.stderr b/src/test/ui/wf/wf-trait-default-fn-arg.stderr index 23d886e25ff..c3d5d2b9669 100644 --- a/src/test/ui/wf/wf-trait-default-fn-arg.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-arg.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Self: Eq` is not satisfied --> $DIR/wf-trait-default-fn-arg.rs:11:22 | LL | struct Bar { value: Box } | -- required by this bound in `Bar` ... LL | fn bar(&self, x: &Bar) { - | ^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Self` + | ^^^^^^^^^^ the trait `Eq` is not implemented for `Self` | help: consider further restricting `Self` | -LL | fn bar(&self, x: &Bar) where Self: std::cmp::Eq { - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(&self, x: &Bar) where Self: Eq { + | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-default-fn-ret.stderr b/src/test/ui/wf/wf-trait-default-fn-ret.stderr index 02140640172..4382a8fe819 100644 --- a/src/test/ui/wf/wf-trait-default-fn-ret.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-ret.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Self: Eq` is not satisfied --> $DIR/wf-trait-default-fn-ret.rs:11:22 | LL | struct Bar { value: Box } | -- required by this bound in `Bar` ... LL | fn bar(&self) -> Bar { - | ^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Self` + | ^^^^^^^^^ the trait `Eq` is not implemented for `Self` | help: consider further restricting `Self` | -LL | fn bar(&self) -> Bar where Self: std::cmp::Eq { - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(&self) -> Bar where Self: Eq { + | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr b/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr index 3664c8b25aa..16c0424915a 100644 --- a/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-trait-default-fn-where-clause.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Self: Eq` is not satisfied --> $DIR/wf-trait-default-fn-where-clause.rs:11:31 | LL | trait Bar { } | -- required by this bound in `Bar` ... LL | fn bar(&self) where A: Bar { - | ^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Self` + | ^^^^^^^^^ the trait `Eq` is not implemented for `Self` | help: consider further restricting `Self` | -LL | fn bar(&self) where A: Bar, Self: std::cmp::Eq { - | ^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(&self) where A: Bar, Self: Eq { + | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-fn-arg.stderr b/src/test/ui/wf/wf-trait-fn-arg.stderr index b5f5f70ce81..4510f50feea 100644 --- a/src/test/ui/wf/wf-trait-fn-arg.stderr +++ b/src/test/ui/wf/wf-trait-fn-arg.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Self: Eq` is not satisfied --> $DIR/wf-trait-fn-arg.rs:10:22 | LL | struct Bar { value: Box } | -- required by this bound in `Bar` ... LL | fn bar(&self, x: &Bar); - | ^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Self` + | ^^^^^^^^^^ the trait `Eq` is not implemented for `Self` | help: consider further restricting `Self` | -LL | fn bar(&self, x: &Bar) where Self: std::cmp::Eq; - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(&self, x: &Bar) where Self: Eq; + | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-fn-ret.stderr b/src/test/ui/wf/wf-trait-fn-ret.stderr index 5e7d8cbfea6..bd0bbc09a8b 100644 --- a/src/test/ui/wf/wf-trait-fn-ret.stderr +++ b/src/test/ui/wf/wf-trait-fn-ret.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Self: Eq` is not satisfied --> $DIR/wf-trait-fn-ret.rs:10:22 | LL | struct Bar { value: Box } | -- required by this bound in `Bar` ... LL | fn bar(&self) -> &Bar; - | ^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `Self` + | ^^^^^^^^^^ the trait `Eq` is not implemented for `Self` | help: consider further restricting `Self` | -LL | fn bar(&self) -> &Bar where Self: std::cmp::Eq; - | ^^^^^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(&self) -> &Bar where Self: Eq; + | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-fn-where-clause.stderr b/src/test/ui/wf/wf-trait-fn-where-clause.stderr index 2d9ba56c585..62e53188022 100644 --- a/src/test/ui/wf/wf-trait-fn-where-clause.stderr +++ b/src/test/ui/wf/wf-trait-fn-where-clause.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Self: Eq` is not satisfied --> $DIR/wf-trait-fn-where-clause.rs:10:49 | LL | struct Bar { value: Box } | -- required by this bound in `Bar` ... LL | fn bar(&self) where Self: Sized, Bar: Copy; - | ^^^^ the trait `std::cmp::Eq` is not implemented for `Self` + | ^^^^ the trait `Eq` is not implemented for `Self` | help: consider further restricting `Self` | -LL | fn bar(&self) where Self: Sized, Bar: Copy, Self: std::cmp::Eq; - | ^^^^^^^^^^^^^^^^^^^^ +LL | fn bar(&self) where Self: Sized, Bar: Copy, Self: Eq; + | ^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-trait-superbound.stderr b/src/test/ui/wf/wf-trait-superbound.stderr index 7d99b8f5a2a..db337a7c6d0 100644 --- a/src/test/ui/wf/wf-trait-superbound.stderr +++ b/src/test/ui/wf/wf-trait-superbound.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/wf-trait-superbound.rs:9:21 | LL | trait ExtraCopy { } | ---- required by this bound in `ExtraCopy` LL | LL | trait SomeTrait: ExtraCopy { - | ^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | trait SomeTrait: ExtraCopy { - | ^^^^^^^^^^^^^^^^^^^ +LL | trait SomeTrait: ExtraCopy { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr b/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr index 9319e3382c2..d0f43f800fd 100644 --- a/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr +++ b/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr @@ -23,7 +23,7 @@ LL | trait Trait: Sized {} LL | Some(()) => &S, | ^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Trait>` for `&S` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&S` = note: required by cast to type `&dyn Trait` error[E0038]: the trait `Trait` cannot be made into an object @@ -37,7 +37,7 @@ LL | trait Trait: Sized {} LL | let t: &dyn Trait = match opt() { | ^^^^^^^^^^^ the trait `Trait` cannot be made into an object | - = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Trait>` for `&R` + = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Trait>` for `&R` = note: required by cast to type `&dyn Trait` error: aborting due to 3 previous errors diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs index e55316bb92e..0e8bb61a79b 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs @@ -11,7 +11,7 @@ impl Foo { fn fails_copy(self) { require_copy(self.x); - //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `T: Copy` is not satisfied } } diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr index 7e881074702..916c6dc6d53 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:13:22 | LL | fn require_copy(x: T) {} | ---- required by this bound in `require_copy` ... LL | require_copy(self.x); - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl Foo { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs index b628a2ae142..25c46330e4d 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs @@ -16,7 +16,7 @@ impl Foo for Bar { fn fails_copy(self) { require_copy(self.x); - //~^ ERROR the trait bound `T: std::marker::Copy` is not satisfied + //~^ ERROR the trait bound `T: Copy` is not satisfied } } diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr index 3558d779d9d..8814018964a 100644 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr +++ b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied +error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:18:22 | LL | fn require_copy(x: T) {} | ---- required by this bound in `require_copy` ... LL | require_copy(self.x); - | ^^^^^^ the trait `std::marker::Copy` is not implemented for `T` + | ^^^^^^ the trait `Copy` is not implemented for `T` | help: consider restricting type parameter `T` | -LL | impl Foo for Bar { - | ^^^^^^^^^^^^^^^^^^^ +LL | impl Foo for Bar { + | ^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs b/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs index d63f37a7221..a8ae0296407 100644 --- a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs +++ b/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs @@ -16,5 +16,5 @@ impl Foo { fn main() { let x = Foo { value: Bar }; x.equals(&x); - //~^ ERROR `Bar: std::cmp::Eq` is not satisfied + //~^ ERROR `Bar: Eq` is not satisfied } diff --git a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr b/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr index 6fd38728777..d7de83104c1 100644 --- a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr +++ b/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `Bar: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Bar: Eq` is not satisfied --> $DIR/where-clauses-method-unsatisfied.rs:18:14 | LL | x.equals(&x); - | ^^ the trait `std::cmp::Eq` is not implemented for `Bar` + | ^^ the trait `Eq` is not implemented for `Bar` error: aborting due to previous error diff --git a/src/test/ui/where-clauses/where-clauses-unsatisfied.rs b/src/test/ui/where-clauses/where-clauses-unsatisfied.rs index 83620e5cf3a..8b067d30a2a 100644 --- a/src/test/ui/where-clauses/where-clauses-unsatisfied.rs +++ b/src/test/ui/where-clauses/where-clauses-unsatisfied.rs @@ -4,5 +4,5 @@ struct Struct; fn main() { drop(equal(&Struct, &Struct)) - //~^ ERROR the trait bound `Struct: std::cmp::Eq` is not satisfied + //~^ ERROR the trait bound `Struct: Eq` is not satisfied } diff --git a/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr b/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr index e92a8fc83df..9e19b9a3b11 100644 --- a/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr +++ b/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr @@ -1,11 +1,11 @@ -error[E0277]: the trait bound `Struct: std::cmp::Eq` is not satisfied +error[E0277]: the trait bound `Struct: Eq` is not satisfied --> $DIR/where-clauses-unsatisfied.rs:6:10 | LL | fn equal(a: &T, b: &T) -> bool where T : Eq { a == b } | -- required by this bound in `equal` ... LL | drop(equal(&Struct, &Struct)) - | ^^^^^ the trait `std::cmp::Eq` is not implemented for `Struct` + | ^^^^^ the trait `Eq` is not implemented for `Struct` error: aborting due to previous error