|
70 | 70 | // In intercrate mode, this is ambiguous. But outside of intercrate,
|
71 | 71 | // it's not a real impl.
|
72 | 72 | (ty::ImplPolarity::Reservation, _) => match ecx.typing_mode() {
|
73 |
| - TypingMode::Coherence => Certainty::AMBIGUOUS, |
| 73 | + TypingMode::Coherence | TypingMode::CheckObjectOverlap => Certainty::AMBIGUOUS, |
74 | 74 | TypingMode::Analysis { .. }
|
75 | 75 | | TypingMode::Borrowck { .. }
|
76 | 76 | | TypingMode::PostBorrowckAnalysis { .. }
|
@@ -1257,7 +1257,7 @@ where
|
1257 | 1257 | &mut self,
|
1258 | 1258 | mut candidates: Vec<Candidate<I>>,
|
1259 | 1259 | ) -> Result<(CanonicalResponse<I>, Option<TraitGoalProvenVia>), NoSolution> {
|
1260 |
| - if let TypingMode::Coherence = self.typing_mode() { |
| 1260 | + if let TypingMode::Coherence | TypingMode::CheckObjectOverlap = self.typing_mode() { |
1261 | 1261 | let all_candidates: Vec<_> = candidates.into_iter().map(|c| c.result).collect();
|
1262 | 1262 | return if let Some(response) = self.try_merge_responses(&all_candidates) {
|
1263 | 1263 | Ok((response, Some(TraitGoalProvenVia::Misc)))
|
@@ -1360,6 +1360,7 @@ where
|
1360 | 1360 | }
|
1361 | 1361 | }
|
1362 | 1362 | TypingMode::Coherence
|
| 1363 | + | TypingMode::CheckObjectOverlap |
1363 | 1364 | | TypingMode::PostAnalysis
|
1364 | 1365 | | TypingMode::Borrowck { defining_opaque_types: _ }
|
1365 | 1366 | | TypingMode::PostBorrowckAnalysis { defined_opaque_types: _ } => {}
|
|
0 commit comments