Eliminate DefiningAnchor::Error
, it is indistinguishable from DefiningAnchor::Bind
with an empty list
This commit is contained in:
parent
40d5609548
commit
7348dd1950
5 changed files with 11 additions and 18 deletions
|
@ -16,7 +16,7 @@ use rustc_middle::traits::solve::{
|
|||
CanonicalInput, CanonicalResponse, Certainty, IsNormalizesToHack, PredefinedOpaques,
|
||||
PredefinedOpaquesData, QueryResult,
|
||||
};
|
||||
use rustc_middle::traits::{specialization_graph, DefiningAnchor};
|
||||
use rustc_middle::traits::specialization_graph;
|
||||
use rustc_middle::ty::{
|
||||
self, InferCtxtLike, OpaqueTypeKey, Ty, TyCtxt, TypeFoldable, TypeSuperVisitable,
|
||||
TypeVisitable, TypeVisitableExt, TypeVisitor,
|
||||
|
@ -258,10 +258,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {
|
|||
// instead of taking them. This would cause an ICE here, since we have
|
||||
// assertions against dropping an `InferCtxt` without taking opaques.
|
||||
// FIXME: Once we remove support for the old impl we can remove this.
|
||||
if input.anchor != DefiningAnchor::Error {
|
||||
// This seems ok, but fragile.
|
||||
let _ = infcx.take_opaque_types();
|
||||
}
|
||||
let _ = infcx.take_opaque_types();
|
||||
|
||||
result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue