1
Fork 0

Revert "sort suggestions for object diagnostic"

This reverts commit 540be28f6c.
This commit is contained in:
Michael Goulet 2024-02-11 05:40:10 +00:00
parent d325fb7c2e
commit e0ba1931f4
4 changed files with 8 additions and 9 deletions

View file

@ -177,13 +177,12 @@ pub fn report_object_safety_error<'tcx>(
)));
}
impls => {
let mut types = impls
let types = impls
.iter()
.map(|t| {
with_no_trimmed_paths!(format!(" {}", tcx.type_of(*t).instantiate_identity(),))
})
.collect::<Vec<_>>();
types.sort();
err.help(format!(
"the following types implement the trait, consider defining an enum where each \
variant holds one of these types, implementing `{}` for this new enum and using \