提交 1853ffcc 编写于 作者: O ouz-a

don't call multipart_suggestion

上级 b930efb3
......@@ -325,12 +325,6 @@ pub fn suggest_constraining_type_params<'a>(
}
}
// This check is always run on non-valid code
// to not trigger ICE
if constraints.is_empty() && suggestions.is_empty() {
return false;
}
if constraints.is_empty() {
continue;
}
......@@ -518,7 +512,7 @@ pub fn suggest_constraining_type_params<'a>(
};
err.span_suggestion_verbose(span, msg, suggestion, applicability);
} else {
} else if suggestions.len() > 1 {
err.multipart_suggestion_verbose(
"consider restricting type parameters",
suggestions.into_iter().map(|(span, suggestion, _)| (span, suggestion)).collect(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册