pretty: trim paths of unique symbols

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.

This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.

On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.

This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
This commit is contained in:
Dan Aloni 2020-09-02 10:40:56 +03:00
parent 7b2deb5628
commit 07e7823c01
1325 changed files with 4806 additions and 4546 deletions

View File

@ -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)
{

View File

@ -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();

View File

@ -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| {

View File

@ -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);

View File

@ -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!(
"<impl {} for {}>",
trait_ref.print_only_trait_path(),
self_ty
)),
None => Symbol::intern(&format!("<impl {}>", self_ty)),
Some(trait_ref) => with_no_trimmed_paths(|| {
Symbol::intern(&format!(
"<impl {} for {}>",
trait_ref.print_only_trait_path(),
self_ty
))
}),
None => {
with_no_trimmed_paths(|| Symbol::intern(&format!("<impl {}>", self_ty)))
}
});
Ok(path)

View File

@ -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())
}
};

View File

@ -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(

View File

@ -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 {

View File

@ -1255,6 +1255,11 @@ rustc_queries! {
storage(ArenaCacheSelector<'tcx>)
desc { "calculating the visible parent map" }
}
query trimmed_def_paths(_: CrateNum)
-> FxHashMap<DefId, Symbol> {
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" }

View File

@ -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<LocalDefId, FxHashSet<Symbol>>,
pub(crate) glob_map: FxHashMap<LocalDefId, FxHashSet<Symbol>>,
/// 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<Symbol, bool>,

View File

@ -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,

View File

@ -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<bool> = Cell::new(false);
static SHOULD_PREFIX_WITH_CRATE: Cell<bool> = Cell::new(false);
static NO_TRIMMED_PATH: Cell<bool> = Cell::new(false);
static NO_QUERIES: Cell<bool> = Cell::new(false);
}
@ -94,6 +98,18 @@ pub fn with_crate_prefix<F: FnOnce() -> 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<F: FnOnce() -> 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<F: fmt::Write> 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<DefId, Symbol> {
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<DefId>> =
&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 };
}

View File

@ -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))
}
}

View File

@ -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);
}

View File

@ -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))
}};
}

View File

@ -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);

View File

@ -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.
//

View File

@ -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<Config>,
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())
})
})
}

View File

@ -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<SourceFileHashAlgorithm>);
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);

View File

@ -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<usize> = (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],

View File

@ -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 {

View File

@ -22,7 +22,7 @@ impl<T> Key<T> {
use std::thread::__FastLocalKeyInner as Key;
static __KEY: Key<()> = Key::new();
//~^ ERROR `std::cell::UnsafeCell<std::option::Option<()>>` cannot be shared between threads
//~^ ERROR `UnsafeCell<Option<()>>` cannot be shared between threads
//~| ERROR cannot be shared between threads safely [E0277]
fn main() {}

View File

@ -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
}

View File

@ -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
}
}

View File

@ -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::<std::boxed::Box<u32>>::None; // scope 2 at $DIR/basic_assignment.rs:18:36: 18:40
_4 = Option::<Box<u32>>::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

View File

@ -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::<std::boxed::Box<S>>(move _4) -> [return: bb5, unwind: bb7]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12
_3 = std::mem::drop::<Box<S>>(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<S>) {std::mem::drop::<std::boxed::Box<S>>}, val: Value(Scalar(<ZST>)) }

View File

@ -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<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
_2 = const {alloc0: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
// ty::Const
// + ty: &&[(std::option::Option<i32>, &[&str])]
// + val: Value(Scalar(alloc0))

View File

@ -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<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
_2 = const {alloc0: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
// ty::Const
// + ty: &&[(std::option::Option<i32>, &[&str])]
// + val: Value(Scalar(alloc0))

View File

@ -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<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
_2 = const {alloc0: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
// ty::Const
// + ty: &&[(std::option::Option<i32>, &[&u8])]
// + val: Value(Scalar(alloc0))

View File

@ -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<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
_2 = const {alloc0: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
// ty::Const
// + ty: &&[(std::option::Option<i32>, &[&u8])]
// + val: Value(Scalar(alloc0))

View File

@ -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)

View File

@ -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(<ZST>)) }

View File

@ -1,6 +1,6 @@
// MIR for `match_tuple` after SimplifyCfg-initial
fn match_tuple(_1: (u32, bool, std::option::Option<i32>, u32)) -> u32 {
fn match_tuple(_1: (u32, bool, Option<i32>, 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

View File

@ -1,6 +1,6 @@
// MIR for `std::ops::Fn::call` before AddMovesForPackedDrops
fn std::ops::Fn::call(_1: *const fn(), _2: Args) -> <Self as std::ops::FnOnce<Args>>::Output {
fn std::ops::Fn::call(_1: *const fn(), _2: Args) -> <Self as FnOnce<Args>>::Output {
let mut _0: <Self as std::ops::FnOnce<Args>>::Output; // return place in scope 0 at $SRC_DIR/core/src/ops/function.rs:LL:COL
bb0: {

View File

@ -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(<ZST>)) }
@ -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<usize> {std::fmt::Formatter::precision}, val: Value(Scalar(<ZST>)) }

View File

@ -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

View File

@ -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

View File

@ -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<u32>); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
- (*_2) = std::vec::Vec::<u32>::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
- (*_2) = Vec::<u32>::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<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: std::ptr::Unique::<u32> { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL
+ ((*_4).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, 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<u32>
+ // + 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::<std::vec::Vec<u32>>(move (_2.0: std::ptr::Unique<std::vec::Vec<u32>>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
- _3 = alloc::alloc::box_free::<Vec<u32>>(move (_2.0: std::ptr::Unique<std::vec::Vec<u32>>)) -> 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<std::vec::Vec<u32>>) {alloc::alloc::box_free::<std::vec::Vec<u32>>}, val: Value(Scalar(<ZST>)) }

View File

@ -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<u32>); // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
- (*_2) = std::vec::Vec::<u32>::new() -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
- (*_2) = Vec::<u32>::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<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: std::ptr::Unique::<u32> { pointer: {0x4 as *const u32}, _marker: std::marker::PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL
+ ((*_4).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, 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<u32>
+ // + 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::<std::vec::Vec<u32>>(move (_2.0: std::ptr::Unique<std::vec::Vec<u32>>)) -> bb1; // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
- _3 = alloc::alloc::box_free::<Vec<u32>>(move (_2.0: std::ptr::Unique<std::vec::Vec<u32>>)) -> 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<std::vec::Vec<u32>>) {alloc::alloc::box_free::<std::vec::Vec<u32>>}, val: Value(Scalar(<ZST>)) }

View File

@ -12,7 +12,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/inline-specialization.rs:5:9: 5:10
- _1 = <std::vec::Vec<()> as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:5:13: 5:38
- _1 = <Vec<()> 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 {<std::vec::Vec<()> as Foo>::bar}, val: Value(Scalar(<ZST>)) }

View File

@ -1,6 +1,6 @@
// MIR for `b` after Inline
fn b(_1: &mut std::boxed::Box<T>) -> &mut T {
fn b(_1: &mut Box<T>) -> &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

View File

@ -1,6 +1,6 @@
// MIR for `d` after Inline
fn d(_1: &std::boxed::Box<T>) -> &T {
fn d(_1: &Box<T>) -> &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

View File

@ -1,6 +1,6 @@
// MIR for `test` before ElaborateDrops
fn test() -> std::option::Option<std::boxed::Box<u32>> {
fn test() -> Option<Box<u32>> {
let mut _0: std::option::Option<std::boxed::Box<u32>>; // return place in scope 0 at $DIR/issue-62289.rs:8:14: 8:30
let mut _1: std::boxed::Box<u32>; // in scope 0 at $DIR/issue-62289.rs:9:10: 9:21
let mut _2: std::boxed::Box<u32>; // in scope 0 at $DIR/issue-62289.rs:9:10: 9:21
@ -29,8 +29,8 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
_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::<u32>::None; // scope 0 at $DIR/issue-62289.rs:9:15: 9:19
_3 = <std::option::Option<u32> 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::<u32>::None; // scope 0 at $DIR/issue-62289.rs:9:15: 9:19
_3 = <Option<u32> 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<u32>) -> std::result::Result<<std::option::Option<u32> as std::ops::Try>::Ok, <std::option::Option<u32> as std::ops::Try>::Error> {<std::option::Option<u32> as std::ops::Try>::into_result}, val: Value(Scalar(<ZST>)) }
@ -69,7 +69,7 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
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 = <std::option::NoneError as std::convert::From<std::option::NoneError>>::from(move _9) -> [return: bb8, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
_8 = <NoneError as From<NoneError>>::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 {<std::option::NoneError as std::convert::From<std::option::NoneError>>::from}, val: Value(Scalar(<ZST>)) }
@ -81,7 +81,7 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
bb8: {
StorageDead(_9); // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
_0 = <std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error(move _8) -> [return: bb9, unwind: bb3]; // scope 2 at $DIR/issue-62289.rs:9:19: 9:20
_0 = <Option<Box<u32>> 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(<std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::Error) -> std::option::Option<std::boxed::Box<u32>> {<std::option::Option<std::boxed::Box<u32>> as std::ops::Try>::from_error}, val: Value(Scalar(<ZST>)) }
@ -106,7 +106,7 @@ fn test() -> std::option::Option<std::boxed::Box<u32>> {
bb12: {
StorageDead(_2); // scope 0 at $DIR/issue-62289.rs:9:20: 9:21
_0 = std::option::Option::<std::boxed::Box<u32>>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:9:5: 9:22
_0 = Option::<Box<u32>>::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
}

View File

@ -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(<ZST>)) }

View File

@ -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(<ZST>)) }
StorageLive(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_28 = std::intrinsics::transmute::<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>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_28 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }
StorageLive(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_30 = std::intrinsics::transmute::<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>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_30 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }

View File

@ -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(<ZST>)) }
StorageLive(_28); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_28 = std::intrinsics::transmute::<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>>(move _25) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_28 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }
StorageLive(_30); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_30 = std::intrinsics::transmute::<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>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_30 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }

View File

@ -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(<ZST>)) }
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::<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>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_46 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }
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::<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>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_50 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }

View File

@ -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(<ZST>)) }
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::<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>>(move _47) -> bb6; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_46 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }
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::<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>>(move _51) -> bb8; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
_50 = transmute::<for<'r, 's, 't0> 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::<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>>}, val: Value(Scalar(<ZST>)) }
@ -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(<ZST>)) }
@ -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(<ZST>)) }

View File

@ -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

View File

@ -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::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
_2 = Option::<i32>::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

View File

@ -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::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27
_2 = Option::<i32>::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

View File

@ -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::<i32>::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26
_2 = Option::<i32>::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

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
// MIR for `unwrap` after SimplifyCfg-elaborate-drops
fn unwrap(_1: std::option::Option<T>) -> T {
fn unwrap(_1: Option<T>) -> 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>) -> 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(<ZST>)) }

View File

@ -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 = <str as std::string::ToString>::to_string(move _3) -> bb2; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:20: 9:34
_2 = <str as ToString>::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 {<str as std::string::ToString>::to_string}, val: Value(Scalar(<ZST>)) }
@ -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::<std::string::String>(move _2) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/no-spurious-drop-after-call.rs:9:5: 9:35
_1 = std::mem::drop::<String>(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::<std::string::String>}, val: Value(Scalar(<ZST>)) }

View File

@ -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

View File

@ -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 = <Test as std::ops::Drop>::drop(move _2) -> bb1; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
_3 = <Test as Drop>::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) {<Test as std::ops::Drop>::drop}, val: Value(Scalar(<ZST>)) }

View File

@ -1,7 +1,7 @@
- // MIR for `id` before SimplifyArmIdentity
+ // MIR for `id` after SimplifyArmIdentity
fn id(_1: std::option::Option<u8>) -> std::option::Option<u8> {
fn id(_1: Option<u8>) -> Option<u8> {
debug o => _1; // in scope 0 at $DIR/simplify-arm.rs:9:7: 9:8
let mut _0: std::option::Option<u8>; // 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

View File

@ -1,7 +1,7 @@
- // MIR for `id` before SimplifyBranchSame
+ // MIR for `id` after SimplifyBranchSame
fn id(_1: std::option::Option<u8>) -> std::option::Option<u8> {
fn id(_1: Option<u8>) -> Option<u8> {
debug o => _1; // in scope 0 at $DIR/simplify-arm.rs:9:7: 9:8
let mut _0: std::option::Option<u8>; // 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

View File

@ -1,7 +1,7 @@
- // MIR for `map` before SimplifyLocals
+ // MIR for `map` after SimplifyLocals
fn map(_1: std::option::Option<std::boxed::Box<()>>) -> std::option::Option<std::boxed::Box<()>> {
fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
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<std::boxed::Box<()>>; // 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

View File

@ -1,7 +1,7 @@
- // MIR for `map` before SimplifyLocals
+ // MIR for `map` after SimplifyLocals
fn map(_1: std::option::Option<std::boxed::Box<()>>) -> std::option::Option<std::boxed::Box<()>> {
fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
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<std::boxed::Box<()>>; // 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

View File

@ -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<std::ptr::NonNull<Node>>); // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:53
_5 = std::option::Option::<std::ptr::NonNull<Node>>::take(move _6) -> bb4; // scope 1 at $DIR/simplify_try_if_let.rs:26:43: 26:60
_5 = Option::<NonNull<Node>>::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::ptr::NonNull<Node>>) -> std::option::Option<std::ptr::NonNull<Node>> {std::option::Option::<std::ptr::NonNull<Node>>::take}, val: Value(Scalar(<ZST>)) }
@ -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::<Node>::as_mut(move _12) -> bb7; // scope 3 at $DIR/simplify_try_if_let.rs:28:25: 28:38
_11 = NonNull::<Node>::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<Node>) -> &'r mut Node {std::ptr::NonNull::<Node>::as_mut}, val: Value(Scalar(<ZST>)) }

View File

@ -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(_);
}

View File

@ -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

View File

@ -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

View File

@ -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::<i32>::Some(move _5); // scope 1 at $DIR/storage_ranges.rs:6:18: 6:25
_4 = Option::<i32>::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

View File

@ -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::<i32>::new();
}

View File

@ -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<i32>) -> () {
fn drop_in_place(_1: *mut Vec<i32>) -> () {
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<i32>; // 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<i32>) -> () {
bb7: {
_2 = &mut (*_1); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
_3 = <std::vec::Vec<i32> as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
_3 = <Vec<i32> 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<i32>) {<std::vec::Vec<i32> as std::ops::Drop>::drop}, val: Value(Scalar(<ZST>)) }

View File

@ -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<i32>) -> () {
fn drop_in_place(_1: *mut Vec<i32>) -> () {
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<i32>; // 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<i32>) -> () {
bb7: {
_2 = &mut (*_1); // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
_3 = <std::vec::Vec<i32> as std::ops::Drop>::drop(move _2) -> [return: bb6, unwind: bb5]; // scope 0 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
_3 = <Vec<i32> 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<i32>) {<std::vec::Vec<i32> as std::ops::Drop>::drop}, val: Value(Scalar(<ZST>)) }

View File

@ -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 {

View File

@ -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\`"

View File

@ -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

View File

@ -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

View File

@ -5,7 +5,7 @@ LL | match *s { S(v) => v }
| ^^ -
| | |
| | data moved here
| | move occurs because `v` has type `std::vec::Vec<isize>`, which does not implement the `Copy` trait
| | move occurs because `v` has type `Vec<isize>`, which does not implement the `Copy` trait
| help: consider borrowing here: `&*s`
error: aborting due to previous error

View File

@ -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)

View File

@ -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>(_: F) where F: Fn(&(), Box<dyn Fn(&())>) {}
| ------------------------- 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>(_: F) where F: for<'s> Fn(&'s (), Box<dyn Fn(&())>) {}
| ------------------------------------ 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>(_: F) where F: Fn(&(), Box<dyn Fn(&())>, &(), 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>(_: F) where F: for<'t0> Fn(&(), Box<dyn Fn(&())>, &'t0 (), fn(&(), &())) {}
| --------------------------------------------------------- required by this bound in `h2`

View File

@ -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`
_ => { }
};

View File

@ -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

View File

@ -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

View File

@ -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<i32>` for inline assembly
//~^ ERROR cannot use value of type `Vec<i32>` 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]);

View File

@ -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<i32>` for inline assembly
error: cannot use value of type `Vec<i32>` for inline assembly
--> $DIR/type-check-2.rs:80:28
|
LL | asm!("{}", in(reg) vec![0]);

View File

@ -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);

View File

@ -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());

View File

@ -24,7 +24,7 @@ impl Bar for AssocNoCopy { type Assoc = String; }
impl Thing for AssocNoCopy {
type Out = Box<dyn Bar<Assoc: Copy>>;
//~^ 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)

View File

@ -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<dyn Bar<Assoc: Copy>>;
| ^^^^^^^^^^^ 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

View File

@ -1,5 +1,3 @@
// ignore-tidy-linelength
// NOTE: rustc cannot currently handle bounds of the form `for<'a> <Foo as Bar<'a>>::Assoc: Baz`.
// This should hopefully be fixed with Chalk.
@ -29,15 +27,15 @@ trait Case1 {
pub struct S1;
impl Case1 for S1 {
//~^ ERROR `<L1 as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug` [E0277]
//~^ ERROR `<L1 as Lam<&'a u8>>::App` doesn't implement `Debug` [E0277]
type C = Once<Once<L1>>;
}
fn assume_case1<T: Case1>() {
//~^ ERROR `<_ as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug` [E0277]
//~| ERROR `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator [E0277]
//~| ERROR `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely [E0277]
//~| ERROR `<<T as Case1>::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 `<<T as Case1>::C as Iterator>::Item` is not an iterator [E0277]
//~| ERROR `<<T as Case1>::C as Iterator>::Item` cannot be sent between threads safely [E0277]
//~| ERROR `<<T as Case1>::C as Iterator>::Item` cannot be shared between threads safely [E0277]
fn assert_a<_0, A>() where A: Iterator<Item = _0>, _0: Debug {}
assert_a::<_, T::A>();

View File

@ -1,5 +1,5 @@
error[E0277]: `<L1 as Lam<&'a u8>>::App` doesn't implement `std::fmt::Debug`
--> $DIR/bad-bounds-on-assoc-in-trait.rs:31:6
error[E0277]: `<L1 as Lam<&'a u8>>::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 {
| ^^^^^ `<L1 as Lam<&'a u8>>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
| ^^^^^ `<L1 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 `<L1 as Lam<&'a u8>>::App`
= help: the trait `for<'a> Debug` is not implemented for `<L1 as Lam<&'a u8>>::App`
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
error[E0277]: `<<T as Case1>::C as Iterator>::Item` is not an iterator
--> $DIR/bad-bounds-on-assoc-in-trait.rs:34:20
|
LL | fn assume_case1<T: Case1>() {
| ^^^^^ `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator
| ^^^^^ `<<T as Case1>::C as Iterator>::Item` is not an iterator
|
= help: the trait `std::iter::Iterator` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
= help: the trait `Iterator` is not implemented for `<<T as Case1>::C as Iterator>::Item`
help: consider further restricting the associated type
|
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as std::iter::Iterator>::Item: std::iter::Iterator {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as Iterator>::Item: Iterator {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
error[E0277]: `<<T as Case1>::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<Item:
| ---- required by this bound in `Case1`
...
LL | fn assume_case1<T: Case1>() {
| ^^^^^ `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be sent between threads safely
| ^^^^^ `<<T as Case1>::C as Iterator>::Item` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
= help: the trait `Send` is not implemented for `<<T as Case1>::C as Iterator>::Item`
help: consider further restricting the associated type
|
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as Iterator>::Item: Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20
error[E0277]: `<<T as Case1>::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<T: Case1>() {
| ^^^^^ `<<T as Case1>::C as std::iter::Iterator>::Item` cannot be shared between threads safely
| ^^^^^ `<<T as Case1>::C as Iterator>::Item` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `<<T as Case1>::C as std::iter::Iterator>::Item`
= help: the trait `Sync` is not implemented for `<<T as Case1>::C as Iterator>::Item`
help: consider further restricting the associated type
|
LL | fn assume_case1<T: Case1>() where <<T as Case1>::C as std::iter::Iterator>::Item: std::marker::Sync {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | fn assume_case1<T: Case1>() where <<T as Case1>::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<T: 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

View File

@ -8,172 +8,172 @@
use std::iter;
struct SI1<T: Iterator<Item: Copy, Item: Send>> { 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<T: Iterator<Item: Copy, Item: Copy>> { 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<T: Iterator<Item: 'static, Item: 'static>> { 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<T> where T: Iterator<Item: Copy, Item: Send> { 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<T> where T: Iterator<Item: Copy, Item: Copy> { 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<T> where T: Iterator<Item: 'static, Item: 'static> { 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<T: Iterator<Item: Copy, Item: Send>> { 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<T: Iterator<Item: Copy, Item: Copy>> { 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<T: Iterator<Item: 'static, Item: 'static>> { 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<T> where T: Iterator<Item: Copy, Item: Send> { 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<T> where T: Iterator<Item: Copy, Item: Copy> { 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<T> where T: Iterator<Item: 'static, Item: 'static> { 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<T: Iterator<Item: Copy, Item: Send>> { 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<T: Iterator<Item: Copy, Item: Copy>> { 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<T: Iterator<Item: 'static, Item: 'static>> { 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<T> where T: Iterator<Item: Copy, Item: Send> { 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<T> where T: Iterator<Item: Copy, Item: Copy> { 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<T> where T: Iterator<Item: 'static, Item: 'static> { 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<T: Iterator<Item: Copy, Item: Send>>() {}
//~^ 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<T: Iterator<Item: Copy, Item: 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]
fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
//~^ 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<T>() where T: Iterator<Item: Copy, Item: Send> {}
//~^ 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<T>() where T: Iterator<Item: Copy, Item: 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]
fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
//~^ 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<Item: Copy, Item: Send> { 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<Item: Copy, Item: Copy> { 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<Item: 'static, Item: 'static> { 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<Item: Copy, Item: Send>) {}
//~^ 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<Item: Copy, Item: 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]
fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
//~^ 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<Item: Copy, Item: Send> = 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<Item: Copy, Item: Copy> = 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<Item: 'static, Item: 'static> = 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<Item: Copy, Item: Send> = 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<Item: Copy, Item: Copy> = 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<Item: 'static, Item: 'static> = 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<Item: Copy, Item: Send> = 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<Item: Copy, Item: Copy> = 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<Item: 'static, Item: 'static> = 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: Iterator<Item: Copy, Item: Send>> = 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: Iterator<Item: Copy, Item: Copy>> = 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: Iterator<Item: 'static, Item: 'static>> = 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<T> where T: Iterator<Item: Copy, Item: Send> = 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<T> where T: Iterator<Item: Copy, Item: Copy> = 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<T> where T: Iterator<Item: 'static, Item: 'static> = 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<T: Iterator<Item: Copy, Item: Send>> = 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<T: Iterator<Item: Copy, Item: Copy>> = 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<T: Iterator<Item: 'static, Item: 'static>> = 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<Item: Copy, Item: Send>;
//~^ 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<Item: Copy, Item: 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
//~| ERROR could not find defining uses
//~| ERROR could not find defining uses
type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
//~^ 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<T: Iterator<Item: Copy, Item: Send>> {}
//~^ 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<T: Iterator<Item: Copy, Item: 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]
trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
//~^ 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<Item: Copy, Item: Send> {}
//~^ 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<Item: Copy, Item: 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]
trait TRS3: Iterator<Item: 'static, Item: 'static> {}
//~^ 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<T> where T: Iterator<Item: Copy, Item: Send> {}
//~^ 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<T> where T: Iterator<Item: Copy, Item: 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]
trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
//~^ 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<Item: Copy, Item: Send> {}
//~^ 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<Item: Copy, Item: 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 `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<Item: 'static, Item: 'static> {}
//~^ 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<Item: Copy, Item: Send>; }
//~^ 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<Item: Copy, Item: 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]
trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
//~^ 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<Item: Copy, Item: Send>;
//~^ 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<dyn Iterator<Item: Copy, Item: 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
//~| ERROR could not find defining uses
type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
//~^ 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

View File

@ -7,7 +7,7 @@ LL | #![feature(impl_trait_in_bindings)]
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/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<T: Iterator<Item: Copy, Item: Send>> { f: T }
@ -15,7 +15,7 @@ LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { 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<T: Iterator<Item: Copy, Item: Copy>> { f: T }
@ -23,7 +23,7 @@ LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { 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<T: Iterator<Item: 'static, Item: 'static>> { f: T }
@ -31,7 +31,7 @@ LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { 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<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
@ -39,7 +39,7 @@ LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { 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<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
@ -47,7 +47,7 @@ LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { 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<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
@ -55,7 +55,7 @@ LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { 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<T: Iterator<Item: Copy, Item: Send>> { V(T) }
@ -63,7 +63,7 @@ LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { 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<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
@ -71,7 +71,7 @@ LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { 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<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
@ -79,7 +79,7 @@ LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { 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<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
@ -87,7 +87,7 @@ LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { 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<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
@ -95,7 +95,7 @@ LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { 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<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
@ -103,7 +103,7 @@ LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { 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<T: Iterator<Item: Copy, Item: Send>> { f: T }
@ -111,7 +111,7 @@ LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { 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<T: Iterator<Item: Copy, Item: Copy>> { f: T }
@ -119,7 +119,7 @@ LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { 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<T: Iterator<Item: 'static, Item: 'static>> { f: T }
@ -127,7 +127,7 @@ LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { 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<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
@ -135,7 +135,7 @@ LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { 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<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
@ -143,7 +143,7 @@ LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { 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<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
@ -151,7 +151,7 @@ LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { 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<T: Iterator<Item: Copy, Item: Send>>() {}
@ -159,7 +159,7 @@ LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| |
| `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<T: Iterator<Item: Copy, Item: Copy>>() {}
@ -167,7 +167,7 @@ LL | fn FI2<T: Iterator<Item: Copy, Item: 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:53:35
|
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
@ -175,7 +175,7 @@ LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| |
| `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<T>() where T: Iterator<Item: Copy, Item: Send> {}
@ -183,7 +183,7 @@ LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
| |
| `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<T>() where T: Iterator<Item: Copy, Item: Copy> {}
@ -191,7 +191,7 @@ LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: 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:59:46
|
LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
@ -199,7 +199,7 @@ LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
| |
| `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<Item: Copy, Item: Send>) {}
@ -207,7 +207,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| |
| `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<Item: Copy, Item: Copy>) {}
@ -215,7 +215,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: 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:72:43
|
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
@ -223,7 +223,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| |
| `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<Item: Copy, Item: Send> = iter::empty();
@ -231,7 +231,7 @@ LL | const CIT1: impl Iterator<Item: Copy, Item: Send> = 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<Item: Copy, Item: Copy> = iter::empty();
@ -239,7 +239,7 @@ LL | const CIT2: impl Iterator<Item: Copy, Item: Copy> = 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<Item: 'static, Item: 'static> = iter::empty();
@ -247,7 +247,7 @@ LL | const CIT3: impl Iterator<Item: 'static, Item: 'static> = 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<Item: Copy, Item: Send> = iter::empty();
@ -255,7 +255,7 @@ LL | static SIT1: impl Iterator<Item: Copy, Item: Send> = 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<Item: Copy, Item: Copy> = iter::empty();
@ -263,7 +263,7 @@ LL | static SIT2: impl Iterator<Item: Copy, Item: Copy> = 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<Item: 'static, Item: 'static> = iter::empty();
@ -271,7 +271,7 @@ LL | static SIT3: impl Iterator<Item: 'static, Item: 'static> = 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<Item: Copy, Item: Send> = iter::empty(); }
@ -279,7 +279,7 @@ LL | fn lit1() { let _: impl Iterator<Item: Copy, Item: Send> = 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<Item: Copy, Item: Copy> = iter::empty(); }
@ -287,7 +287,7 @@ LL | fn lit2() { let _: impl Iterator<Item: Copy, Item: Copy> = 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<Item: 'static, Item: 'static> = iter::empty(); }
@ -295,7 +295,7 @@ LL | fn lit3() { let _: impl Iterator<Item: 'static, Item: 'static> = 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: Iterator<Item: Copy, Item: Send>> = T;
@ -303,7 +303,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = 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: Iterator<Item: Copy, Item: Copy>> = T;
@ -311,7 +311,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = 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: Iterator<Item: 'static, Item: 'static>> = T;
@ -319,7 +319,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = 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<T> where T: Iterator<Item: Copy, Item: Send> = T;
@ -327,7 +327,7 @@ LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = 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<T> where T: Iterator<Item: Copy, Item: Copy> = T;
@ -335,7 +335,7 @@ LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = 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<T> where T: Iterator<Item: 'static, Item: 'static> = T;
@ -343,7 +343,7 @@ LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = 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<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
@ -351,7 +351,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = 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<Item: Copy, Item: Send> { iter::empty() }
@ -359,7 +359,7 @@ LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { 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<Item: Copy, Item: Copy> { iter::empty() }
@ -367,7 +367,7 @@ LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { 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<Item: 'static, Item: 'static> { iter::empty() }
@ -381,7 +381,7 @@ error: could not find defining uses
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = 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<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
@ -395,7 +395,7 @@ error: could not find defining uses
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = 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<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
@ -415,7 +415,7 @@ error: could not find defining uses
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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<Item: Copy, Item: Send>;
@ -429,7 +429,7 @@ error: could not find defining uses
LL | type ETAI5 = impl Iterator<Item: Copy, Item: 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:122:40
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
@ -443,7 +443,7 @@ error: could not find defining uses
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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<Item: 'static, Item: 'static>;
@ -451,7 +451,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| |
| `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<T: Iterator<Item: Copy, Item: Send>> {}
@ -459,7 +459,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| |
| `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<T: Iterator<Item: Copy, Item: Copy>> {}
@ -467,7 +467,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: 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:137:39
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
@ -475,7 +475,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| |
| `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<Item: Copy, Item: Send> {}
@ -483,7 +483,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| |
| `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<Item: Copy, Item: Copy> {}
@ -491,7 +491,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: 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:143:37
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
@ -499,7 +499,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| |
| `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<T> where T: Iterator<Item: Copy, Item: Send> {}
@ -507,7 +507,7 @@ LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
| |
| `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<T> where T: Iterator<Item: Copy, Item: Copy> {}
@ -515,7 +515,7 @@ LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: 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:149:48
|
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
@ -523,7 +523,7 @@ LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
| |
| `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<Item: Copy, Item: Send> {}
@ -531,7 +531,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| |
| `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<Item: Copy, Item: Send> {}
@ -539,7 +539,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| |
| `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<Item: Copy, Item: Copy> {}
@ -547,7 +547,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: 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:154:46
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
@ -555,7 +555,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: 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:157:49
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
@ -563,7 +563,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| |
| `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<Item: 'static, Item: 'static> {}
@ -571,7 +571,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| |
| `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<Item: Copy, Item: Send>; }
@ -579,7 +579,7 @@ LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
| |
| `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<Item: Copy, Item: Copy>; }
@ -587,7 +587,7 @@ LL | trait TRA2 { type A: Iterator<Item: Copy, Item: 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:164:46
|
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
@ -595,7 +595,7 @@ LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
| |
| `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<Item: Copy, Item: Send>;
@ -603,7 +603,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| |
| `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<dyn Iterator<Item: Copy, Item: Copy>>;
@ -611,7 +611,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: 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:175:43
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;

View File

@ -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: `<Type as std::ops::Deref>::Target`
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<Type as Deref>::Target`
error[E0223]: ambiguous associated type
--> $DIR/associated-types-in-ambiguous-context.rs:11:23

View File

@ -1,4 +1,4 @@
error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == std::option::Option<T>`
error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
--> $DIR/associated-types-issue-20346.rs:34:5
|
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
@ -8,9 +8,9 @@ LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
| - this type parameter
...
LL | is_iterator_of::<Option<T>, _>(&adapter);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found type parameter `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found type parameter `T`
|
= note: expected enum `std::option::Option<T>`
= note: expected enum `Option<T>`
found type `T`
error: aborting due to previous error

View File

@ -1,10 +1,10 @@
error[E0271]: type mismatch resolving `<std::vec::IntoIter<u32> as std::iter::Iterator>::Item == i32`
error[E0271]: type mismatch resolving `<std::vec::IntoIter<u32> as Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding-2.rs:6:43
|
LL | let _: &dyn I32Iterator<Item = u32> = &vec![42].into_iter();
| ^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
|
= note: required for the cast to the object type `dyn std::iter::Iterator<Item = u32, Item = i32>`
= note: required for the cast to the object type `dyn Iterator<Item = u32, Item = i32>`
error: aborting due to previous error

View File

@ -1,18 +1,18 @@
error[E0284]: type annotations needed: cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
error[E0284]: type annotations needed: cannot satisfy `<Self as Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:4:12
|
LL | trait Foo: Iterator<Item = i32> {}
| ---------- required by this bound in `Foo`
LL | trait Bar: Foo<Item = u32> {}
| ^^^^^^^^^^^^^^^ cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
| ^^^^^^^^^^^^^^^ cannot satisfy `<Self as Iterator>::Item == i32`
error[E0284]: type annotations needed: cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
error[E0284]: type annotations needed: cannot satisfy `<Self as Iterator>::Item == i32`
--> $DIR/associated-types-overridden-binding.rs:7:21
|
LL | trait I32Iterator = Iterator<Item = i32>;
| ---------- required by this bound in `I32Iterator`
LL | trait U32Iterator = I32Iterator<Item = u32>;
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Self as std::iter::Iterator>::Item == i32`
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Self as Iterator>::Item == i32`
error: aborting due to 2 previous errors

View File

@ -6,7 +6,7 @@ trait Get {
fn get(&self) -> <Self as Get>::Value;
}
fn foo<T:Get>(t: T) where <T as Get>::Value: std::marker::Sized {
fn foo<T:Get>(t: T) where <T as Get>::Value: Sized {
let x = t.get(); //~ ERROR the size for values of type
}

View File

@ -4,13 +4,13 @@ error[E0277]: the size for values of type `<T as Get>::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 `<T as Get>::Value`
= help: the trait `Sized` is not implemented for `<T as Get>::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:Get>(t: T) where <T as Get>::Value: std::marker::Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | fn foo<T:Get>(t: T) where <T as Get>::Value: Sized {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -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<T> {
type Bar: Clone = Vec<T>;
//~^ 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<Self::Assoc>: Clone,
//~^ ERROR the trait bound `NotClone: std::clone::Clone` is not satisfied
//~^ ERROR the trait bound `NotClone: Clone` is not satisfied
Self::Assoc: IsU8<Self::Assoc>,
//~^ ERROR the trait bound `NotClone: IsU8<NotClone>` is not satisfied
bool: IsU8<Self::Assoc>,
@ -70,7 +70,7 @@ trait D where
// `Clone`.
trait Foo2<T> {
type Bar: Clone = Vec<Self::Baz>;
//~^ ERROR the trait bound `<Self as Foo2<T>>::Baz: std::clone::Clone` is not satisfied
//~^ ERROR the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
type Baz = T;
}
@ -79,7 +79,7 @@ trait Foo2<T> {
// this would be accepted.
trait Foo25<T: Clone> {
type Bar: Clone = Vec<Self::Baz>;
//~^ ERROR the trait bound `<Self as Foo25<T>>::Baz: std::clone::Clone` is not satisfied
//~^ ERROR the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
type Baz = T;
}
@ -88,7 +88,7 @@ trait Foo25<T: Clone> {
trait Foo3<T> 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<Self::Baz>;
type Baz = T;

View File

@ -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<T> {
| ------------ required by `Foo`
LL | type Bar: Clone = Vec<T>;
| ^^^^^ 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<T>`
= note: required because of the requirements on the impl of `Clone` for `Vec<T>`
help: consider restricting type parameter `T`
|
LL | trait Foo<T: std::clone::Clone> {
| ^^^^^^^^^^^^^^^^^^^
LL | trait Foo<T: Clone> {
| ^^^^^^^
error[E0277]: the trait bound `(): Foo<Self>` 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<Self::Assoc>: Clone,
| | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`
| | ^^^^^ the trait `Clone` is not implemented for `NotClone`
LL | |
LL | | Self::Assoc: IsU8<Self::Assoc>,
... |
@ -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<NotClone>`
= note: required because of the requirements on the impl of `Clone` for `Vec<NotClone>`
error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: std::clone::Clone` is not satisfied
error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:72:15
|
LL | trait Foo2<T> {
| ------------- required by `Foo2`
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo2<T>>::Baz`
| ^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
|
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo2<T>>::Baz>`
= note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo2<T>>::Baz>`
help: consider further restricting the associated type
|
LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: std::clone::Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: std::clone::Clone` is not satisfied
error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
--> $DIR/defaults-suitability.rs:81:15
|
LL | trait Foo25<T: Clone> {
| --------------------- required by `Foo25`
LL | type Bar: Clone = Vec<Self::Baz>;
| ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo25<T>>::Baz`
| ^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
|
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo25<T>>::Baz>`
= note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo25<T>>::Baz>`
help: consider further restricting the associated type
|
LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: std::clone::Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::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<T> 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<T> {
| - 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

View File

@ -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<Target = str>
//~^ 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<Self>
@ -40,9 +40,9 @@ trait UncheckedCopy: Sized {
impl<T> 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<T: UncheckedCopy>(origin: T) {
let origin = T::make_origin(origin);

View File

@ -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<Target = str>
| ^^^^^^^^^^^^^^^^^^^ 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<T: std::fmt::Display> 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<Target = str>
| ------------------- required by this bound in `UncheckedCopy`
...
LL | impl<T> 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<T: std::ops::Deref> UncheckedCopy for T {}
| ^^^^^^^^^^^^^^^^^
LL | impl<T: Deref> 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<T> UncheckedCopy for T {}
|
help: consider restricting type parameter `T`
|
LL | impl<T: std::ops::AddAssign<&'static str>> UncheckedCopy for T {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | impl<T: AddAssign<&'static str>> 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<T> 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<T: std::marker::Copy> UncheckedCopy for T {}
| ^^^^^^^^^^^^^^^^^^^
LL | impl<T: Copy> UncheckedCopy for T {}
| ^^^^^^
error: aborting due to 8 previous errors

Some files were not shown because too many files have changed in this diff Show More