1
Fork 0

Add test for lack of suggestion in stable

This test will break when `Step` gets stabilized, but punt until then.
This commit is contained in:
Esteban Küber 2024-11-28 19:31:37 +00:00
parent d13c34828e
commit 568b0ac624
5 changed files with 49 additions and 6 deletions

View file

@ -488,7 +488,7 @@ pub fn suggest_constraining_type_params<'a>(
.into_iter()
.filter(|(span, _, _, _)| !span.in_derive_expansion())
.collect::<Vec<_>>();
let suggested = !suggestions.is_empty();
if suggestions.len() == 1 {
let (span, constraint, suggestion, msg) = suggestions.pop().unwrap();
let post = format!(
@ -524,7 +524,7 @@ pub fn suggest_constraining_type_params<'a>(
);
}
true
suggested
}
/// Collect al types that have an implicit `'static` obligation that we could suggest `'_` for.