use crate::ty::{self, TyCtxt};
-use crate::hir::map::definitions::FIRST_FREE_HIGH_DEF_INDEX;
+use crate::hir::map::definitions::FIRST_FREE_DEF_INDEX;
use rustc_data_structures::indexed_vec::Idx;
use serialize;
use std::fmt;
/// A DefIndex is an index into the hir-map for a crate, identifying a
/// particular definition. It should really be considered an interned
/// shorthand for a particular DefPath.
-///
-/// At the moment we are allocating the numerical values of DefIndexes from two
-/// address spaces: DefIndexAddressSpace::Low and DefIndexAddressSpace::High.
-/// This allows us to allocate the DefIndexes of all item-likes
-/// (Items, TraitItems, and ImplItems) into one of these spaces and
-/// consequently use a simple array for lookup tables keyed by DefIndex and
-/// known to be densely populated. This is especially important for the HIR map.
-///
-/// Since the DefIndex is mostly treated as an opaque ID, you probably
-/// don't have to care about these address spaces.
-
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Copy)]
pub struct DefIndex(u32);
impl fmt::Debug for DefIndex {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f,
- "DefIndex({}:{})",
- self.address_space().index(),
- self.as_array_index())
+ write!(f, "DefIndex({})", self.as_array_index())
}
}
impl DefIndex {
- #[inline]
- pub fn address_space(&self) -> DefIndexAddressSpace {
- match self.0 & 1 {
- 0 => DefIndexAddressSpace::Low,
- 1 => DefIndexAddressSpace::High,
- _ => unreachable!()
- }
- }
-
/// Converts this DefIndex into a zero-based array index.
- /// This index is the offset within the given DefIndexAddressSpace.
#[inline]
pub fn as_array_index(&self) -> usize {
- (self.0 >> 1) as usize
+ self.0 as usize
}
#[inline]
- pub fn from_array_index(i: usize, address_space: DefIndexAddressSpace) -> DefIndex {
- DefIndex::from_raw_u32(((i << 1) | (address_space as usize)) as u32)
+ pub fn from_array_index(i: usize) -> DefIndex {
+ DefIndex(i as u32)
}
// Proc macros from a proc-macro crate have a kind of virtual DefIndex. This
// index of the macro in the CrateMetadata::proc_macros array) to the
// corresponding DefIndex.
pub fn from_proc_macro_index(proc_macro_index: usize) -> DefIndex {
- // DefIndex for proc macros start from FIRST_FREE_HIGH_DEF_INDEX,
- // because the first FIRST_FREE_HIGH_DEF_INDEX indexes are reserved
+ // DefIndex for proc macros start from FIRST_FREE_DEF_INDEX,
+ // because the first FIRST_FREE_DEF_INDEX indexes are reserved
// for internal use.
let def_index = DefIndex::from_array_index(
- proc_macro_index.checked_add(FIRST_FREE_HIGH_DEF_INDEX)
- .expect("integer overflow adding `proc_macro_index`"),
- DefIndexAddressSpace::High);
+ proc_macro_index.checked_add(FIRST_FREE_DEF_INDEX)
+ .expect("integer overflow adding `proc_macro_index`"));
assert!(def_index != CRATE_DEF_INDEX);
def_index
}
// This function is the reverse of from_proc_macro_index() above.
pub fn to_proc_macro_index(self: DefIndex) -> usize {
- assert_eq!(self.address_space(), DefIndexAddressSpace::High);
-
- self.as_array_index().checked_sub(FIRST_FREE_HIGH_DEF_INDEX)
+ self.as_array_index().checked_sub(FIRST_FREE_DEF_INDEX)
.unwrap_or_else(|| {
bug!("using local index {:?} as proc-macro index", self)
})
}
- // Don't use this if you don't know about the DefIndex encoding.
pub fn from_raw_u32(x: u32) -> DefIndex {
DefIndex(x)
}
- // Don't use this if you don't know about the DefIndex encoding.
pub fn as_raw_u32(&self) -> u32 {
self.0
}
impl serialize::UseSpecializedEncodable for DefIndex {}
impl serialize::UseSpecializedDecodable for DefIndex {}
-#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
-pub enum DefIndexAddressSpace {
- Low = 0,
- High = 1,
-}
-
-impl DefIndexAddressSpace {
- #[inline]
- pub fn index(&self) -> usize {
- *self as usize
- }
-}
-
/// A `DefId` identifies a particular *definition*, by combining a crate
/// index and a def index.
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Copy)]
impl fmt::Debug for DefId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "DefId({}/{}:{}",
- self.krate,
- self.index.address_space().index(),
- self.index.as_array_index())?;
+ write!(f, "DefId({}:{}", self.krate, self.index.as_array_index())?;
ty::tls::with_opt(|opt_tcx| {
if let Some(tcx) = opt_tcx {
use crate::hir::{self, ParamName};
use crate::hir::HirVec;
use crate::hir::map::{DefKey, DefPathData, Definitions};
-use crate::hir::def_id::{DefId, DefIndex, DefIndexAddressSpace, CRATE_DEF_INDEX};
+use crate::hir::def_id::{DefId, DefIndex, CRATE_DEF_INDEX};
use crate::hir::def::{Res, DefKind, PartialRes, PerNS};
use crate::hir::{GenericArg, ConstArg};
use crate::lint::builtin::{self, PARENTHESIZED_PARAMS_IN_TYPES_AND_MODULES,
owner,
id,
DefPathData::Misc,
- DefIndexAddressSpace::High,
Mark::root(),
tree.prefix.span,
);
parent_index,
node_id,
DefPathData::LifetimeNs(str_name),
- DefIndexAddressSpace::High,
Mark::root(),
span,
);
self.parent,
def_node_id,
DefPathData::LifetimeNs(name.ident().as_interned_str()),
- DefIndexAddressSpace::High,
Mark::root(),
lifetime.span,
);
);
}
- let (lo, hi) = definitions.def_index_counts_lo_hi();
-
let mut collector = NodeCollector {
krate,
source_map: sess.source_map(),
- map: [
- repeat(None).take(lo).collect(),
- repeat(None).take(hi).collect(),
- ],
+ map: vec![None; definitions.def_index_count()],
parent_node: hir::CRATE_HIR_ID,
current_signature_dep_index: root_mod_sig_dep_index,
current_full_dep_index: root_mod_full_dep_index,
fn insert_entry(&mut self, id: HirId, entry: Entry<'hir>) {
debug!("hir_map: {:?} => {:?}", id, entry);
- let local_map = &mut self.map[id.owner.address_space().index()][id.owner.as_array_index()];
+ let local_map = &mut self.map[id.owner.as_array_index()];
let i = id.local_id.as_u32() as usize;
if local_map.is_none() {
*local_map = Some(IndexVec::with_capacity(i + 1));
use crate::hir::map::definitions::*;
-use crate::hir::def_id::{CRATE_DEF_INDEX, DefIndex, DefIndexAddressSpace};
+use crate::hir::def_id::{CRATE_DEF_INDEX, DefIndex};
use crate::session::CrateDisambiguator;
use syntax::ast::*;
use syntax::parse::token::{self, Token};
use syntax_pos::Span;
-use crate::hir::map::{ITEM_LIKE_SPACE, REGULAR_SPACE};
-
/// Creates `DefId`s for nodes in the AST.
pub struct DefCollector<'a> {
definitions: &'a mut Definitions,
fn create_def(&mut self,
node_id: NodeId,
data: DefPathData,
- address_space: DefIndexAddressSpace,
span: Span)
-> DefIndex {
let parent_def = self.parent_def.unwrap();
debug!("create_def(node_id={:?}, data={:?}, parent_def={:?})", node_id, data, parent_def);
self.definitions
- .create_def_with_parent(parent_def, node_id, data, address_space, self.expansion, span)
+ .create_def_with_parent(parent_def, node_id, data, self.expansion, span)
}
pub fn with_parent<F: FnOnce(&mut Self)>(&mut self, parent_def: DefIndex, f: F) {
// For async functions, we need to create their inner defs inside of a
// closure to match their desugared representation.
let fn_def_data = DefPathData::ValueNs(name.as_interned_str());
- let fn_def = self.create_def(id, fn_def_data, ITEM_LIKE_SPACE, span);
+ let fn_def = self.create_def(id, fn_def_data, span);
return self.with_parent(fn_def, |this| {
- this.create_def(*return_impl_trait_id, DefPathData::ImplTrait, REGULAR_SPACE, span);
+ this.create_def(*return_impl_trait_id, DefPathData::ImplTrait, span);
visit::walk_generics(this, generics);
visit::walk_fn_ret_ty(this, &decl.output);
let closure_def = this.create_def(
- *closure_id, DefPathData::ClosureExpr, REGULAR_SPACE, span,
+ *closure_id, DefPathData::ClosureExpr, span,
);
this.with_parent(closure_def, |this| {
use visit::Visitor;
return visit::walk_item(self, i);
}
};
- let def = self.create_def(i.id, def_data, ITEM_LIKE_SPACE, i.span);
+ let def = self.create_def(i.id, def_data, i.span);
self.with_parent(def, |this| {
match i.node {
ItemKind::Struct(ref struct_def, _) | ItemKind::Union(ref struct_def, _) => {
// If this is a unit or tuple-like struct, register the constructor.
if let Some(ctor_hir_id) = struct_def.ctor_id() {
- this.create_def(ctor_hir_id, DefPathData::Ctor, REGULAR_SPACE, i.span);
+ this.create_def(ctor_hir_id, DefPathData::Ctor, i.span);
}
}
_ => {}
}
fn visit_use_tree(&mut self, use_tree: &'a UseTree, id: NodeId, _nested: bool) {
- self.create_def(id, DefPathData::Misc, ITEM_LIKE_SPACE, use_tree.span);
+ self.create_def(id, DefPathData::Misc, use_tree.span);
visit::walk_use_tree(self, use_tree, id);
}
let def = self.create_def(foreign_item.id,
DefPathData::ValueNs(foreign_item.ident.as_interned_str()),
- REGULAR_SPACE,
foreign_item.span);
self.with_parent(def, |this| {
fn visit_variant(&mut self, v: &'a Variant, g: &'a Generics, item_id: NodeId) {
let def = self.create_def(v.node.id,
DefPathData::TypeNs(v.node.ident.as_interned_str()),
- REGULAR_SPACE,
v.span);
self.with_parent(def, |this| {
if let Some(ctor_hir_id) = v.node.data.ctor_id() {
- this.create_def(ctor_hir_id, DefPathData::Ctor, REGULAR_SPACE, v.span);
+ this.create_def(ctor_hir_id, DefPathData::Ctor, v.span);
}
visit::walk_variant(this, v, g, item_id)
});
.unwrap_or_else(|| Symbol::intern(&index.to_string()));
let def = self.create_def(field.id,
DefPathData::ValueNs(name.as_interned_str()),
- REGULAR_SPACE,
field.span);
self.with_parent(def, |this| this.visit_struct_field(field));
}
GenericParamKind::Type { .. } => DefPathData::TypeNs(name),
GenericParamKind::Const { .. } => DefPathData::ValueNs(name),
};
- self.create_def(param.id, def_path_data, REGULAR_SPACE, param.ident.span);
+ self.create_def(param.id, def_path_data, param.ident.span);
visit::walk_generic_param(self, param);
}
TraitItemKind::Macro(..) => return self.visit_macro_invoc(ti.id),
};
- let def = self.create_def(ti.id, def_data, ITEM_LIKE_SPACE, ti.span);
+ let def = self.create_def(ti.id, def_data, ti.span);
self.with_parent(def, |this| visit::walk_trait_item(this, ti));
}
ImplItemKind::Macro(..) => return self.visit_macro_invoc(ii.id),
};
- let def = self.create_def(ii.id, def_data, ITEM_LIKE_SPACE, ii.span);
+ let def = self.create_def(ii.id, def_data, ii.span);
self.with_parent(def, |this| visit::walk_impl_item(this, ii));
}
fn visit_anon_const(&mut self, constant: &'a AnonConst) {
let def = self.create_def(constant.id,
DefPathData::AnonConst,
- REGULAR_SPACE,
constant.value.span);
self.with_parent(def, |this| visit::walk_anon_const(this, constant));
}
ExprKind::Closure(_, ref asyncness, ..) => {
let closure_def = self.create_def(expr.id,
DefPathData::ClosureExpr,
- REGULAR_SPACE,
expr.span);
self.parent_def = Some(closure_def);
if let IsAsync::Async { closure_id, .. } = asyncness {
let async_def = self.create_def(*closure_id,
DefPathData::ClosureExpr,
- REGULAR_SPACE,
expr.span);
self.parent_def = Some(async_def);
}
ExprKind::Async(_, async_id, _) => {
let async_def = self.create_def(async_id,
DefPathData::ClosureExpr,
- REGULAR_SPACE,
expr.span);
self.parent_def = Some(async_def);
}
match ty.node {
TyKind::Mac(..) => return self.visit_macro_invoc(ty.id),
TyKind::ImplTrait(node_id, _) => {
- self.create_def(node_id, DefPathData::ImplTrait, REGULAR_SPACE, ty.span);
+ self.create_def(node_id, DefPathData::ImplTrait, ty.span);
}
_ => {}
}
//! expressions) that are mostly just leftovers.
use crate::hir;
-use crate::hir::def_id::{CrateNum, DefId, DefIndex, LOCAL_CRATE, DefIndexAddressSpace,
- CRATE_DEF_INDEX};
+use crate::hir::def_id::{CrateNum, DefId, DefIndex, LOCAL_CRATE, CRATE_DEF_INDEX};
use crate::ich::Fingerprint;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::indexed_vec::{IndexVec};
/// Internally the DefPathTable holds a tree of DefKeys, where each DefKey
/// stores the DefIndex of its parent.
/// There is one DefPathTable for each crate.
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct DefPathTable {
- index_to_key: [Vec<DefKey>; 2],
- def_path_hashes: [Vec<DefPathHash>; 2],
-}
-
-// Unfortunately we have to provide a manual impl of Clone because of the
-// fixed-sized array field.
-impl Clone for DefPathTable {
- fn clone(&self) -> Self {
- DefPathTable {
- index_to_key: [self.index_to_key[0].clone(),
- self.index_to_key[1].clone()],
- def_path_hashes: [self.def_path_hashes[0].clone(),
- self.def_path_hashes[1].clone()],
- }
- }
+ index_to_key: Vec<DefKey>,
+ def_path_hashes: Vec<DefPathHash>,
}
impl DefPathTable {
fn allocate(&mut self,
key: DefKey,
- def_path_hash: DefPathHash,
- address_space: DefIndexAddressSpace)
+ def_path_hash: DefPathHash)
-> DefIndex {
let index = {
- let index_to_key = &mut self.index_to_key[address_space.index()];
- let index = DefIndex::from_array_index(index_to_key.len(), address_space);
+ let index = DefIndex::from_array_index(self.index_to_key.len());
debug!("DefPathTable::insert() - {:?} <-> {:?}", key, index);
- index_to_key.push(key);
+ self.index_to_key.push(key);
index
};
- self.def_path_hashes[address_space.index()].push(def_path_hash);
- debug_assert!(self.def_path_hashes[address_space.index()].len() ==
- self.index_to_key[address_space.index()].len());
+ self.def_path_hashes.push(def_path_hash);
+ debug_assert!(self.def_path_hashes.len() == self.index_to_key.len());
index
}
- pub fn next_id(&self, address_space: DefIndexAddressSpace) -> DefIndex {
- DefIndex::from_array_index(self.index_to_key[address_space.index()].len(), address_space)
+ pub fn next_id(&self) -> DefIndex {
+ DefIndex::from_array_index(self.index_to_key.len())
}
#[inline(always)]
pub fn def_key(&self, index: DefIndex) -> DefKey {
- self.index_to_key[index.address_space().index()]
- [index.as_array_index()].clone()
+ self.index_to_key[index.as_array_index()].clone()
}
#[inline(always)]
pub fn def_path_hash(&self, index: DefIndex) -> DefPathHash {
- let ret = self.def_path_hashes[index.address_space().index()]
- [index.as_array_index()];
+ let ret = self.def_path_hashes[index.as_array_index()];
debug!("def_path_hash({:?}) = {:?}", index, ret);
return ret
}
pub fn add_def_path_hashes_to(&self,
cnum: CrateNum,
out: &mut FxHashMap<DefPathHash, DefId>) {
- for &address_space in &[DefIndexAddressSpace::Low, DefIndexAddressSpace::High] {
- out.extend(
- (&self.def_path_hashes[address_space.index()])
- .iter()
- .enumerate()
- .map(|(index, &hash)| {
- let def_id = DefId {
- krate: cnum,
- index: DefIndex::from_array_index(index, address_space),
- };
- (hash, def_id)
- })
- );
- }
+ out.extend(
+ self.def_path_hashes
+ .iter()
+ .enumerate()
+ .map(|(index, &hash)| {
+ let def_id = DefId {
+ krate: cnum,
+ index: DefIndex::from_array_index(index),
+ };
+ (hash, def_id)
+ })
+ );
}
pub fn size(&self) -> usize {
- self.index_to_key.iter().map(|v| v.len()).sum()
+ self.index_to_key.len()
}
}
impl Encodable for DefPathTable {
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
// Index to key
- self.index_to_key[DefIndexAddressSpace::Low.index()].encode(s)?;
- self.index_to_key[DefIndexAddressSpace::High.index()].encode(s)?;
+ self.index_to_key.encode(s)?;
// DefPath hashes
- self.def_path_hashes[DefIndexAddressSpace::Low.index()].encode(s)?;
- self.def_path_hashes[DefIndexAddressSpace::High.index()].encode(s)?;
+ self.def_path_hashes.encode(s)?;
Ok(())
}
impl Decodable for DefPathTable {
fn decode<D: Decoder>(d: &mut D) -> Result<DefPathTable, D::Error> {
- let index_to_key_lo: Vec<DefKey> = Decodable::decode(d)?;
- let index_to_key_hi: Vec<DefKey> = Decodable::decode(d)?;
-
- let def_path_hashes_lo: Vec<DefPathHash> = Decodable::decode(d)?;
- let def_path_hashes_hi: Vec<DefPathHash> = Decodable::decode(d)?;
-
- let index_to_key = [index_to_key_lo, index_to_key_hi];
- let def_path_hashes = [def_path_hashes_lo, def_path_hashes_hi];
-
Ok(DefPathTable {
- index_to_key,
- def_path_hashes,
+ index_to_key: Decodable::decode(d)?,
+ def_path_hashes : Decodable::decode(d)?,
})
}
}
pub struct Definitions {
table: DefPathTable,
node_to_def_index: NodeMap<DefIndex>,
- def_index_to_node: [Vec<ast::NodeId>; 2],
+ def_index_to_node: Vec<ast::NodeId>,
pub(super) node_to_hir_id: IndexVec<ast::NodeId, hir::HirId>,
/// If `Mark` is an ID of some macro expansion,
/// then `DefId` is the normal module (`mod`) in which the expanded macro was defined.
}
impl Definitions {
- /// Creates new empty definition map.
- ///
- /// The `DefIndex` returned from a new `Definitions` are as follows:
- /// 1. At `DefIndexAddressSpace::Low`,
- /// CRATE_ROOT has index 0:0, and then new indexes are allocated in
- /// ascending order.
- /// 2. At `DefIndexAddressSpace::High`,
- /// the first `FIRST_FREE_HIGH_DEF_INDEX` indexes are reserved for
- /// internal use, then `1:FIRST_FREE_HIGH_DEF_INDEX` are allocated in
- /// ascending order.
- //
- // FIXME: there is probably a better place to put this comment.
- pub fn new() -> Self {
- Self::default()
- }
-
pub fn def_path_table(&self) -> &DefPathTable {
&self.table
}
/// Gets the number of definitions.
- pub fn def_index_counts_lo_hi(&self) -> (usize, usize) {
- (self.table.index_to_key[DefIndexAddressSpace::Low.index()].len(),
- self.table.index_to_key[DefIndexAddressSpace::High.index()].len())
+ pub fn def_index_count(&self) -> usize {
+ self.table.index_to_key.len()
}
pub fn def_key(&self, index: DefIndex) -> DefKey {
#[inline]
pub fn as_local_node_id(&self, def_id: DefId) -> Option<ast::NodeId> {
if def_id.krate == LOCAL_CRATE {
- let space_index = def_id.index.address_space().index();
- let array_index = def_id.index.as_array_index();
- let node_id = self.def_index_to_node[space_index][array_index];
+ let node_id = self.def_index_to_node[def_id.index.as_array_index()];
if node_id != ast::DUMMY_NODE_ID {
- Some(node_id)
- } else {
- None
+ return Some(node_id);
}
- } else {
- None
}
+ None
}
// FIXME(@ljedrz): replace the NodeId variant
#[inline]
pub fn def_index_to_hir_id(&self, def_index: DefIndex) -> hir::HirId {
- let space_index = def_index.address_space().index();
- let array_index = def_index.as_array_index();
- let node_id = self.def_index_to_node[space_index][array_index];
+ let node_id = self.def_index_to_node[def_index.as_array_index()];
self.node_to_hir_id[node_id]
}
}
}
- /// Adds a root definition (no parent).
+ /// Adds a root definition (no parent) and a few other reserved definitions.
+ ///
+ /// After the initial definitions are created the first `FIRST_FREE_DEF_INDEX` indexes
+ /// are taken, so the "user" indexes will be allocated starting with `FIRST_FREE_DEF_INDEX`
+ /// in ascending order.
pub fn create_root_def(&mut self,
crate_name: &str,
crate_disambiguator: CrateDisambiguator)
let def_path_hash = key.compute_stable_hash(parent_hash);
// Create the definition.
- let address_space = super::ITEM_LIKE_SPACE;
- let root_index = self.table.allocate(key, def_path_hash, address_space);
+ let root_index = self.table.allocate(key, def_path_hash);
assert_eq!(root_index, CRATE_DEF_INDEX);
- assert!(self.def_index_to_node[address_space.index()].is_empty());
- self.def_index_to_node[address_space.index()].push(ast::CRATE_NODE_ID);
+ assert!(self.def_index_to_node.is_empty());
+ self.def_index_to_node.push(ast::CRATE_NODE_ID);
self.node_to_def_index.insert(ast::CRATE_NODE_ID, root_index);
// Allocate some other DefIndices that always must exist.
parent: DefIndex,
node_id: ast::NodeId,
data: DefPathData,
- address_space: DefIndexAddressSpace,
expansion: Mark,
span: Span)
-> DefIndex {
debug!("create_def_with_parent: after disambiguation, key = {:?}", key);
// Create the definition.
- let index = self.table.allocate(key, def_path_hash, address_space);
- assert_eq!(index.as_array_index(),
- self.def_index_to_node[address_space.index()].len());
- self.def_index_to_node[address_space.index()].push(node_id);
+ let index = self.table.allocate(key, def_path_hash);
+ assert_eq!(index.as_array_index(), self.def_index_to_node.len());
+ self.def_index_to_node.push(node_id);
// Some things for which we allocate DefIndices don't correspond to
// anything in the AST, so they don't have a NodeId. For these cases
$($variant),*
}
- const GLOBAL_MD_ADDRESS_SPACE: DefIndexAddressSpace = DefIndexAddressSpace::High;
- pub const FIRST_FREE_HIGH_DEF_INDEX: usize = count!($($variant)*);
+ pub const FIRST_FREE_DEF_INDEX: usize = 1 + count!($($variant)*);
impl GlobalMetaDataKind {
fn allocate_def_indices(definitions: &mut Definitions) {
CRATE_DEF_INDEX,
ast::DUMMY_NODE_ID,
DefPathData::GlobalMetaData(instance.name().as_interned_str()),
- GLOBAL_MD_ADDRESS_SPACE,
Mark::root(),
DUMMY_SP
);
// These DefKeys are all right after the root,
// so a linear search is fine.
- let index = def_path_table.index_to_key[GLOBAL_MD_ADDRESS_SPACE.index()]
+ let index = def_path_table.index_to_key
.iter()
.position(|k| *k == def_key)
.unwrap();
- DefIndex::from_array_index(index, GLOBAL_MD_ADDRESS_SPACE)
+ DefIndex::from_array_index(index)
}
fn name(&self) -> Symbol {
use crate::dep_graph::{DepGraph, DepNode, DepKind, DepNodeIndex};
-use crate::hir::def_id::{CRATE_DEF_INDEX, DefId, LocalDefId, DefIndexAddressSpace};
+use crate::hir::def_id::{CRATE_DEF_INDEX, DefId, LocalDefId};
use crate::middle::cstore::CrateStoreDyn;
pub mod definitions;
mod hir_id_validator;
-pub const ITEM_LIKE_SPACE: DefIndexAddressSpace = DefIndexAddressSpace::Low;
-pub const REGULAR_SPACE: DefIndexAddressSpace = DefIndexAddressSpace::High;
-
/// Represents an entry and its parent `NodeId`.
#[derive(Copy, Clone, Debug)]
pub struct Entry<'hir> {
}
/// This type is effectively a `HashMap<HirId, Entry<'hir>>`,
-/// but is implemented by 3 layers of arrays.
-/// - the outer layer is `[A; 2]` and correspond to the 2 address spaces `DefIndex`es can be in
-/// - then we have `A = Vec<Option<B>>` mapping a `DefIndex`'s index to a inner value
-/// - which is `B = IndexVec<ItemLocalId, Option<Entry<'hir>>` which finally gives you the `Entry`.
-pub(super) type HirEntryMap<'hir> = [Vec<Option<IndexVec<ItemLocalId, Option<Entry<'hir>>>>>; 2];
+/// but it is implemented as 2 layers of arrays.
+/// - first we have `A = Vec<Option<B>>` mapping a `DefIndex`'s index to an inner value
+/// - which is `B = IndexVec<ItemLocalId, Option<Entry<'hir>>` which gives you the `Entry`.
+pub(super) type HirEntryMap<'hir> = Vec<Option<IndexVec<ItemLocalId, Option<Entry<'hir>>>>>;
/// Represents a mapping from `NodeId`s to AST elements and their parent `NodeId`s.
#[derive(Clone)]
impl<'hir> Map<'hir> {
#[inline]
fn lookup(&self, id: HirId) -> Option<&Entry<'hir>> {
- let local_map = self.map[id.owner.address_space().index()].get(id.owner.as_array_index())?;
+ let local_map = self.map.get(id.owner.as_array_index())?;
local_map.as_ref()?.get(id.local_id)?.as_ref()
}
/// Returns an iterator that yields all the hir ids in the map.
fn all_ids<'a>(&'a self) -> impl Iterator<Item = HirId> + 'a {
- // This code is a bit awkward because the map is implemented as 3 levels of arrays,
+ // This code is a bit awkward because the map is implemented as 2 levels of arrays,
// see the comment on `HirEntryMap`.
- let map = &self.map;
-
- // Look at both the def index address spaces
- let spaces = [DefIndexAddressSpace::Low, DefIndexAddressSpace::High].iter().cloned();
- spaces.flat_map(move |space| {
- // Iterate over all the indices in the address space and return a reference to
- // local maps and their index given that they exist.
- let local_maps = map[space.index()].iter().enumerate().filter_map(|(i, local_map)| {
- local_map.as_ref().map(|m| (i, m))
- });
-
- local_maps.flat_map(move |(array_index, local_map)| {
- // Iterate over each valid entry in the local map
- local_map.iter_enumerated().filter_map(move |(i, entry)| entry.map(move |_| {
- // Reconstruct the HirId based on the 3 indices we used to find it
- HirId {
- owner: DefIndex::from_array_index(array_index, space),
- local_id: i,
- }
- }))
- })
+ // Iterate over all the indices and return a reference to
+ // local maps and their index given that they exist.
+ self.map.iter().enumerate().filter_map(|(i, local_map)| {
+ local_map.as_ref().map(|m| (i, m))
+ }).flat_map(move |(array_index, local_map)| {
+ // Iterate over each valid entry in the local map
+ local_map.iter_enumerated().filter_map(move |(i, entry)| entry.map(move |_| {
+ // Reconstruct the HirId based on the 3 indices we used to find it
+ HirId {
+ owner: DefIndex::from_array_index(array_index),
+ local_id: i,
+ }
+ }))
})
}
// negated `CrateNum` (so remote definitions are visited first) and then
// by a flattened version of the `DefIndex`.
trait_impls.sort_unstable_by_key(|def_id| {
- (-(def_id.krate.as_u32() as i64),
- def_id.index.address_space().index(),
- def_id.index.as_array_index())
+ (-(def_id.krate.as_u32() as i64), def_id.index.as_array_index())
});
for impl_def_id in trait_impls {
// alphanumeric. This does not appear in the rendered graph, so it does not
// have to be user friendly.
let name = format!(
- "hir_id_{}_{}_{}",
- hir_id.owner.address_space().index(),
+ "hir_id_{}_{}",
hir_id.owner.as_array_index(),
hir_id.local_id.index(),
);
use rustc::middle::cstore::LinkagePreference;
use rustc::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel};
use rustc::hir::def::{self, Res, DefKind, CtorOf, CtorKind};
-use rustc::hir::def_id::{CrateNum, DefId, DefIndex, DefIndexAddressSpace,
- CRATE_DEF_INDEX, LOCAL_CRATE, LocalDefId};
+use rustc::hir::def_id::{CrateNum, DefId, DefIndex, LocalDefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use rustc::hir::map::definitions::DefPathTable;
use rustc_data_structures::fingerprint::Fingerprint;
use rustc::middle::lang_items;
proc_macros: &[(ast::Name, Lrc<SyntaxExtension>)])
-> DefPathTable
{
- let mut definitions = Definitions::new();
+ let mut definitions = Definitions::default();
let name = crate_root.name.as_str();
let disambiguator = crate_root.disambiguator;
crate_root,
ast::DUMMY_NODE_ID,
DefPathData::MacroNs(name.as_interned_str()),
- DefIndexAddressSpace::High,
Mark::root(),
DUMMY_SP);
debug!("definition for {:?} is {:?}", name, def_index);
use crate::schema::*;
-use rustc::hir::def_id::{DefId, DefIndex, DefIndexAddressSpace};
+use rustc::hir::def_id::{DefId, DefIndex};
use rustc_serialize::opaque::Encoder;
use std::u32;
use log::debug;
/// appropriate spot by calling `record_position`. We should never
/// visit the same index twice.
pub struct Index {
- positions: [Vec<u8>; 2]
+ positions: Vec<u8>,
}
impl Index {
- pub fn new((max_index_lo, max_index_hi): (usize, usize)) -> Index {
+ pub fn new(max_index: usize) -> Index {
Index {
- positions: [vec![0xff; max_index_lo * 4],
- vec![0xff; max_index_hi * 4]],
+ positions: vec![0xff; max_index * 4],
}
}
pub fn record_index(&mut self, item: DefIndex, entry: Lazy<Entry<'_>>) {
assert!(entry.position < (u32::MAX as usize));
let position = entry.position as u32;
- let space_index = item.address_space().index();
let array_index = item.as_array_index();
- let positions = &mut self.positions[space_index];
+ let positions = &mut self.positions;
assert!(u32::read_from_bytes_at(positions, array_index) == u32::MAX,
"recorded position for item {:?} twice, first at {:?} and now at {:?}",
item,
let pos = buf.position();
// First we write the length of the lower range ...
- buf.emit_raw_bytes(&(self.positions[0].len() as u32 / 4).to_le_bytes());
- // ... then the values in the lower range ...
- buf.emit_raw_bytes(&self.positions[0]);
- // ... then the values in the higher range.
- buf.emit_raw_bytes(&self.positions[1]);
- LazySeq::with_position_and_length(pos as usize,
- (self.positions[0].len() + self.positions[1].len()) / 4 + 1)
+ buf.emit_raw_bytes(&(self.positions.len() as u32 / 4).to_le_bytes());
+ // ... then the values.
+ buf.emit_raw_bytes(&self.positions);
+ LazySeq::with_position_and_length(pos as usize, self.positions.len() / 4 + 1)
}
}
def_index,
self.len);
- let i = def_index.as_array_index() + match def_index.address_space() {
- DefIndexAddressSpace::Low => 0,
- DefIndexAddressSpace::High => {
- // This is a DefIndex in the higher range, so find out where
- // that starts:
- u32::read_from_bytes_at(bytes, 0) as usize
- }
- };
-
- let position = u32::read_from_bytes_at(bytes, 1 + i);
+ let position = u32::read_from_bytes_at(bytes, 1 + def_index.as_array_index());
if position == u32::MAX {
debug!("Index::lookup: position=u32::MAX");
None
impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx> {
pub fn new(ecx: &'a mut EncodeContext<'b, 'tcx>) -> Self {
IndexBuilder {
- items: Index::new(ecx.tcx.hir().definitions().def_index_counts_lo_hi()),
+ items: Index::new(ecx.tcx.hir().definitions().def_index_count()),
ecx,
}
}
// it does not have to be user friendly.
pub fn graphviz_safe_def_name(def_id: DefId) -> String {
format!(
- "{}_{}_{}",
+ "{}_{}",
def_id.krate.index(),
- def_id.index.address_space().index(),
def_id.index.as_array_index(),
)
}
let mut module_map = FxHashMap::default();
module_map.insert(DefId::local(CRATE_DEF_INDEX), graph_root);
- let mut definitions = Definitions::new();
+ let mut definitions = Definitions::default();
DefCollector::new(&mut definitions, Mark::root())
.collect_root(crate_name, session.local_crate_disambiguator());
use crate::Namespace::*;
use crate::build_reduced_graph::{BuildReducedGraphVisitor, IsMacroExport};
use crate::resolve_imports::ImportResolver;
-use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX, DefIndex,
- CrateNum, DefIndexAddressSpace};
+use rustc::hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX};
use rustc::hir::def::{self, DefKind, NonMacroAttrKind};
use rustc::hir::map::{self, DefCollector};
use rustc::{ty, lint};
fn add_builtin(&mut self, ident: ast::Ident, ext: Lrc<SyntaxExtension>) {
let def_id = DefId {
krate: CrateNum::BuiltinMacros,
- index: DefIndex::from_array_index(self.macro_map.len(),
- DefIndexAddressSpace::Low),
+ index: DefIndex::from_array_index(self.macro_map.len()),
};
let kind = ext.kind();
self.macro_map.insert(def_id, ext);
use rustc_lint;
use rustc::session::{self, config};
-use rustc::hir::def_id::{DefId, DefIndex, DefIndexAddressSpace, CrateNum, LOCAL_CRATE};
+use rustc::hir::def_id::{DefId, DefIndex, CrateNum, LOCAL_CRATE};
use rustc::hir::HirId;
use rustc::middle::cstore::CrateStore;
use rustc::middle::privacy::AccessLevels;
// registered after the AST is constructed would require storing the defid mapping in a
// RefCell, decreasing the performance for normal compilation for very little gain.
//
- // Instead, we construct 'fake' def ids, which start immediately after the last DefId in
- // DefIndexAddressSpace::Low. In the Debug impl for clean::Item, we explicitly check for fake
+ // Instead, we construct 'fake' def ids, which start immediately after the last DefId.
+ // In the Debug impl for clean::Item, we explicitly check for fake
// def ids, as we'll end up with a panic if we use the DefId Debug impl for fake DefIds
pub fn next_def_id(&self, crate_num: CrateNum) -> DefId {
let start_def_id = {
.hir()
.definitions()
.def_path_table()
- .next_id(DefIndexAddressSpace::Low)
+ .next_id()
} else {
self.cstore
.def_path_table(crate_num)
- .next_id(DefIndexAddressSpace::Low)
+ .next_id()
};
DefId {
crate_num,
DefId {
krate: crate_num,
- index: DefIndex::from_array_index(
- def_id.index.as_array_index() + 1,
- def_id.index.address_space(),
- ),
+ index: DefIndex::from_array_index(def_id.index.as_array_index() + 1),
},
);
// END RUST SOURCE
// START rustc.main.mir_map.0.dot
-// digraph Mir_0_0_3 { // The name here MUST be an ASCII identifier.
+// digraph Mir_0_12 { // The name here MUST be an ASCII identifier.
// graph [fontname="monospace"];
// node [fontname="monospace"];
// edge [fontname="monospace"];
// ...
// bb0: {
// ...
-// _3 = [closure@HirId { owner: DefIndex(0:4), local_id: 31 }];
+// _3 = [closure@HirId { owner: DefIndex(13), local_id: 31 }];
// ...
// _4 = &_3;
// ...
// ...
// bb0: {
// ...
-// _3 = [closure@HirId { owner: DefIndex(0:4), local_id: 15 }];
+// _3 = [closure@HirId { owner: DefIndex(13), local_id: 15 }];
// ...
// _4 = &_3;
// ...
// }
// END rustc.main.EraseRegions.after.mir
// START rustc.main-{{closure}}.EraseRegions.after.mir
-// fn main::{{closure}}#0(_1: &[closure@HirId { owner: DefIndex(0:7), local_id: 72 }], _2: &i32) -> &i32 {
+// fn main::{{closure}}#0(_1: &[closure@HirId { owner: DefIndex(20), local_id: 72 }], _2: &i32) -> &i32 {
// ...
// bb0: {
// Retag([fn entry] _1);
LL | let mut closure = expect_sig(|p, y| *p = y);
| ^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:13 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) i32)),
+ for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) i32)),
]
error: lifetime may not live long enough
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:3 ~ escape_argument_callee[317d]::test[0]) with substs []
+ = note: defining type: DefId(0:12 ~ escape_argument_callee[317d]::test[0]) with substs []
error: aborting due to previous error
LL | let mut closure = expect_sig(|p, y| *p = y);
| ^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:9 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:13 ~ escape_argument[317d]::test[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)),
+ for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32)),
]
note: No external requirements
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:3 ~ escape_argument[317d]::test[0]) with substs []
+ = note: defining type: DefId(0:12 ~ escape_argument[317d]::test[0]) with substs []
error[E0597]: `y` does not live long enough
--> $DIR/escape-argument.rs:27:25
LL | let mut closure1 = || p = &y;
| ^^^^^^^^^
|
- = note: defining type: DefId(0/1:10 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:14 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]::{{closure}}[0]) with closure substs [
i16,
extern "rust-call" fn(()),
&'_#1r mut &'_#2r i32,
LL | | };
| |_________^
|
- = note: defining type: DefId(0/1:9 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:13 ~ escape_upvar_nested[317d]::test[0]::{{closure}}[0]) with closure substs [
i16,
extern "rust-call" fn(()),
&'_#1r mut &'_#2r i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:3 ~ escape_upvar_nested[317d]::test[0]) with substs []
+ = note: defining type: DefId(0:12 ~ escape_upvar_nested[317d]::test[0]) with substs []
error[E0597]: `y` does not live long enough
--> $DIR/escape-upvar-nested.rs:21:40
LL | let mut closure = || p = &y;
| ^^^^^^^^^
|
- = note: defining type: DefId(0/1:9 ~ escape_upvar_ref[317d]::test[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:13 ~ escape_upvar_ref[317d]::test[0]::{{closure}}[0]) with closure substs [
i16,
extern "rust-call" fn(()),
&'_#1r mut &'_#2r i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:3 ~ escape_upvar_ref[317d]::test[0]) with substs []
+ = note: defining type: DefId(0:12 ~ escape_upvar_ref[317d]::test[0]) with substs []
error[E0597]: `y` does not live long enough
--> $DIR/escape-upvar-ref.rs:23:35
LL | | },
| |_________^
|
- = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:27 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)),
+ for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)),
]
= note: late-bound region is '_#4r
= note: late-bound region is '_#5r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:23 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs []
error: aborting due to previous error
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:25 ~ propagate_approximated_ref[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)),
+ for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>)),
]
= note: late-bound region is '_#3r
= note: late-bound region is '_#4r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:22 ~ propagate_approximated_ref[317d]::supply[0]) with substs []
error: lifetime may not live long enough
--> $DIR/propagate-approximated-ref.rs:45:9
LL | | })
| |_____^
|
- = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:18 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [
i32,
- for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)),
+ for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>)),
]
error[E0521]: borrowed data escapes outside of closure
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs []
+ = note: defining type: DefId(0:17 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs []
note: External requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15
LL | | })
| |_____^
|
- = note: defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:20 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [
i32,
- for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>)),
+ for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>)),
]
= note: number of external vids: 2
= note: where '_#1r: '_#0r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs []
+ = note: defining type: DefId(0:19 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs []
error[E0597]: `a` does not live long enough
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:30:26
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:25 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>)),
+ for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) u32>)),
]
= note: late-bound region is '_#2r
= note: late-bound region is '_#3r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:22 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []
error[E0521]: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:5
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:25 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)),
+ for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>)),
]
= note: late-bound region is '_#3r
= note: late-bound region is '_#4r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:22 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []
error[E0521]: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:5
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:25 ~ propagate_approximated_val[317d]::test[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)),
+ for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)),
]
= note: late-bound region is '_#3r
= note: late-bound region is '_#4r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_approximated_val[317d]::test[0]) with substs []
+ = note: defining type: DefId(0:22 ~ propagate_approximated_val[317d]::test[0]) with substs []
error: lifetime may not live long enough
--> $DIR/propagate-approximated-val.rs:38:9
LL | | },
| |_________^
|
- = note: defining type: DefId(0/1:16 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:23 ~ propagate_despite_same_free_region[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)),
+ for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)),
]
= note: late-bound region is '_#3r
= note: number of external vids: 4
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:21 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs []
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:25 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>)),
+ for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>)),
]
= note: late-bound region is '_#2r
= note: late-bound region is '_#3r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:22 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs []
error: aborting due to previous error
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:25 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>)),
+ for<'r, 's, 't0, 't1, 't2, 't3> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 't1)) u32>)),
]
= note: late-bound region is '_#3r
= note: late-bound region is '_#4r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs []
+ = note: defining type: DefId(0:22 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs []
error: aborting due to previous error
LL | | });
| |_____^
|
- = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:23 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [
+ = note: defining type: DefId(0:20 ~ propagate_from_trait_match[317d]::supply[0]) with substs [
'_#1r,
T,
]
LL | expect_sig(|a, b| b); // ought to return `a`
| ^^^^^^^^
|
- = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:13 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [
i16,
- for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32,
+ for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) i32,
]
error: lifetime may not live long enough
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:3 ~ return_wrong_bound_region[317d]::test[0]) with substs []
+ = note: defining type: DefId(0:12 ~ return_wrong_bound_region[317d]::test[0]) with substs []
error: aborting due to previous error
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:15 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:22 ~ projection_no_regions_closure[317d]::no_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [
+ = note: defining type: DefId(0:19 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [
'_#1r,
T,
]
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:26 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:7 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [
+ = note: defining type: DefId(0:23 ~ projection_no_regions_closure[317d]::correct_region[0]) with substs [
'_#1r,
T,
]
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:31 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:8 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [
+ = note: defining type: DefId(0:27 ~ projection_no_regions_closure[317d]::wrong_region[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:36 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [
+ = note: defining type: DefId(0:32 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:28 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [
+ = note: defining type: DefId(0:24 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [
'_#1r,
T,
]
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...
+ = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:24 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(25), 'a))`...
error: lifetime may not live long enough
--> $DIR/projection-one-region-closure.rs:45:39
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:33 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [
+ = note: defining type: DefId(0:29 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:38 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [
+ = note: defining type: DefId(0:34 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:43 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [
+ = note: defining type: DefId(0:39 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:28 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
+ = note: defining type: DefId(0:24 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
'_#1r,
T,
]
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:33 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
+ = note: defining type: DefId(0:29 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:38 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
+ = note: defining type: DefId(0:34 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:43 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [
+ = note: defining type: DefId(0:39 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:47 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [
+ = note: defining type: DefId(0:44 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [
'_#1r,
T,
]
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:28 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [
+ = note: defining type: DefId(0:24 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [
'_#1r,
T,
]
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:33 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [
+ = note: defining type: DefId(0:29 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:38 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [
+ = note: defining type: DefId(0:34 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:43 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [
+ = note: defining type: DefId(0:39 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:47 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [
+ = note: defining type: DefId(0:44 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]) with substs [
'_#1r,
T,
]
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:31 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
+ = note: defining type: DefId(0:26 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = help: consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...
+ = help: consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0:26 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(27), 'a))`...
note: External requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:48:29
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:37 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
'_#3r,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
+ = note: defining type: DefId(0:32 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
'_#1r,
'_#2r,
'_#3r,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:43 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
'_#3r,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
+ = note: defining type: DefId(0:38 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
'_#1r,
'_#2r,
'_#3r,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:49 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
'_#3r,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [
+ = note: defining type: DefId(0:44 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [
'_#1r,
'_#2r,
'_#3r,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:55 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
'_#3r,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [
+ = note: defining type: DefId(0:50 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [
'_#1r,
'_#2r,
'_#3r,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:60 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [
+ = note: defining type: DefId(0:56 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [
'_#1r,
T,
]
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:65 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [
+ = note: defining type: DefId(0:61 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [
'_#1r,
'_#2r,
T,
LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:69 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [
+ = note: defining type: DefId(0:66 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [
'_#1r,
T,
]
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:20 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [
T,
i16,
- for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)),
+ for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) T)),
]
= note: number of external vids: 2
= note: where T: '_#1r
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [
+ = note: defining type: DefId(0:18 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [
T,
]
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
- = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:24 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [
T,
i16,
- for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T)),
+ for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0), 's)) T)),
]
= note: late-bound region is '_#2r
= note: number of external vids: 3
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
+ = note: defining type: DefId(0:21 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
T,
]
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
- = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`...
+ = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:21 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(22), 'a))`...
error: aborting due to previous error
LL | with_signature(x, |y| y)
| ^^^^^
|
- = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:20 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [
+ = note: defining type: DefId(0:17 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [
'_#1r,
T,
]
LL | | })
| |_____^
|
- = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:23 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T)),
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
+ = note: defining type: DefId(0:20 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
T,
]
LL | | })
| |_____^
|
- = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`...
+ = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:20 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(21), 'a))`...
note: External requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26
LL | | })
| |_____^
|
- = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:27 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
+ = note: defining type: DefId(0:24 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
'_#1r,
T,
]
LL | | })
| |_____^
|
- = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:32 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
+ = note: defining type: DefId(0:28 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
'_#1r,
T,
]
LL | | })
| |_____^
|
- = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`...
+ = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:28 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(29), 'a))`...
note: External requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26
LL | | })
| |_____^
|
- = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
+ = note: defining type: DefId(0:37 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
LL | | }
| |_^
|
- = note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
+ = note: defining type: DefId(0:33 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
'_#1r,
'_#2r,
T,