Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints.rs')
-rw-r--r--crates/ide/src/inlay_hints.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index 19e5509681..671fddb436 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -1065,4 +1065,34 @@ fn bar() {
"#,
);
}
+
+ #[test]
+ fn regression_20239() {
+ check_with_config(
+ InlayHintsConfig { parameter_hints: true, type_hints: true, ..DISABLED_CONFIG },
+ r#"
+//- minicore: fn
+trait Iterator {
+ type Item;
+ fn map<B, F: FnMut(Self::Item) -> B>(self, f: F);
+}
+trait ToString {
+ fn to_string(&self);
+}
+
+fn check_tostr_eq<L, R>(left: L, right: R)
+where
+ L: Iterator,
+ L::Item: ToString,
+ R: Iterator,
+ R::Item: ToString,
+{
+ left.map(|s| s.to_string());
+ // ^ impl ToString
+ right.map(|s| s.to_string());
+ // ^ impl ToString
+}
+ "#,
+ );
+ }
}