Make diagnostic for unsatisfied Termination bounds more precise
This commit is contained in:
parent
bf286a82e2
commit
684df4d24e
8 changed files with 78 additions and 5 deletions
|
@ -164,6 +164,10 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
flags.push((sym::from_desugaring, Some(format!("{:?}", k))));
|
||||
}
|
||||
|
||||
if let ObligationCauseCode::MainFunctionType = obligation.cause.code() {
|
||||
flags.push((sym::cause, Some("MainFunctionType".to_string())));
|
||||
}
|
||||
|
||||
// Add all types without trimmed paths.
|
||||
ty::print::with_no_trimmed_paths!({
|
||||
let generics = self.tcx.generics_of(def_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue