Auto merge of #76176 - marmeladema:fix-closure-path-printing, r=eddyb

Move from {{closure}}#0 syntax to {closure#0} for (def) path components

Part of #70334

I followed the approach described by `@eddyb` and introduced a `DefPathDataName` enum.
To preserve compatibility, in various places, I had to rely on formatting manually by calling `format!("{{{{{}}}}}", namespace)`.

My questions are:
* Do we want to convert for places to use the new naming scheme? Or shall I re-add `DefPathData::as_symbol` but renamed as `DefPathData::as_legacy_symbol` to avoid manually allocating the legacy symbols?
* Do we want to `impl Display for DisambiguatedDefPathData` to avoid manually calling `write!(s, "{{{}#{}}}", namespace, component.disambiguator)`?
* We might also want to improve naming for `DefPathDataName` and `DefPathData::get_name`

r? `@eddyb`
This commit is contained in:
bors 2020-09-26 01:36:50 +00:00
commit c6622d1d05
99 changed files with 299 additions and 281 deletions

View file

@ -27,11 +27,18 @@ pub fn item_namespace(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll DIScope {
.parent
.map(|parent| item_namespace(cx, DefId { krate: def_id.krate, index: parent }));
let crate_name_as_str;
let name_to_string;
let namespace_name = match def_key.disambiguated_data.data {
DefPathData::CrateRoot => cx.tcx.crate_name(def_id.krate),
data => data.as_symbol(),
DefPathData::CrateRoot => {
crate_name_as_str = cx.tcx.crate_name(def_id.krate).as_str();
&*crate_name_as_str
}
data => {
name_to_string = data.to_string();
&*name_to_string
}
};
let namespace_name = namespace_name.as_str();
let scope = unsafe {
llvm::LLVMRustDIBuilderCreateNameSpace(

View file

@ -5,6 +5,8 @@ use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{self, subst::SubstsRef, Ty, TyCtxt};
use std::fmt::Write;
// Compute the name of the type as it should be stored in debuginfo. Does not do
// any caching, i.e., calling the function twice with the same type will also do
// the work twice. The `qualified` parameter only affects the first level of the
@ -228,8 +230,7 @@ pub fn push_debuginfo_type_name<'tcx>(
if qualified {
output.push_str(&tcx.crate_name(def_id.krate).as_str());
for path_element in tcx.def_path(def_id).data {
output.push_str("::");
output.push_str(&path_element.data.as_symbol().as_str());
write!(output, "::{}", path_element.data).unwrap();
}
} else {
output.push_str(&tcx.item_name(def_id).as_str());

View file

@ -13,9 +13,9 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::StableHasher;
use rustc_index::vec::IndexVec;
use rustc_span::hygiene::ExpnId;
use rustc_span::symbol::{sym, Symbol};
use rustc_span::symbol::{kw, sym, Symbol};
use std::fmt::Write;
use std::fmt::{self, Write};
use std::hash::Hash;
use tracing::debug;
@ -155,6 +155,29 @@ pub struct DisambiguatedDefPathData {
pub disambiguator: u32,
}
impl DisambiguatedDefPathData {
pub fn fmt_maybe_verbose(&self, writer: &mut impl Write, verbose: bool) -> fmt::Result {
match self.data.name() {
DefPathDataName::Named(name) => {
if verbose && self.disambiguator != 0 {
write!(writer, "{}#{}", name, self.disambiguator)
} else {
writer.write_str(&name.as_str())
}
}
DefPathDataName::Anon { namespace } => {
write!(writer, "{{{}#{}}}", namespace, self.disambiguator)
}
}
}
}
impl fmt::Display for DisambiguatedDefPathData {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.fmt_maybe_verbose(f, true)
}
}
#[derive(Clone, Debug, Encodable, Decodable)]
pub struct DefPath {
/// The path leading from the crate root to the item.
@ -198,33 +221,11 @@ impl DefPath {
/// Returns a string representation of the `DefPath` without
/// the crate-prefix. This method is useful if you don't have
/// a `TyCtxt` available.
pub fn to_string_no_crate(&self) -> String {
pub fn to_string_no_crate_verbose(&self) -> String {
let mut s = String::with_capacity(self.data.len() * 16);
for component in &self.data {
write!(s, "::{}[{}]", component.data.as_symbol(), component.disambiguator).unwrap();
}
s
}
/// Returns a filename-friendly string for the `DefPath`, with the
/// crate-prefix.
pub fn to_string_friendly<F>(&self, crate_imported_name: F) -> String
where
F: FnOnce(CrateNum) -> Symbol,
{
let crate_name_str = crate_imported_name(self.krate).as_str();
let mut s = String::with_capacity(crate_name_str.len() + self.data.len() * 16);
write!(s, "::{}", crate_name_str).unwrap();
for component in &self.data {
if component.disambiguator == 0 {
write!(s, "::{}", component.data.as_symbol()).unwrap();
} else {
write!(s, "{}[{}]", component.data.as_symbol(), component.disambiguator).unwrap();
}
write!(s, "::{}", component).unwrap();
}
s
@ -240,12 +241,9 @@ impl DefPath {
for component in &self.data {
s.extend(opt_delimiter);
opt_delimiter = Some('-');
if component.disambiguator == 0 {
write!(s, "{}", component.data.as_symbol()).unwrap();
} else {
write!(s, "{}[{}]", component.data.as_symbol(), component.disambiguator).unwrap();
}
write!(s, "{}", component).unwrap();
}
s
}
}
@ -427,6 +425,12 @@ impl Definitions {
}
}
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum DefPathDataName {
Named(Symbol),
Anon { namespace: Symbol },
}
impl DefPathData {
pub fn get_opt_name(&self) -> Option<Symbol> {
use self::DefPathData::*;
@ -437,22 +441,30 @@ impl DefPathData {
}
}
pub fn as_symbol(&self) -> Symbol {
pub fn name(&self) -> DefPathDataName {
use self::DefPathData::*;
match *self {
TypeNs(name) | ValueNs(name) | MacroNs(name) | LifetimeNs(name) => name,
TypeNs(name) | ValueNs(name) | MacroNs(name) | LifetimeNs(name) => {
DefPathDataName::Named(name)
}
// Note that this does not show up in user print-outs.
CrateRoot => sym::double_braced_crate,
Impl => sym::double_braced_impl,
Misc => sym::double_braced_misc,
ClosureExpr => sym::double_braced_closure,
Ctor => sym::double_braced_constructor,
AnonConst => sym::double_braced_constant,
ImplTrait => sym::double_braced_opaque,
CrateRoot => DefPathDataName::Anon { namespace: kw::Crate },
Impl => DefPathDataName::Anon { namespace: kw::Impl },
Misc => DefPathDataName::Anon { namespace: sym::misc },
ClosureExpr => DefPathDataName::Anon { namespace: sym::closure },
Ctor => DefPathDataName::Anon { namespace: sym::constructor },
AnonConst => DefPathDataName::Anon { namespace: sym::constant },
ImplTrait => DefPathDataName::Anon { namespace: sym::opaque },
}
}
}
pub fn to_string(&self) -> String {
self.as_symbol().to_string()
impl fmt::Display for DefPathData {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.name() {
DefPathDataName::Named(name) => f.write_str(&name.as_str()),
// FIXME(#70334): this will generate legacy {{closure}}, {{impl}}, etc
DefPathDataName::Anon { namespace } => write!(f, "{{{{{}}}}}", namespace),
}
}
}

View file

@ -531,7 +531,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
disambiguated_data: &DisambiguatedDefPathData,
) -> Result<Self::Path, Self::Error> {
let mut path = print_prefix(self)?;
path.push(disambiguated_data.data.as_symbol().to_string());
path.push(disambiguated_data.to_string());
Ok(path)
}
fn path_generic_args(

View file

@ -846,7 +846,7 @@ impl<'tcx> LateContext<'tcx> {
return Ok(path);
}
path.push(disambiguated_data.data.as_symbol());
path.push(Symbol::intern(&disambiguated_data.data.to_string()));
Ok(path)
}

View file

@ -244,7 +244,7 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
if cfg!(debug_assertions) {
if hir_id.owner != self.current_dep_node_owner {
let node_str = match self.definitions.opt_hir_id_to_local_def_id(hir_id) {
Some(def_id) => self.definitions.def_path(def_id).to_string_no_crate(),
Some(def_id) => self.definitions.def_path(def_id).to_string_no_crate_verbose(),
None => format!("{:?}", node),
};
@ -254,9 +254,11 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
current_dep_node_owner={} ({:?}), hir_id.owner={} ({:?})",
self.source_map.span_to_string(span),
node_str,
self.definitions.def_path(self.current_dep_node_owner).to_string_no_crate(),
self.definitions
.def_path(self.current_dep_node_owner)
.to_string_no_crate_verbose(),
self.current_dep_node_owner,
self.definitions.def_path(hir_id.owner).to_string_no_crate(),
self.definitions.def_path(hir_id.owner).to_string_no_crate_verbose(),
hir_id.owner,
)
}

View file

@ -1002,11 +1002,7 @@ fn hir_id_to_string(map: &Map<'_>, id: HirId) -> String {
let def_id = map.local_def_id(id);
tcx.def_path_str(def_id.to_def_id())
} else if let Some(path) = map.def_path_from_hir_id(id) {
path.data
.into_iter()
.map(|elem| elem.data.to_string())
.collect::<Vec<_>>()
.join("::")
path.data.into_iter().map(|elem| elem.to_string()).collect::<Vec<_>>().join("::")
} else {
String::from("<missing path>")
}

View file

@ -1272,7 +1272,7 @@ impl<'tcx> TyCtxt<'tcx> {
// Don't print the whole crate disambiguator. That's just
// annoying in debug output.
&(crate_disambiguator.to_fingerprint().to_hex())[..4],
self.def_path(def_id).to_string_no_crate()
self.def_path(def_id).to_string_no_crate_verbose()
)
}

View file

@ -11,7 +11,7 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_hir as hir;
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::definitions::{DefPathData, DefPathDataName, DisambiguatedDefPathData};
use rustc_hir::ItemKind;
use rustc_session::config::TrimmedDefPaths;
use rustc_span::symbol::{kw, Ident, Symbol};
@ -1498,25 +1498,21 @@ impl<F: fmt::Write> Printer<'tcx> for FmtPrinter<'_, 'tcx, F> {
// FIXME(eddyb) `name` should never be empty, but it
// currently is for `extern { ... }` "foreign modules".
let name = disambiguated_data.data.as_symbol();
if name != kw::Invalid {
let name = disambiguated_data.data.name();
if name != DefPathDataName::Named(kw::Invalid) {
if !self.empty_path {
write!(self, "::")?;
}
if Ident::with_dummy_span(name).is_raw_guess() {
write!(self, "r#")?;
}
write!(self, "{}", name)?;
// FIXME(eddyb) this will print e.g. `{{closure}}#3`, but it
// might be nicer to use something else, e.g. `{closure#3}`.
let dis = disambiguated_data.disambiguator;
let print_dis = disambiguated_data.data.get_opt_name().is_none()
|| dis != 0 && self.tcx.sess.verbose();
if print_dis {
write!(self, "#{}", dis)?;
if let DefPathDataName::Named(name) = name {
if Ident::with_dummy_span(name).is_raw_guess() {
write!(self, "r#")?;
}
}
let verbose = self.tcx.sess.verbose();
disambiguated_data.fmt_maybe_verbose(&mut self, verbose)?;
self.empty_path = false;
}

View file

@ -55,18 +55,22 @@ impl<'p, 'c, 'tcx> QueryKeyStringBuilder<'p, 'c, 'tcx> {
};
let dis_buffer = &mut [0u8; 16];
let crate_name;
let other_name;
let name;
let dis;
let end_index;
match def_key.disambiguated_data.data {
DefPathData::CrateRoot => {
name = self.tcx.original_crate_name(def_id.krate);
crate_name = self.tcx.original_crate_name(def_id.krate).as_str();
name = &*crate_name;
dis = "";
end_index = 3;
}
other => {
name = other.as_symbol();
other_name = other.to_string();
name = other_name.as_str();
if def_key.disambiguated_data.disambiguator == 0 {
dis = "";
end_index = 3;
@ -80,7 +84,6 @@ impl<'p, 'c, 'tcx> QueryKeyStringBuilder<'p, 'c, 'tcx> {
}
}
let name = &*name.as_str();
let components = [
StringComponent::Ref(parent_string_id),
StringComponent::Value("::"),

View file

@ -132,9 +132,8 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
return Ok(self);
}
self.path.push_str("::");
write!(self.path, "::{}", disambiguated_data.data).unwrap();
self.path.push_str(&disambiguated_data.data.as_symbol().as_str());
Ok(self)
}

View file

@ -3,6 +3,7 @@ use std::collections::hash_map::Entry;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use rustc_hir::definitions::DefPathDataName;
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
use rustc_middle::middle::exported_symbols::SymbolExportLevel;
use rustc_middle::mir::mono::{CodegenUnit, CodegenUnitNameBuilder, Linkage, Visibility};
@ -354,7 +355,10 @@ fn compute_codegen_unit_name(
*cache.entry((cgu_def_id, volatile)).or_insert_with(|| {
let def_path = tcx.def_path(cgu_def_id);
let components = def_path.data.iter().map(|part| part.data.as_symbol());
let components = def_path.data.iter().map(|part| match part.data.name() {
DefPathDataName::Named(name) => name,
DefPathDataName::Anon { .. } => unreachable!(),
});
let volatile_suffix = volatile.then_some("volatile");

View file

@ -112,14 +112,14 @@ impl<'a, 'hir> HirIdValidator<'a, 'hir> {
missing_items.push(format!(
"[local_id: {}, owner: {}]",
local_id,
self.hir_map.def_path(owner).to_string_no_crate()
self.hir_map.def_path(owner).to_string_no_crate_verbose()
));
}
self.error(|| {
format!(
"ItemLocalIds not assigned densely in {}. \
Max ItemLocalId = {}, missing IDs = {:?}; seens IDs = {:?}",
self.hir_map.def_path(owner).to_string_no_crate(),
self.hir_map.def_path(owner).to_string_no_crate_verbose(),
max,
missing_items,
self.hir_ids_seen
@ -148,8 +148,8 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
format!(
"HirIdValidator: The recorded owner of {} is {} instead of {}",
self.hir_map.node_to_string(hir_id),
self.hir_map.def_path(hir_id.owner).to_string_no_crate(),
self.hir_map.def_path(owner).to_string_no_crate()
self.hir_map.def_path(hir_id.owner).to_string_no_crate_verbose(),
self.hir_map.def_path(owner).to_string_no_crate_verbose()
)
});
}

View file

@ -333,6 +333,7 @@ symbols! {
clone,
clone_closures,
clone_from,
closure,
closure_to_fn_coercion,
cmp,
cmpxchg16b_target_feature,
@ -369,6 +370,8 @@ symbols! {
const_trait_bound_opt_out,
const_trait_impl,
const_transmute,
constant,
constructor,
contents,
context,
convert,
@ -438,13 +441,6 @@ symbols! {
document_private_items,
dotdot_in_tuple_patterns,
dotdoteq_in_patterns,
double_braced_closure: "{{closure}}",
double_braced_constant: "{{constant}}",
double_braced_constructor: "{{constructor}}",
double_braced_crate: "{{crate}}",
double_braced_impl: "{{impl}}",
double_braced_misc: "{{misc}}",
double_braced_opaque: "{{opaque}}",
drop,
drop_in_place,
drop_types_in_const,
@ -679,6 +675,7 @@ symbols! {
minnumf32,
minnumf64,
mips_target_feature,
misc,
module,
module_path,
more_struct_aliases,

View file

@ -316,7 +316,8 @@ impl Printer<'tcx> for SymbolPrinter<'tcx> {
self.path.finalize_pending_component();
}
self.write_str(&disambiguated_data.data.as_symbol().as_str())?;
write!(self, "{}", disambiguated_data.data)?;
Ok(self)
}
fn path_generic_args(

View file

@ -64,7 +64,7 @@ mod closures {
add_one(3)
}
//~ MONO_ITEM fn closures::unused::<T>::{{closure}}#0
//~ MONO_ITEM fn closures::unused::<T>::{closure#0}
//~ MONO_ITEM fn closures::unused::<T>
// Function has an unused type parameter in closure, but not in parent.
@ -74,7 +74,7 @@ mod closures {
add_one(3)
}
//~ MONO_ITEM fn closures::used_parent::<T>::{{closure}}#0
//~ MONO_ITEM fn closures::used_parent::<T>::{closure#0}
//~ MONO_ITEM fn closures::used_parent::<u32>
//~ MONO_ITEM fn closures::used_parent::<u64>
@ -88,8 +88,8 @@ mod closures {
x()
}
//~ MONO_ITEM fn closures::used_binding_value::<u32>::{{closure}}#0
//~ MONO_ITEM fn closures::used_binding_value::<u64>::{{closure}}#0
//~ MONO_ITEM fn closures::used_binding_value::<u32>::{closure#0}
//~ MONO_ITEM fn closures::used_binding_value::<u64>::{closure#0}
//~ MONO_ITEM fn closures::used_binding_value::<u32>
//~ MONO_ITEM fn closures::used_binding_value::<u64>
@ -103,8 +103,8 @@ mod closures {
x()
}
//~ MONO_ITEM fn closures::used_binding_type::<u32>::{{closure}}#0
//~ MONO_ITEM fn closures::used_binding_type::<u64>::{{closure}}#0
//~ MONO_ITEM fn closures::used_binding_type::<u32>::{closure#0}
//~ MONO_ITEM fn closures::used_binding_type::<u64>::{closure#0}
//~ MONO_ITEM fn closures::used_binding_type::<u32>
//~ MONO_ITEM fn closures::used_binding_type::<u64>
@ -114,8 +114,8 @@ mod closures {
x(t)
}
//~ MONO_ITEM fn closures::used_argument::<u32>::{{closure}}#0
//~ MONO_ITEM fn closures::used_argument::<u64>::{{closure}}#0
//~ MONO_ITEM fn closures::used_argument::<u32>::{closure#0}
//~ MONO_ITEM fn closures::used_argument::<u64>::{closure#0}
//~ MONO_ITEM fn closures::used_argument::<u32>
//~ MONO_ITEM fn closures::used_argument::<u64>
@ -126,8 +126,8 @@ mod closures {
x(t)
}
//~ MONO_ITEM fn closures::used_argument_closure::<u32>::{{closure}}#0
//~ MONO_ITEM fn closures::used_argument_closure::<u64>::{{closure}}#0
//~ MONO_ITEM fn closures::used_argument_closure::<u32>::{closure#0}
//~ MONO_ITEM fn closures::used_argument_closure::<u64>::{closure#0}
//~ MONO_ITEM fn closures::used_argument_closure::<u32>
//~ MONO_ITEM fn closures::used_argument_closure::<u64>
@ -138,8 +138,8 @@ mod closures {
y()
}
//~ MONO_ITEM fn closures::used_upvar::<u32>::{{closure}}#0
//~ MONO_ITEM fn closures::used_upvar::<u64>::{{closure}}#0
//~ MONO_ITEM fn closures::used_upvar::<u32>::{closure#0}
//~ MONO_ITEM fn closures::used_upvar::<u64>::{closure#0}
//~ MONO_ITEM fn closures::used_upvar::<u32>
//~ MONO_ITEM fn closures::used_upvar::<u64>
@ -149,8 +149,8 @@ mod closures {
x()
}
//~ MONO_ITEM fn closures::used_substs::<u32>::{{closure}}#0
//~ MONO_ITEM fn closures::used_substs::<u64>::{{closure}}#0
//~ MONO_ITEM fn closures::used_substs::<u32>::{closure#0}
//~ MONO_ITEM fn closures::used_substs::<u64>::{closure#0}
//~ MONO_ITEM fn closures::used_substs::<u32>
//~ MONO_ITEM fn closures::used_substs::<u64>
}
@ -210,7 +210,7 @@ mod methods {
add_one(3)
}
//~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<F>::closure_unused_all::<G>
// Function uses type parameter from impl and fn in closure.
@ -224,8 +224,8 @@ mod methods {
add_one(3)
}
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_both::<u32>
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_both::<u64>
@ -239,8 +239,8 @@ mod methods {
add_one(3)
}
//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u32>
//~ MONO_ITEM fn methods::Foo::<F>::closure_used_fn::<u64>
@ -254,8 +254,8 @@ mod methods {
add_one(3)
}
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>::{closure#0}
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_impl::<G>
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_impl::<G>
@ -265,8 +265,8 @@ mod methods {
x()
}
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs::{{closure}}#0
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs::{closure#0}
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs::{closure#0}
//~ MONO_ITEM fn methods::Foo::<u32>::closure_used_substs
//~ MONO_ITEM fn methods::Foo::<u64>::closure_used_substs
}

View file

@ -22,7 +22,7 @@
- // + ty: &i32
- // + val: Value(Scalar(alloc0))
+ // + ty: &[&i32; 1]
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR[0]), const_param_did: None }, [], Some(promoted[0]))
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
- // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
- // + literal: Const { ty: &i32, val: Value(Scalar(alloc0)) }
@ -30,7 +30,7 @@
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
+ // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:35
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR[0]), const_param_did: None }, [], Some(promoted[0])) }
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, [], Some(promoted[0])) }
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44

View file

@ -24,7 +24,7 @@
- // + ty: &i32
- // + val: Value(Scalar(alloc2))
+ // + ty: &[&i32; 1]
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO[0]), const_param_did: None }, [], Some(promoted[0]))
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
- // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
- // + literal: Const { ty: &i32, val: Value(Scalar(alloc2)) }
@ -32,7 +32,7 @@
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
+ // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:46
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO[0]), const_param_did: None }, [], Some(promoted[0])) }
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, [], Some(promoted[0])) }
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55

View file

@ -28,10 +28,10 @@
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
// ty::Const
// + ty: &[i32; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
// + literal: Const { ty: &[i32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[i32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35

View file

@ -28,10 +28,10 @@
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
// ty::Const
// + ty: &[i32; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
// + literal: Const { ty: &[i32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[i32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35

View file

@ -19,10 +19,10 @@
_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)
// + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, [], None)
// mir::Constant
// + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), const_param_did: None }, [], None) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, [], None) }
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
_1 = move _2 as usize (Misc); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39

View file

@ -14,10 +14,10 @@
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/ref_deref.rs:5:6: 5:10
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
- _1 = (*_4); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10

View file

@ -17,10 +17,10 @@
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
+ // ty::Const
+ // + ty: &i32
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0]))
+ // mir::Constant
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
+ // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
+ // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11

View file

@ -14,10 +14,10 @@
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
// ty::Const
// + ty: &(i32, i32)
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/ref_deref_project.rs:5:6: 5:17
// + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
_1 = ((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18

View file

@ -17,10 +17,10 @@
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
+ // ty::Const
+ // + ty: &(i32, i32)
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0]))
+ // mir::Constant
+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18

View file

@ -21,10 +21,10 @@
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
// ty::Const
// + ty: &[u32; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/slice_len.rs:5:6: 5:19
// + literal: Const { ty: &[u32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[u32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19

View file

@ -21,10 +21,10 @@
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
// ty::Const
// + ty: &[u32; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/slice_len.rs:5:6: 5:19
// + literal: Const { ty: &[u32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[u32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19

View file

@ -5,7 +5,7 @@
// Regression test for #58892, generator drop shims should not have blocks
// spuriously marked as cleanup
// EMIT_MIR generator_drop_cleanup.main-{{closure}}.generator_drop.0.mir
// EMIT_MIR generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
fn main() {
let gen = || {
let _s = String::new();

View file

@ -17,7 +17,7 @@ struct Bar(i32);
fn take<T>(_x: T) {}
// EMIT_MIR generator_storage_dead_unwind.main-{{closure}}.StateTransform.before.mir
// EMIT_MIR generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
fn main() {
let _gen = || {
let a = Foo(5);

View file

@ -14,7 +14,7 @@ impl Drop for HasDrop {
fn callee() {}
// EMIT_MIR generator_tiny.main-{{closure}}.generator_resume.0.mir
// EMIT_MIR generator_tiny.main-{closure#0}.generator_resume.0.mir
fn main() {
let _gen = |_x: u8| {
let _d = HasDrop;

View file

@ -1,4 +1,4 @@
// MIR for `main::{{closure}}#0` 0 generator_drop
// MIR for `main::{closure#0}` 0 generator_drop
/* generator_layout = GeneratorLayout {
field_tys: {
_0: std::string::String,
@ -14,7 +14,7 @@
},
} */
fn main::{{closure}}#0(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 13:6 {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

@ -1,6 +1,6 @@
// MIR for `main::{{closure}}#0` before StateTransform
// MIR for `main::{closure#0}` before StateTransform
fn main::{{closure}}#0(_1: [generator@$DIR/generator-storage-dead-unwind.rs:22:16: 28:6 {Foo, Bar, ()}], _2: ()) -> ()
fn main::{closure#0}(_1: [generator@$DIR/generator-storage-dead-unwind.rs:22:16: 28:6 {Foo, Bar, ()}], _2: ()) -> ()
yields ()
{
let mut _0: (); // return place in scope 0 at $DIR/generator-storage-dead-unwind.rs:22:19: 22:19

View file

@ -1,4 +1,4 @@
// MIR for `main::{{closure}}#0` 0 generator_resume
// MIR for `main::{closure#0}` 0 generator_resume
/* generator_layout = GeneratorLayout {
field_tys: {},
variant_fields: {
@ -10,7 +10,7 @@
storage_conflicts: BitMatrix(0x0) {},
} */
fn main::{{closure}}#0(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6 {u8, HasDrop, ()}]>, _2: u8) -> 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

@ -4,8 +4,8 @@ fn foo(_1: T, _2: i32) -> i32 {
debug _t => _1; // in scope 0 at $DIR/inline-closure.rs:10:17: 10:19
debug q => _2; // in scope 0 at $DIR/inline-closure.rs:10:24: 10:25
let mut _0: i32; // return place in scope 0 at $DIR/inline-closure.rs:10:35: 10:38
let _3: [closure@foo<T>::{{closure}}#0]; // in scope 0 at $DIR/inline-closure.rs:11:9: 11:10
let mut _4: &[closure@foo<T>::{{closure}}#0]; // in scope 0 at $DIR/inline-closure.rs:12:5: 12:6
let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure.rs:11:9: 11:10
let mut _4: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure.rs:12:5: 12:6
let mut _5: (i32, i32); // in scope 0 at $DIR/inline-closure.rs:12:5: 12:12
let mut _6: i32; // in scope 0 at $DIR/inline-closure.rs:12:7: 12:8
let mut _7: i32; // in scope 0 at $DIR/inline-closure.rs:12:10: 12:11

View file

@ -4,8 +4,8 @@ fn foo(_1: T, _2: &i32) -> i32 {
debug _t => _1; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:11:17: 11:19
debug q => _2; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:11:24: 11:25
let mut _0: i32; // return place in scope 0 at $DIR/inline-closure-borrows-arg.rs:11:36: 11:39
let _3: [closure@foo<T>::{{closure}}#0]; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10
let mut _4: &[closure@foo<T>::{{closure}}#0]; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6
let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10
let mut _4: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6
let mut _5: (&i32, &i32); // in scope 0 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
let mut _6: &i32; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8
let mut _7: &i32; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11

View file

@ -4,10 +4,10 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
debug t => _1; // in scope 0 at $DIR/inline-closure-captures.rs:10:17: 10:18
debug q => _2; // in scope 0 at $DIR/inline-closure-captures.rs:10:23: 10:24
let mut _0: (i32, T); // return place in scope 0 at $DIR/inline-closure-captures.rs:10:34: 10:42
let _3: [closure@foo<T>::{{closure}}#0 q:&i32, t:&T]; // in scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10
let _3: [closure@foo<T>::{closure#0} q:&i32, t:&T]; // in scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10
let mut _4: &i32; // in scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
let mut _5: &T; // in scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
let mut _6: &[closure@foo<T>::{{closure}}#0 q:&i32, t:&T]; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:6
let mut _6: &[closure@foo<T>::{closure#0} q:&i32, t:&T]; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:6
let mut _7: (i32,); // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9
let mut _8: i32; // in scope 0 at $DIR/inline-closure-captures.rs:12:7: 12:8
let mut _10: i32; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9

View file

@ -35,10 +35,10 @@ fn bar() -> bool {
_10 = const bar::promoted[1]; // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar[0]), const_param_did: None }, [], Some(promoted[1]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar), const_param_did: None }, [], Some(promoted[1]))
// mir::Constant
// + span: $DIR/inline-retag.rs:12:7: 12:9
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar[0]), const_param_did: None }, [], Some(promoted[1])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar), const_param_did: None }, [], Some(promoted[1])) }
Retag(_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
_4 = &(*_10); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
Retag(_4); // scope 1 at $DIR/inline-retag.rs:12:7: 12:9
@ -49,10 +49,10 @@ fn bar() -> bool {
_9 = const bar::promoted[0]; // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/inline-retag.rs:12:11: 12:14
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ inline_retag[317d]::bar), const_param_did: None }, [], Some(promoted[0])) }
Retag(_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
_7 = &(*_9); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14
Retag(_7); // scope 1 at $DIR/inline-retag.rs:12:11: 12:14

View file

@ -14,7 +14,7 @@ trait Foo {
}
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR issue_41697.{{impl}}-{{constant}}.SimplifyCfg-promote-consts.after.mir
// EMIT_MIR issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
impl Foo for [u8; 1+1] {
fn get(&self) -> [u8; 2] {
*self

View file

@ -1,6 +1,6 @@
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-promote-consts
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}` after SimplifyCfg-promote-consts
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0: usize = {
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}: usize = {
let mut _0: usize; // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
let mut _1: (usize, bool); // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

View file

@ -1,6 +1,6 @@
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0` after SimplifyCfg-promote-consts
// MIR for `<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}` after SimplifyCfg-promote-consts
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{{constant}}#0: usize = {
<impl at $DIR/issue-41697.rs:18:1: 22:2>::{constant#0}: usize = {
let mut _0: usize; // return place in scope 0 at $DIR/issue-41697.rs:18:19: 18:22
let mut _1: (usize, bool); // in scope 0 at $DIR/issue-41697.rs:18:19: 18:22

View file

@ -76,10 +76,10 @@
(_4.1: &i32) = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
StorageLive(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_5 = (_4.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_6 = (_4.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -106,10 +106,10 @@
_25 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &[&str; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_15 = _5; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL

View file

@ -76,10 +76,10 @@
(_4.1: &i32) = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
StorageLive(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_5 = (_4.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_6 = (_4.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -106,10 +106,10 @@
_25 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &[&str; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_15 = _5; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL

View file

@ -129,10 +129,10 @@
_45 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
_11 = _45; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -184,10 +184,10 @@
_44 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &[&str; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_25 = _44; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_24 = _25; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_23 = move _24 as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL

View file

@ -129,10 +129,10 @@
_45 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[1])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
_11 = _45; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -184,10 +184,10 @@
_44 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: &[&str; 3]
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
_25 = _44; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_24 = _25; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_23 = move _24 as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL

View file

@ -58,10 +58,10 @@ fn full_tested_match() -> () {
_11 = const full_tested_match::promoted[0]; // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
// ty::Const
// + ty: &std::option::Option<i32>
// + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/match_false_edges.rs:16:14: 16:15
// + literal: Const { ty: &std::option::Option<i32>, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &std::option::Option<i32>, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match), const_param_did: None }, [], Some(promoted[0])) }
_6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
_4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27

View file

@ -1,6 +1,6 @@
// MIR for `main::{{closure}}#0` after SimplifyCfg-elaborate-drops
// MIR for `main::{closure#0}` after SimplifyCfg-elaborate-drops
fn main::{{closure}}#0(_1: &[closure@main::{{closure}}#0], _2: &i32) -> &i32 {
fn main::{closure#0}(_1: &[closure@main::{closure#0}], _2: &i32) -> &i32 {
debug x => _2; // in scope 0 at $DIR/retag.rs:40:32: 40:33
let mut _0: &i32; // return place in scope 0 at $DIR/retag.rs:40:44: 40:48
let _3: &i32; // in scope 0 at $DIR/retag.rs:41:13: 41:15

View file

@ -10,7 +10,7 @@ fn main() -> () {
let mut _7: &mut i32; // in scope 0 at $DIR/retag.rs:32:29: 32:35
let mut _9: &mut i32; // in scope 0 at $DIR/retag.rs:33:19: 33:20
let mut _12: *mut i32; // in scope 0 at $DIR/retag.rs:36:18: 36:29
let mut _14: [closure@main::{{closure}}#0]; // in scope 0 at $DIR/retag.rs:40:31: 43:6
let mut _14: [closure@main::{closure#0}]; // in scope 0 at $DIR/retag.rs:40:31: 43:6
let mut _16: for<'r> fn(&'r i32) -> &'r i32; // in scope 0 at $DIR/retag.rs:44:14: 44:15
let mut _17: &i32; // in scope 0 at $DIR/retag.rs:44:16: 44:18
let _18: &i32; // in scope 0 at $DIR/retag.rs:44:16: 44:18
@ -118,9 +118,9 @@ fn main() -> () {
StorageDead(_2); // scope 1 at $DIR/retag.rs:37:5: 37:6
StorageLive(_13); // scope 1 at $DIR/retag.rs:40:9: 40:10
StorageLive(_14); // scope 1 at $DIR/retag.rs:40:31: 43:6
_14 = [closure@main::{{closure}}#0]; // scope 1 at $DIR/retag.rs:40:31: 43:6
_14 = [closure@main::{closure#0}]; // scope 1 at $DIR/retag.rs:40:31: 43:6
// closure
// + def_id: DefId(0:14 ~ retag[317d]::main[0]::{{closure}}[0])
// + def_id: DefId(0:14 ~ retag[317d]::main::{closure#0})
// + substs: [
// i8,
// for<'r> extern "rust-call" fn((&'r i32,)) -> &'r i32,
@ -157,10 +157,10 @@ fn main() -> () {
_27 = const main::promoted[0]; // scope 7 at $DIR/retag.rs:47:21: 47:23
// ty::Const
// + ty: &i32
// + val: Unevaluated(WithOptConstParam { did: DefId(0:13 ~ retag[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// + val: Unevaluated(WithOptConstParam { did: DefId(0:13 ~ retag[317d]::main), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
// + span: $DIR/retag.rs:47:21: 47:23
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:13 ~ retag[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:13 ~ retag[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
Retag(_27); // scope 7 at $DIR/retag.rs:47:21: 47:23
_23 = &(*_27); // scope 7 at $DIR/retag.rs:47:21: 47:23
Retag(_23); // scope 7 at $DIR/retag.rs:47:21: 47:23

View file

@ -6,8 +6,8 @@
struct Test(i32);
// EMIT_MIR retag.{{impl}}-foo.SimplifyCfg-elaborate-drops.after.mir
// EMIT_MIR retag.{{impl}}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
// EMIT_MIR retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.mir
// EMIT_MIR retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.mir
impl Test {
// Make sure we run the pass on a method, not just on bare functions.
fn foo<'x>(&self, x: &'x mut i32) -> &'x mut i32 {
@ -25,7 +25,7 @@ impl Drop for Test {
}
// EMIT_MIR retag.main.SimplifyCfg-elaborate-drops.after.mir
// EMIT_MIR retag.main-{{closure}}.SimplifyCfg-elaborate-drops.after.mir
// EMIT_MIR retag.main-{closure#0}.SimplifyCfg-elaborate-drops.after.mir
fn main() {
let mut x = 0;
{

View file

@ -1,5 +1,5 @@
// compile-flags: -Zmir-opt-level=1
// EMIT_MIR simplify_try_if_let.{{impl}}-append.SimplifyArmIdentity.diff
// EMIT_MIR simplify_try_if_let.{impl#0}-append.SimplifyArmIdentity.diff
use std::ptr::NonNull;

View file

@ -5,19 +5,19 @@
struct A;
// EMIT_MIR unusual_item_types.{{impl}}-ASSOCIATED_CONSTANT.mir_map.0.mir
// EMIT_MIR unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
impl A {
const ASSOCIATED_CONSTANT: i32 = 2;
}
// See #59021
// EMIT_MIR unusual_item_types.Test-X-{{constructor}}.mir_map.0.mir
// EMIT_MIR unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir
enum Test {
X(usize),
Y { a: usize },
}
// EMIT_MIR unusual_item_types.E-V-{{constant}}.mir_map.0.mir
// EMIT_MIR unusual_item_types.E-V-{constant#0}.mir_map.0.mir
enum E {
V = 5,
}

View file

@ -1,6 +1,6 @@
// MIR for `E::V::{{constant}}#0` 0 mir_map
// MIR for `E::V::{constant#0}` 0 mir_map
E::V::{{constant}}#0: isize = {
E::V::{constant#0}: isize = {
let mut _0: isize; // return place in scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10
bb0: {

View file

@ -1,6 +1,6 @@
// MIR for `E::V::{{constant}}#0` 0 mir_map
// MIR for `E::V::{constant#0}` 0 mir_map
E::V::{{constant}}#0: isize = {
E::V::{constant#0}: isize = {
let mut _0: isize; // return place in scope 0 at $DIR/unusual-item-types.rs:22:9: 22:10
bb0: {

View file

@ -5,7 +5,7 @@
pub async fn f() -> impl std::fmt::Debug {
#[derive(Debug)]
enum E {
//~^ ERROR recursive type `f::{{closure}}#0::E` has infinite size
//~^ ERROR recursive type `f::{closure#0}::E` has infinite size
This(E),
Unit,
}

View file

@ -14,8 +14,8 @@ LL | pub async fn run() {
|
= help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
= note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}`
= note: required because it appears within the type `[static generator@run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]`
= note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]>`
= note: required because it appears within the type `[static generator@run::{closure#0} for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]`
= note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0} for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, std::result::Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}]>`
= note: required because it appears within the type `impl Future`
= note: required because it appears within the type `impl Future`

View file

@ -8,7 +8,7 @@ error[E0080]: evaluation of constant value failed
--> $DIR/nested-type.rs:16:5
|
LL | Foo::<17>::value()
| ^^^^^^^^^^^^^^^^^^ calling non-const function `Foo::{{constant}}#0::Foo::<17_usize>::value`
| ^^^^^^^^^^^^^^^^^^ calling non-const function `Foo::{constant#0}::Foo::<17_usize>::value`
error: aborting due to 2 previous errors

View file

@ -24,7 +24,7 @@ error[E0080]: evaluation of constant value failed
--> $DIR/nested-type.rs:16:5
|
LL | Foo::<17>::value()
| ^^^^^^^^^^^^^^^^^^ calling non-const function `Foo::{{constant}}#0::Foo::<17_usize>::value`
| ^^^^^^^^^^^^^^^^^^ calling non-const function `Foo::{constant#0}::Foo::<17_usize>::value`
error: aborting due to 3 previous errors

View file

@ -1,15 +1,15 @@
error[E0391]: cycle detected when simplifying constant for the type system `Foo::bytes::{{constant}}#0`
error[E0391]: cycle detected when simplifying constant for the type system `Foo::bytes::{constant#0}`
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires simplifying constant for the type system `Foo::bytes::{{constant}}#0`...
note: ...which requires simplifying constant for the type system `Foo::bytes::{constant#0}`...
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `Foo::bytes::{{constant}}#0`...
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
@ -26,7 +26,7 @@ LL | pub fn size_of<T>() -> usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires computing layout of `Foo`...
= note: ...which requires normalizing `[u8; _]`...
= note: ...which again requires simplifying constant for the type system `Foo::bytes::{{constant}}#0`, completing the cycle
= note: ...which again requires simplifying constant for the type system `Foo::bytes::{constant#0}`, completing the cycle
note: cycle used when checking that `Foo` is well-formed
--> $DIR/const-size_of-cycle.rs:3:1
|

View file

@ -8,7 +8,7 @@ error[E0080]: evaluation of constant value failed
--> $DIR/issue-68542-closure-in-array-len.rs:6:13
|
LL | a: [(); (|| { 0 })()]
| ^^^^^^^^^^^^ calling non-const function `Bug::a::{{constant}}#0::{{closure}}#0`
| ^^^^^^^^^^^^ calling non-const function `Bug::a::{constant#0}::{closure#0}`
error: aborting due to 2 previous errors

View file

@ -2,13 +2,13 @@ error[E0080]: could not evaluate static initializer
--> $DIR/tls.rs:12:25
|
LL | unsafe { let _val = A; }
| ^ cannot access thread local static (DefId(0:4 ~ tls[317d]::A[0]))
| ^ cannot access thread local static (DefId(0:4 ~ tls[317d]::A))
error[E0080]: could not evaluate static initializer
--> $DIR/tls.rs:19:26
|
LL | unsafe { let _val = &A; }
| ^ cannot access thread local static (DefId(0:4 ~ tls[317d]::A[0]))
| ^ cannot access thread local static (DefId(0:4 ~ tls[317d]::A))
warning: skipping const checks
|

View file

@ -314,7 +314,7 @@ mod this_crate {
let _ = || {
#[deprecated]
fn bar() { }
bar(); //~ ERROR use of deprecated function `this_crate::test_fn_closure_body::{{closure}}#0::bar`
bar(); //~ ERROR use of deprecated function `this_crate::test_fn_closure_body::{closure#0}::bar`
};
}

View file

@ -298,7 +298,7 @@ error: use of deprecated associated function `this_crate::Trait::trait_deprecate
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: use of deprecated function `this_crate::test_fn_closure_body::{{closure}}#0::bar`
error: use of deprecated function `this_crate::test_fn_closure_body::{closure#0}::bar`
--> $DIR/deprecation-lint.rs:317:13
|
LL | bar();

View file

@ -1,4 +1,4 @@
error[E0391]: cycle detected when computing type of `cycle1::{{opaque}}#0`
error[E0391]: cycle detected when computing type of `cycle1::{opaque#0}`
--> $DIR/auto-trait-leak.rs:12:16
|
LL | fn cycle1() -> impl Clone {
@ -35,7 +35,7 @@ note: ...which requires type-checking `cycle1`...
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
note: ...which requires computing type of `cycle2::{{opaque}}#0`...
note: ...which requires computing type of `cycle2::{opaque#0}`...
--> $DIR/auto-trait-leak.rs:20:16
|
LL | fn cycle2() -> impl Clone {
@ -71,7 +71,7 @@ note: ...which requires type-checking `cycle2`...
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
= note: ...which again requires computing type of `cycle1::{{opaque}}#0`, completing the cycle
= note: ...which again requires computing type of `cycle1::{opaque#0}`, completing the cycle
note: cycle used when checking item types in top-level module
--> $DIR/auto-trait-leak.rs:1:1
|

View file

@ -10,7 +10,7 @@ note: ...which requires const-evaluating + checking `b`...
LL | const fn b() -> usize {
| ^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires const-evaluating + checking `a`, completing the cycle
note: cycle used when const-evaluating + checking `ARR::{{constant}}#0`
note: cycle used when const-evaluating + checking `ARR::{constant#0}`
--> $DIR/infinite-recursion-const-fn.rs:10:18
|
LL | const ARR: [i32; a()] = [5; 6];

View file

@ -16,7 +16,7 @@ note: ...which requires const-evaluating + checking `FOO`...
LL | const FOO: usize = FOO;
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires normalizing `FOO`, completing the cycle
note: cycle used when const-evaluating + checking `main::{{constant}}#0`
note: cycle used when const-evaluating + checking `main::{constant#0}`
--> $DIR/issue-17252.rs:4:18
|
LL | let _x: [u8; FOO]; // caused stack overflow prior to fix

View file

@ -1,21 +1,21 @@
error[E0391]: cycle detected when simplifying constant for the type system `X::A::{{constant}}#0`
error[E0391]: cycle detected when simplifying constant for the type system `X::A::{constant#0}`
--> $DIR/issue-23302-1.rs:4:9
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
|
note: ...which requires simplifying constant for the type system `X::A::{{constant}}#0`...
note: ...which requires simplifying constant for the type system `X::A::{constant#0}`...
--> $DIR/issue-23302-1.rs:4:9
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `X::A::{{constant}}#0`...
note: ...which requires const-evaluating + checking `X::A::{constant#0}`...
--> $DIR/issue-23302-1.rs:4:9
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
= note: ...which requires normalizing `X::A as isize`...
= note: ...which again requires simplifying constant for the type system `X::A::{{constant}}#0`, completing the cycle
= note: ...which again requires simplifying constant for the type system `X::A::{constant#0}`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/issue-23302-1.rs:3:1
|

View file

@ -1,21 +1,21 @@
error[E0391]: cycle detected when simplifying constant for the type system `Y::A::{{constant}}#0`
error[E0391]: cycle detected when simplifying constant for the type system `Y::A::{constant#0}`
--> $DIR/issue-23302-2.rs:4:9
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
|
note: ...which requires simplifying constant for the type system `Y::A::{{constant}}#0`...
note: ...which requires simplifying constant for the type system `Y::A::{constant#0}`...
--> $DIR/issue-23302-2.rs:4:9
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `Y::A::{{constant}}#0`...
note: ...which requires const-evaluating + checking `Y::A::{constant#0}`...
--> $DIR/issue-23302-2.rs:4:9
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
= note: ...which requires normalizing `Y::B as isize`...
= note: ...which again requires simplifying constant for the type system `Y::A::{{constant}}#0`, completing the cycle
= note: ...which again requires simplifying constant for the type system `Y::A::{constant#0}`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/issue-23302-2.rs:3:1
|

View file

@ -1,15 +1,15 @@
error[E0391]: cycle detected when simplifying constant for the type system `Foo::B::{{constant}}#0`
error[E0391]: cycle detected when simplifying constant for the type system `Foo::B::{constant#0}`
--> $DIR/issue-36163.rs:4:9
|
LL | B = A,
| ^
|
note: ...which requires simplifying constant for the type system `Foo::B::{{constant}}#0`...
note: ...which requires simplifying constant for the type system `Foo::B::{constant#0}`...
--> $DIR/issue-36163.rs:4:9
|
LL | B = A,
| ^
note: ...which requires const-evaluating + checking `Foo::B::{{constant}}#0`...
note: ...which requires const-evaluating + checking `Foo::B::{constant#0}`...
--> $DIR/issue-36163.rs:4:9
|
LL | B = A,
@ -31,7 +31,7 @@ note: ...which requires const-evaluating + checking `A`...
LL | const A: isize = Foo::B as isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires normalizing `A`...
= note: ...which again requires simplifying constant for the type system `Foo::B::{{constant}}#0`, completing the cycle
= note: ...which again requires simplifying constant for the type system `Foo::B::{constant#0}`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/issue-36163.rs:1:1
|

View file

@ -4,7 +4,7 @@ note: no external requirements
LL | let mut closure = expect_sig(|p, y| *p = y);
| ^^^^^^^^^^^^^
|
= note: defining type: test::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0} with closure substs [
i16,
for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) mut &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) i32)),
(),

View file

@ -4,7 +4,7 @@ note: no external requirements
LL | let mut closure = expect_sig(|p, y| *p = y);
| ^^^^^^^^^^^^^
|
= note: defining type: test::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) mut &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32, &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32)),
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | let mut closure1 = || p = &y;
| ^^^^^^^^^
|
= note: defining type: test::{{closure}}#0::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0}::{closure#0} with closure substs [
i16,
extern "rust-call" fn(()),
(&'_#1r i32, &'_#2r mut &'_#3r i32),
@ -22,7 +22,7 @@ LL | | closure1();
LL | | };
| |_________^
|
= note: defining type: test::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0} with closure substs [
i16,
extern "rust-call" fn(()),
(&'_#1r i32, &'_#2r mut &'_#3r i32),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | let mut closure = || p = &y;
| ^^^^^^^^^
|
= note: defining type: test::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0} with closure substs [
i16,
extern "rust-call" fn(()),
(&'_#1r i32, &'_#2r mut &'_#3r i32),

View file

@ -8,7 +8,7 @@ LL | | demand_y(x, y, p)
LL | | },
| |_________^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>)),
(),

View file

@ -9,7 +9,7 @@ LL | |
LL | | });
| |_____^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>)),
(),

View file

@ -8,7 +8,7 @@ LL | |
LL | | })
| |_____^
|
= note: defining type: case1::{{closure}}#0 with closure substs [
= note: defining type: case1::{closure#0} with closure substs [
i32,
for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>)),
(),
@ -47,7 +47,7 @@ LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static
LL | | })
| |_____^
|
= note: defining type: case2::{{closure}}#0 with closure substs [
= note: defining type: case2::{closure#0} with closure substs [
i32,
for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>)),
(),

View file

@ -10,7 +10,7 @@ LL | | demand_y(x, y, x.get())
LL | | });
| |_____^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t2)) u32>)),
(),

View file

@ -10,7 +10,7 @@ LL | | demand_y(x, y, x.get())
LL | | });
| |_____^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>)),
(),

View file

@ -9,7 +9,7 @@ LL | |
LL | | });
| |_____^
|
= note: defining type: test::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>)),
(),

View file

@ -8,7 +8,7 @@ LL | | demand_y(x, y, p)
LL | | },
| |_________^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>)),
(),

View file

@ -9,7 +9,7 @@ LL | |
LL | | });
| |_____^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>)),
(),

View file

@ -9,7 +9,7 @@ LL | |
LL | | });
| |_____^
|
= note: defining type: supply::{{closure}}#0 with closure substs [
= note: defining type: supply::{closure#0} with closure substs [
i16,
for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>)),
(),

View file

@ -11,7 +11,7 @@ LL | | require(value);
LL | | });
| |_____^
|
= note: defining type: supply::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: supply::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((T,)),
(),

View file

@ -4,7 +4,7 @@ note: no external requirements
LL | expect_sig(|a, b| b); // ought to return `a`
| ^^^^^^^^
|
= note: defining type: test::{{closure}}#0 with closure substs [
= note: defining type: test::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed('s)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed('r)) i32,
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
(),
@ -40,7 +40,7 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: correct_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>,
(),
@ -67,7 +67,7 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: wrong_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
(),
@ -103,7 +103,7 @@ note: external requirements
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>,
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_late::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
@ -55,7 +55,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -105,7 +105,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -133,7 +133,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_late::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
@ -46,7 +46,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -87,7 +87,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -115,7 +115,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -143,7 +143,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: one_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),

View file

@ -4,7 +4,7 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_late::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
@ -30,7 +30,7 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -56,7 +56,7 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -82,7 +82,7 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -108,7 +108,7 @@ note: no external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: one_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_late::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_late::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -41,7 +41,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
(),
@ -77,7 +77,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>::{{closure}}#0 with closure substs [
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
(),
@ -105,7 +105,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>::{{closure}}#0 with closure substs [
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
(),
@ -133,7 +133,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>::{{closure}}#0 with closure substs [
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)),
(),
@ -161,7 +161,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: two_regions::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: two_regions::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
@ -203,7 +203,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),
@ -231,7 +231,7 @@ note: external requirements
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: one_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
= note: defining type: generic::<T>::{{closure}}#0 with closure substs [
= note: defining type: generic::<T>::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed('s)) T)),
(),
@ -29,7 +29,7 @@ note: external requirements
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
= note: defining type: generic_fail::<T>::{{closure}}#0 with closure substs [
= note: defining type: generic_fail::<T>::{closure#0} with closure substs [
i16,
for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed('s)) T)),
(),

View file

@ -4,7 +4,7 @@ note: external requirements
LL | with_signature(x, |y| y)
| ^^^^^
|
= note: defining type: no_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>,
(),

View file

@ -11,7 +11,7 @@ LL | | require(&x, &y)
LL | | })
| |_____^
|
= note: defining type: no_region::<T>::{{closure}}#0 with closure substs [
= note: defining type: no_region::<T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)),
(),
@ -62,7 +62,7 @@ LL | | require(&x, &y)
LL | | })
| |_____^
|
= note: defining type: correct_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
@ -95,7 +95,7 @@ LL | | require(&x, &y)
LL | | })
| |_____^
|
= note: defining type: wrong_region::<'_#1r, T>::{{closure}}#0 with closure substs [
= note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
(),
@ -141,7 +141,7 @@ LL | | require(&x, &y)
LL | | })
| |_____^
|
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{{closure}}#0 with closure substs [
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
(),

View file

@ -1,4 +1,4 @@
error: cannot specialize on `ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[317d]::Id[0]::This[0]) }, (I,))`
error: cannot specialize on `ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[317d]::Id::This) }, (I,))`
--> $DIR/repeated_projection_type.rs:19:1
|
LL | / impl<I, V: Id<This = (I,)>> X for V {

View file

@ -1,21 +1,21 @@
error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{{constant}}#0`
error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}`
--> $DIR/self-in-enum-definition.rs:5:10
|
LL | V3 = Self::V1 {} as u8 + 2,
| ^^^^^^^^
|
note: ...which requires simplifying constant for the type system `Alpha::V3::{{constant}}#0`...
note: ...which requires simplifying constant for the type system `Alpha::V3::{constant#0}`...
--> $DIR/self-in-enum-definition.rs:5:10
|
LL | V3 = Self::V1 {} as u8 + 2,
| ^^^^^^^^
note: ...which requires const-evaluating + checking `Alpha::V3::{{constant}}#0`...
note: ...which requires const-evaluating + checking `Alpha::V3::{constant#0}`...
--> $DIR/self-in-enum-definition.rs:5:10
|
LL | V3 = Self::V1 {} as u8 + 2,
| ^^^^^^^^
= note: ...which requires computing layout of `Alpha`...
= note: ...which again requires simplifying constant for the type system `Alpha::V3::{{constant}}#0`, completing the cycle
= note: ...which again requires simplifying constant for the type system `Alpha::V3::{constant#0}`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/self-in-enum-definition.rs:1:1
|