Rip out old effects var handling code from traits
This commit is contained in:
parent
bfab34af4c
commit
6f6f91ab82
14 changed files with 34 additions and 491 deletions
|
@ -161,9 +161,7 @@ pub enum SelectionCandidate<'tcx> {
|
|||
|
||||
/// Implementation of a `Fn`-family trait by one of the anonymous
|
||||
/// types generated for a fn pointer type (e.g., `fn(int) -> int`)
|
||||
FnPointerCandidate {
|
||||
fn_host_effect: ty::Const<'tcx>,
|
||||
},
|
||||
FnPointerCandidate,
|
||||
|
||||
TraitAliasCandidate,
|
||||
|
||||
|
@ -180,9 +178,6 @@ pub enum SelectionCandidate<'tcx> {
|
|||
BuiltinObjectCandidate,
|
||||
|
||||
BuiltinUnsizeCandidate,
|
||||
|
||||
/// Implementation of `const Destruct`, optionally from a custom `impl const Drop`.
|
||||
ConstDestructCandidate(Option<DefId>),
|
||||
}
|
||||
|
||||
/// The result of trait evaluation. The order is important
|
||||
|
|
|
@ -907,24 +907,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Constructs generic args for an item, optionally appending a const effect param type
|
||||
pub fn with_opt_host_effect_param(
|
||||
self,
|
||||
caller_def_id: LocalDefId,
|
||||
callee_def_id: DefId,
|
||||
args: impl IntoIterator<Item: Into<ty::GenericArg<'tcx>>>,
|
||||
) -> ty::GenericArgsRef<'tcx> {
|
||||
let generics = self.generics_of(callee_def_id);
|
||||
assert_eq!(generics.parent, None);
|
||||
|
||||
let opt_const_param = generics
|
||||
.host_effect_index
|
||||
.is_some()
|
||||
.then(|| ty::GenericArg::from(self.expected_host_effect_param_for_body(caller_def_id)));
|
||||
|
||||
self.mk_args_from_iter(args.into_iter().map(|arg| arg.into()).chain(opt_const_param))
|
||||
}
|
||||
|
||||
/// Expand any [weak alias types][weak] contained within the given `value`.
|
||||
///
|
||||
/// This should be used over other normalization routines in situations where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue