"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/librustc_middle/ty/instance.rs" between
rustc-1.45.0-src.tar.xz and rustc-1.45.2-src.tar.xz

About: Rust is a systems programming language that runs "blazingly fast, prevents nearly all segfaults, and guarantees thread safety" (developed by Mozilla).

instance.rs  (rustc-1.45.0-src.tar.xz):instance.rs  (rustc-1.45.2-src.tar.xz)
skipping to change at line 348 skipping to change at line 348
) -> Option<Instance<'tcx>> { ) -> Option<Instance<'tcx>> {
debug!("resolve(def_id={:?}, substs={:?})", def_id, substs); debug!("resolve(def_id={:?}, substs={:?})", def_id, substs);
let fn_sig = tcx.fn_sig(def_id); let fn_sig = tcx.fn_sig(def_id);
let is_vtable_shim = !fn_sig.inputs().skip_binder().is_empty() let is_vtable_shim = !fn_sig.inputs().skip_binder().is_empty()
&& fn_sig.input(0).skip_binder().is_param(0) && fn_sig.input(0).skip_binder().is_param(0)
&& tcx.generics_of(def_id).has_self; && tcx.generics_of(def_id).has_self;
if is_vtable_shim { if is_vtable_shim {
debug!(" => associated item with unsizeable self: Self"); debug!(" => associated item with unsizeable self: Self");
Some(Instance { def: InstanceDef::VtableShim(def_id), substs }) Some(Instance { def: InstanceDef::VtableShim(def_id), substs })
} else { } else {
Instance::resolve(tcx, param_env, def_id, substs).ok().flatten() Instance::resolve_for_fn_ptr(tcx, param_env, def_id, substs)
} }
} }
pub fn resolve_closure( pub fn resolve_closure(
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,
def_id: DefId, def_id: DefId,
substs: ty::SubstsRef<'tcx>, substs: ty::SubstsRef<'tcx>,
requested_kind: ty::ClosureKind, requested_kind: ty::ClosureKind,
) -> Instance<'tcx> { ) -> Instance<'tcx> {
let actual_kind = substs.as_closure().kind(); let actual_kind = substs.as_closure().kind();
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)