Highlight conflicting param-env candidates

This commit is contained in:
Michael Goulet
2022-07-02 01:30:07 +00:00
parent 9b21131278
commit 08135254dc
8 changed files with 114 additions and 19 deletions

View File

@@ -546,9 +546,17 @@ pub enum SelectionError<'tcx> {
ErrorReporting,
/// Multiple applicable `impl`s where found. The `DefId`s correspond to
/// all the `impl`s' Items.
Ambiguous(Vec<DefId>),
Ambiguous(Vec<AmbiguousSelection>),
}
#[derive(Copy, Clone, Debug)]
pub enum AmbiguousSelection {
Impl(DefId),
ParamEnv(Span),
}
TrivialTypeTraversalAndLiftImpls! { AmbiguousSelection, }
/// When performing resolution, it is typically the case that there
/// can be one of three outcomes:
///