improve comments

This commit is contained in:
Ariel Ben-Yehuda 2019-07-27 20:44:14 +03:00
parent 1ec7ae14fa
commit b5665e811b
2 changed files with 2 additions and 2 deletions

View File

@ -1326,7 +1326,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
(result, dep_node)
}
// Treat negative impls as unimplemented, and reservation impls as Ok(None)
// Treat negative impls as unimplemented, and reservation impls as ambiguity.
fn filter_negative_and_reservation_impls(
&self,
candidate: SelectionCandidate<'tcx>,

View File

@ -2931,7 +2931,7 @@ impl<'tcx> TyCtxt<'tcx> {
}
(ImplPolarity::Positive, ImplPolarity::Negative) |
(ImplPolarity::Negative, ImplPolarity::Positive) => {
// FIXME: when can this happen?
// `impl AutoTrait for Type` + `impl !AutoTrait for Type`
debug!("impls_are_allowed_to_overlap({:?}, {:?}) - None (differing polarities)",
def_id1, def_id2);
return None;