Auto merge of #51248 - fabric-and-ink:newtype_index_debrujin, r=nikomatsakis
Declare DebruijnIndex via newtype_index macro Part of #49887 Declare `DebruijnIndex` via the `newtype_index` macro.
This commit is contained in:
commit
fc19590297
@ -77,7 +77,7 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
|
||||
tcx: self.tcx,
|
||||
bound_region: *br,
|
||||
found_type: None,
|
||||
current_index: ty::DebruijnIndex::INNERMOST,
|
||||
current_index: ty::INNERMOST,
|
||||
};
|
||||
nested_visitor.visit_ty(arg);
|
||||
nested_visitor.found_type
|
||||
|
@ -417,8 +417,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
|
||||
{
|
||||
for (a_br, a_r) in a_map {
|
||||
if *a_r == r {
|
||||
return infcx.tcx.mk_region(ty::ReLateBound(ty::DebruijnIndex::INNERMOST,
|
||||
*a_br));
|
||||
return infcx.tcx.mk_region(ty::ReLateBound(ty::INNERMOST, *a_br));
|
||||
}
|
||||
}
|
||||
span_bug!(
|
||||
@ -735,7 +734,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
|
||||
// trait checking, and all of the skolemized regions
|
||||
// appear inside predicates, which always have
|
||||
// binders, so this assert is satisfied.
|
||||
assert!(current_depth > ty::DebruijnIndex::INNERMOST);
|
||||
assert!(current_depth > ty::INNERMOST);
|
||||
|
||||
// since leak-check passed, this skolemized region
|
||||
// should only have incoming edges from variables
|
||||
|
@ -98,7 +98,7 @@ impl Region {
|
||||
}
|
||||
|
||||
fn late(hir_map: &Map, def: &hir::LifetimeDef) -> (hir::LifetimeName, Region) {
|
||||
let depth = ty::DebruijnIndex::INNERMOST;
|
||||
let depth = ty::INNERMOST;
|
||||
let def_id = hir_map.local_def_id(def.lifetime.id);
|
||||
let origin = LifetimeDefOrigin::from_is_in_band(def.in_band);
|
||||
debug!(
|
||||
@ -114,7 +114,7 @@ impl Region {
|
||||
fn late_anon(index: &Cell<u32>) -> Region {
|
||||
let i = index.get();
|
||||
index.set(i + 1);
|
||||
let depth = ty::DebruijnIndex::INNERMOST;
|
||||
let depth = ty::INNERMOST;
|
||||
Region::LateBoundAnon(depth, i)
|
||||
}
|
||||
|
||||
@ -1870,7 +1870,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
||||
.map(|(i, input)| {
|
||||
let mut gather = GatherLifetimes {
|
||||
map: self.map,
|
||||
outer_index: ty::DebruijnIndex::INNERMOST,
|
||||
outer_index: ty::INNERMOST,
|
||||
have_bound_regions: false,
|
||||
lifetimes: FxHashSet(),
|
||||
};
|
||||
|
@ -24,7 +24,7 @@ impl FlagComputation {
|
||||
fn new() -> FlagComputation {
|
||||
FlagComputation {
|
||||
flags: TypeFlags::empty(),
|
||||
outer_exclusive_binder: ty::DebruijnIndex::INNERMOST,
|
||||
outer_exclusive_binder: ty::INNERMOST,
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ impl FlagComputation {
|
||||
// a region binder, so subtract one from the region depth
|
||||
// within when adding the depth to `self`.
|
||||
let outer_exclusive_binder = computation.outer_exclusive_binder;
|
||||
if outer_exclusive_binder > ty::DebruijnIndex::INNERMOST {
|
||||
if outer_exclusive_binder > ty::INNERMOST {
|
||||
self.add_exclusive_binder(outer_exclusive_binder.shifted_out(1));
|
||||
} else {
|
||||
// otherwise, this binder captures nothing
|
||||
|
@ -65,7 +65,7 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
|
||||
|
||||
/// True if `self` has any late-bound regions that are either
|
||||
/// bound by `binder` or bound by some binder outside of `binder`.
|
||||
/// If `binder` is `ty::DebruijnIndex::INNERMOST`, this indicates whether
|
||||
/// If `binder` is `ty::INNERMOST`, this indicates whether
|
||||
/// there are any late-bound regions that appear free.
|
||||
fn has_regions_bound_at_or_above(&self, binder: ty::DebruijnIndex) -> bool {
|
||||
self.visit_with(&mut HasEscapingRegionsVisitor { outer_index: binder })
|
||||
@ -78,7 +78,7 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
|
||||
}
|
||||
|
||||
fn has_escaping_regions(&self) -> bool {
|
||||
self.has_regions_bound_at_or_above(ty::DebruijnIndex::INNERMOST)
|
||||
self.has_regions_bound_at_or_above(ty::INNERMOST)
|
||||
}
|
||||
|
||||
fn has_type_flags(&self, flags: TypeFlags) -> bool {
|
||||
@ -246,7 +246,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
T: TypeFoldable<'tcx>,
|
||||
{
|
||||
value.visit_with(&mut RegionVisitor {
|
||||
outer_index: ty::DebruijnIndex::INNERMOST,
|
||||
outer_index: ty::INNERMOST,
|
||||
callback
|
||||
});
|
||||
|
||||
@ -260,7 +260,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
/// ^ ^ ^ ^
|
||||
/// | | | | here, would be shifted in 1
|
||||
/// | | | here, would be shifted in 2
|
||||
/// | | here, would be INNTERMOST shifted in by 1
|
||||
/// | | here, would be INNERMOST shifted in by 1
|
||||
/// | here, initially, binder would be INNERMOST
|
||||
/// ```
|
||||
///
|
||||
@ -333,7 +333,7 @@ impl<'a, 'gcx, 'tcx> RegionFolder<'a, 'gcx, 'tcx> {
|
||||
RegionFolder {
|
||||
tcx,
|
||||
skipped_regions,
|
||||
current_index: ty::DebruijnIndex::INNERMOST,
|
||||
current_index: ty::INNERMOST,
|
||||
fold_region_fn,
|
||||
}
|
||||
}
|
||||
@ -495,7 +495,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
let mut counter = 0;
|
||||
Binder::bind(self.replace_late_bound_regions(sig, |_| {
|
||||
counter += 1;
|
||||
self.mk_region(ty::ReLateBound(ty::DebruijnIndex::INNERMOST, ty::BrAnon(counter)))
|
||||
self.mk_region(ty::ReLateBound(ty::INNERMOST, ty::BrAnon(counter)))
|
||||
}).0)
|
||||
}
|
||||
}
|
||||
@ -507,7 +507,7 @@ impl<'a, 'gcx, 'tcx> RegionReplacer<'a, 'gcx, 'tcx> {
|
||||
{
|
||||
RegionReplacer {
|
||||
tcx,
|
||||
current_index: ty::DebruijnIndex::INNERMOST,
|
||||
current_index: ty::INNERMOST,
|
||||
fld_r,
|
||||
map: BTreeMap::default()
|
||||
}
|
||||
@ -542,7 +542,7 @@ impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for RegionReplacer<'a, 'gcx, 'tcx> {
|
||||
// that region should always use the INNERMOST
|
||||
// debruijn index. Then we adjust it to the
|
||||
// correct depth.
|
||||
assert_eq!(debruijn1, ty::DebruijnIndex::INNERMOST);
|
||||
assert_eq!(debruijn1, ty::INNERMOST);
|
||||
self.tcx.mk_region(ty::ReLateBound(debruijn, br))
|
||||
} else {
|
||||
region
|
||||
@ -701,7 +701,7 @@ struct LateBoundRegionsCollector {
|
||||
impl LateBoundRegionsCollector {
|
||||
fn new(just_constrained: bool) -> Self {
|
||||
LateBoundRegionsCollector {
|
||||
current_index: ty::DebruijnIndex::INNERMOST,
|
||||
current_index: ty::INNERMOST,
|
||||
regions: FxHashSet(),
|
||||
just_constrained,
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ use rustc_data_structures::stable_hasher::{StableHasher, StableHasherResult,
|
||||
|
||||
use hir;
|
||||
|
||||
pub use self::sty::{Binder, CanonicalVar, DebruijnIndex};
|
||||
pub use self::sty::{Binder, CanonicalVar, DebruijnIndex, INNERMOST};
|
||||
pub use self::sty::{FnSig, GenSig, PolyFnSig, PolyGenSig};
|
||||
pub use self::sty::{InferTy, ParamTy, ProjectionTy, ExistentialPredicate};
|
||||
pub use self::sty::{ClosureSubsts, GeneratorSubsts, UpvarSubsts, TypeAndMut};
|
||||
|
@ -1023,12 +1023,11 @@ impl<'a, 'gcx, 'tcx> ParamTy {
|
||||
/// is the outer fn.
|
||||
///
|
||||
/// [dbi]: http://en.wikipedia.org/wiki/De_Bruijn_index
|
||||
#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Debug, Copy, PartialOrd, Ord)]
|
||||
pub struct DebruijnIndex {
|
||||
/// We maintain the invariant that this is never 0. So 1 indicates
|
||||
/// the innermost binder.
|
||||
index: u32,
|
||||
}
|
||||
newtype_index!(DebruijnIndex
|
||||
{
|
||||
DEBUG_FORMAT = "DebruijnIndex({})",
|
||||
const INNERMOST = 0,
|
||||
});
|
||||
|
||||
pub type Region<'tcx> = &'tcx RegionKind;
|
||||
|
||||
@ -1261,8 +1260,6 @@ impl<'a, 'tcx, 'gcx> PolyExistentialProjection<'tcx> {
|
||||
}
|
||||
|
||||
impl DebruijnIndex {
|
||||
pub const INNERMOST: DebruijnIndex = DebruijnIndex { index: 0 };
|
||||
|
||||
/// Returns the resulting index when this value is moved into
|
||||
/// `amount` number of new binders. So e.g. if you had
|
||||
///
|
||||
@ -1275,7 +1272,7 @@ impl DebruijnIndex {
|
||||
/// you would need to shift the index for `'a` into 1 new binder.
|
||||
#[must_use]
|
||||
pub const fn shifted_in(self, amount: u32) -> DebruijnIndex {
|
||||
DebruijnIndex { index: self.index + amount }
|
||||
DebruijnIndex(self.0 + amount)
|
||||
}
|
||||
|
||||
/// Update this index in place by shifting it "in" through
|
||||
@ -1288,7 +1285,7 @@ impl DebruijnIndex {
|
||||
/// `amount` number of new binders.
|
||||
#[must_use]
|
||||
pub const fn shifted_out(self, amount: u32) -> DebruijnIndex {
|
||||
DebruijnIndex { index: self.index - amount }
|
||||
DebruijnIndex(self.0 - amount)
|
||||
}
|
||||
|
||||
/// Update in place by shifting out from `amount` binders.
|
||||
@ -1317,13 +1314,11 @@ impl DebruijnIndex {
|
||||
/// bound by one of the binders we are shifting out of, that is an
|
||||
/// error (and should fail an assertion failure).
|
||||
pub fn shifted_out_to_binder(self, to_binder: DebruijnIndex) -> Self {
|
||||
self.shifted_out(to_binder.index - Self::INNERMOST.index)
|
||||
self.shifted_out((to_binder.0 - INNERMOST.0) as u32)
|
||||
}
|
||||
}
|
||||
|
||||
impl_stable_hash_for!(struct DebruijnIndex {
|
||||
index
|
||||
});
|
||||
impl_stable_hash_for!(tuple_struct DebruijnIndex { index });
|
||||
|
||||
/// Region utilities
|
||||
impl RegionKind {
|
||||
|
@ -555,7 +555,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
-> Option<ty::Binder<Ty<'tcx>>>
|
||||
{
|
||||
let closure_ty = self.mk_closure(closure_def_id, closure_substs);
|
||||
let env_region = ty::ReLateBound(ty::DebruijnIndex::INNERMOST, ty::BrEnv);
|
||||
let env_region = ty::ReLateBound(ty::INNERMOST, ty::BrEnv);
|
||||
let closure_kind_ty = closure_substs.closure_kind_ty(closure_def_id, self);
|
||||
let closure_kind = closure_kind_ty.to_opt_closure_kind()?;
|
||||
let env_ty = match closure_kind {
|
||||
|
@ -527,7 +527,7 @@ impl PrintContext {
|
||||
ty::BrNamed(tcx.hir.local_def_id(CRATE_NODE_ID), name)
|
||||
}
|
||||
};
|
||||
tcx.mk_region(ty::ReLateBound(ty::DebruijnIndex::INNERMOST, br))
|
||||
tcx.mk_region(ty::ReLateBound(ty::INNERMOST, br))
|
||||
}).0;
|
||||
start_or_continue(f, "", "> ")?;
|
||||
|
||||
|
@ -425,7 +425,7 @@ pub fn ty_fn_sig<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
|
||||
let tcx = cx.tcx;
|
||||
let sig = substs.poly_sig(def_id, cx.tcx);
|
||||
|
||||
let env_region = ty::ReLateBound(ty::DebruijnIndex::INNERMOST, ty::BrEnv);
|
||||
let env_region = ty::ReLateBound(ty::INNERMOST, ty::BrEnv);
|
||||
let env_ty = tcx.mk_mut_ref(tcx.mk_region(env_region), ty);
|
||||
|
||||
sig.map_bound(|sig| {
|
||||
|
@ -183,7 +183,7 @@ fn test_env_with_pool<F>(
|
||||
});
|
||||
}
|
||||
|
||||
const D1: ty::DebruijnIndex = ty::DebruijnIndex::INNERMOST;
|
||||
const D1: ty::DebruijnIndex = ty::INNERMOST;
|
||||
const D2: ty::DebruijnIndex = D1.shifted_in(1);
|
||||
|
||||
impl<'a, 'gcx, 'tcx> Env<'a, 'gcx, 'tcx> {
|
||||
|
@ -463,7 +463,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
// Create a `PolyFnSig`. Note the oddity that late bound
|
||||
// regions appearing free in `expected_sig` are now bound up
|
||||
// in this binder we are creating.
|
||||
assert!(!expected_sig.sig.has_regions_bound_above(ty::DebruijnIndex::INNERMOST));
|
||||
assert!(!expected_sig.sig.has_regions_bound_above(ty::INNERMOST));
|
||||
let bound_sig = ty::Binder::bind(self.tcx.mk_fn_sig(
|
||||
expected_sig.sig.inputs().iter().cloned(),
|
||||
expected_sig.sig.output(),
|
||||
|
@ -119,7 +119,7 @@ pub fn check_intrinsic_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
"pref_align_of" | "min_align_of" => (1, Vec::new(), tcx.types.usize),
|
||||
"size_of_val" | "min_align_of_val" => {
|
||||
(1, vec![
|
||||
tcx.mk_imm_ref(tcx.mk_region(ty::ReLateBound(ty::DebruijnIndex::INNERMOST,
|
||||
tcx.mk_imm_ref(tcx.mk_region(ty::ReLateBound(ty::INNERMOST,
|
||||
ty::BrAnon(0))),
|
||||
param(0))
|
||||
], tcx.types.usize)
|
||||
@ -298,7 +298,7 @@ pub fn check_intrinsic_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
"unlikely" => (0, vec![tcx.types.bool], tcx.types.bool),
|
||||
|
||||
"discriminant_value" => (1, vec![
|
||||
tcx.mk_imm_ref(tcx.mk_region(ty::ReLateBound(ty::DebruijnIndex::INNERMOST,
|
||||
tcx.mk_imm_ref(tcx.mk_region(ty::ReLateBound(ty::INNERMOST,
|
||||
ty::BrAnon(0))),
|
||||
param(0))], tcx.types.u64),
|
||||
|
||||
|
@ -736,7 +736,7 @@ fn has_late_bound_regions<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
-> Option<Span> {
|
||||
let mut visitor = LateBoundRegionsDetector {
|
||||
tcx,
|
||||
outer_index: ty::DebruijnIndex::INNERMOST,
|
||||
outer_index: ty::INNERMOST,
|
||||
has_late_bound_regions: None,
|
||||
};
|
||||
for lifetime in generics.lifetimes() {
|
||||
|
@ -18,7 +18,7 @@ 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 [
|
||||
i16,
|
||||
for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) i32))
|
||||
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))
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
|
@ -6,7 +6,7 @@ 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 [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) i32))
|
||||
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))
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
|
@ -24,7 +24,7 @@ LL | | },
|
||||
|
|
||||
= note: defining type: DefId(0/1:20 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
|
@ -18,7 +18,7 @@ LL | | });
|
||||
|
|
||||
= note: defining type: DefId(0/1:18 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
= note: number of external vids: 3
|
||||
= note: where '_#1r: '_#2r
|
||||
|
@ -23,7 +23,7 @@ LL | | })
|
||||
|
|
||||
= note: defining type: DefId(0/1:12 ~ 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 { index: 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:0), 'r)) u32>))
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
@ -51,7 +51,7 @@ LL | | })
|
||||
|
|
||||
= note: defining type: DefId(0/1:13 ~ 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 { index: 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:0), 'r)) u32>))
|
||||
]
|
||||
= note: number of external vids: 2
|
||||
= note: where '_#1r: '_#0r
|
||||
|
@ -18,7 +18,7 @@ LL | | });
|
||||
|
|
||||
= note: defining type: DefId(0/1:18 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
= note: number of external vids: 2
|
||||
= note: where '_#1r: '_#0r
|
||||
|
@ -18,7 +18,7 @@ LL | | });
|
||||
|
|
||||
= note: defining type: DefId(0/1:18 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
= note: number of external vids: 3
|
||||
= note: where '_#1r: '_#0r
|
||||
|
@ -18,7 +18,7 @@ LL | | });
|
||||
|
|
||||
= note: defining type: DefId(0/1:18 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
= note: number of external vids: 3
|
||||
= note: where '_#1r: '_#2r
|
||||
|
@ -16,7 +16,7 @@ LL | | },
|
||||
|
|
||||
= note: defining type: DefId(0/1:16 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
= note: number of external vids: 3
|
||||
= note: where '_#1r: '_#2r
|
||||
|
@ -24,7 +24,7 @@ LL | | });
|
||||
|
|
||||
= note: defining type: DefId(0/1:18 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
|
@ -24,7 +24,7 @@ LL | | });
|
||||
|
|
||||
= note: defining type: DefId(0/1:18 ~ 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 { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 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: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>))
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
|
@ -18,7 +18,7 @@ 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 [
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) i32
|
||||
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
|
||||
]
|
||||
|
||||
note: No external requirements
|
||||
|
@ -25,7 +25,7 @@ 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 [
|
||||
T,
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex { index: 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:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
|
||||
]
|
||||
= note: number of external vids: 2
|
||||
= note: where T: '_#1r
|
||||
@ -55,7 +55,7 @@ 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 [
|
||||
T,
|
||||
i16,
|
||||
for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex { index: 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:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
|
||||
]
|
||||
= note: number of external vids: 2
|
||||
= note: where T: '_#1r
|
||||
|
Loading…
x
Reference in New Issue
Block a user