diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2021-10-12 12:11:00 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2021-10-20 12:10:45 -0300 |
| commit | 8b0bfb0dcb6b644dabb6daedd88dc8834f3d1cb2 (patch) | |
| tree | 3fd9acadf031bcd9eebe146aca320851c08c3e27 /compiler/rustc_middle/src/traits | |
| parent | 6975afd141d5ced25d1b133afc792dd4988345a6 (diff) | |
| download | rust-8b0bfb0dcb6b644dabb6daedd88dc8834f3d1cb2.tar.gz rust-8b0bfb0dcb6b644dabb6daedd88dc8834f3d1cb2.zip | |
Consider negative polarity on overlap check
Diffstat (limited to 'compiler/rustc_middle/src/traits')
| -rw-r--r-- | compiler/rustc_middle/src/traits/select.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 6720493cd3c..83a2278d8ba 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -12,7 +12,7 @@ use rustc_hir::def_id::DefId; use rustc_query_system::cache::Cache; pub type SelectionCache<'tcx> = Cache< - ty::ConstnessAnd<ty::ParamEnvAnd<'tcx, ty::TraitRef<'tcx>>>, + (ty::ConstnessAnd<ty::ParamEnvAnd<'tcx, ty::TraitRef<'tcx>>>, ty::ImplPolarity), SelectionResult<'tcx, SelectionCandidate<'tcx>>, >; @@ -101,7 +101,7 @@ pub enum SelectionCandidate<'tcx> { /// `false` if there are no *further* obligations. has_nested: bool, }, - ParamCandidate(ty::ConstnessAnd<ty::PolyTraitRef<'tcx>>), + ParamCandidate((ty::ConstnessAnd<ty::PolyTraitRef<'tcx>>, ty::ImplPolarity)), ImplCandidate(DefId), AutoImplCandidate(DefId), |
