diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-20 13:39:52 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-20 13:40:22 +0000 |
| commit | 6f6f91ab828abf38244715183ef3fd19b3b2b32f (patch) | |
| tree | ab2c77b0070842efbcc754b3d7d4660fb84d4836 /compiler/rustc_middle/src | |
| parent | bfab34af4c5bfbcc9168064857bbec826a60a0b9 (diff) | |
| download | rust-6f6f91ab828abf38244715183ef3fd19b3b2b32f.tar.gz rust-6f6f91ab828abf38244715183ef3fd19b3b2b32f.zip | |
Rip out old effects var handling code from traits
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/traits/select.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 18 |
2 files changed, 1 insertions, 24 deletions
diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 66035464fa5..05556ae38a8 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -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 diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 0a917120b3b..9a3049f3be6 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -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 |
