Error message for ambiguous RTN from super bounds
This commit is contained in:
parent
fef2f5b815
commit
76802e31a1
6 changed files with 84 additions and 3 deletions
|
@ -2083,8 +2083,16 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
}
|
||||
};
|
||||
|
||||
if let Some(_conflicting_candidate) = matching_candidates.next() {
|
||||
todo!()
|
||||
if let Some(conflicting_candidate) = matching_candidates.next() {
|
||||
return Err(self.tcx().sess.emit_err(
|
||||
crate::errors::ReturnTypeNotationConflictingBound {
|
||||
span,
|
||||
ty_name: ty_name.to_string(),
|
||||
assoc_name: assoc_name.name,
|
||||
first_bound: candidate.print_only_trait_path(),
|
||||
second_bound: conflicting_candidate.print_only_trait_path(),
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
Ok(candidate)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue