Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
34ddd59
Improve settings tree title and descriptions
joshka Jul 3, 2025
3540446
Fix gen panics doc template for debug_assert
A4-Tacks Jul 25, 2025
1d5a582
refactor: conpare text of name_ref instead of syntax name_ref
Hmikihiro Jul 27, 2025
b3ea82f
Migrate `inline_type_alias` assist to use `SyntaxEditor`
Hmikihiro Jul 27, 2025
b1b7077
remove ted from convert_tuple_struct_to_named_struct
Hmikihiro Jul 26, 2025
85486a7
migrate `fn edit_struct_def` in `convert_tuple_struct_to_named_struct…
Hmikihiro Jul 26, 2025
8f89872
Migrate `convert_tuple_struct_to_named_struct' assist to use `SyntaxE…
Hmikihiro Jul 27, 2025
b4b9f3e
Merge pull request #20300 from A4-Tacks/fix-debug_assert-doc-gen
ChayimFriedman2 Jul 29, 2025
8b214fb
fix: Do not require all rename definitions to be renameable
Veykril Jul 29, 2025
e45400a
Merge pull request #20333 from Veykril/push-xmulpqkxrytn
Veykril Jul 29, 2025
1532b37
Use GH app for authenticating sync PRs
Kobzol Jul 29, 2025
f7c3a89
Merge pull request #20335 from Kobzol/ci-gh-app
lnicola Jul 29, 2025
bad05ff
In generate_mut_trait_impl, don't add a tabstop if the client does no…
ChayimFriedman2 Jul 29, 2025
f5ecbb5
Merge pull request #20336 from ChayimFriedman2/mut-trait-impl-snippet
Veykril Jul 29, 2025
5043dc9
Merge pull request #20154 from joshka/jm/improve-setting-titles
Veykril Jul 29, 2025
ea1e24a
When displaying a projection into a type parameter that has bounds as…
ChayimFriedman2 Jul 29, 2025
b2d9f17
Merge pull request #20337 from ChayimFriedman2/double-inlay-hints
Veykril Jul 29, 2025
cca89bc
add `SyntaxFactory::record_expr` to hide clone_for_update
Hmikihiro Jul 29, 2025
08c6768
replace `make::` to `SyntaxFactory::` in `inline_type_alias`
Hmikihiro Jul 29, 2025
a9c4316
Merge pull request #20311 from Hmikihiro/migrate_convert_tuple_struct…
ShoyuVanilla Jul 30, 2025
cd0f643
Merge pull request #20314 from Hmikihiro/Migrate_inline_type_alias_to…
ShoyuVanilla Jul 30, 2025
2918a2b
Abtract away json protocol for proc-macro-srv
Veykril Jul 30, 2025
d71e972
add `SyntaxEditor::delete_all` to migrate utils.rs `add_trait_assoc_i…
Hmikihiro Jul 29, 2025
8971681
Properly clean proc-macro-srv proc-macro temp dir
Veykril Jul 31, 2025
1975c98
Reorganize proc-macro-srv
Veykril Jul 31, 2025
7543395
Add version command to proc-macro-srv
Veykril Jul 31, 2025
6bf9700
Merge pull request #20342 from Veykril/push-zysqtqskuxvr
Veykril Jul 31, 2025
a7b01aa
`cargo clippy --fix`
Veykril Jul 31, 2025
ddc1b9f
Merge pull request #20349 from Veykril/push-orvqsnqtttzv
Veykril Jul 31, 2025
7c60865
Merge pull request #20345 from Hmikihiro/Migrate_add_trait_assoc_item…
ShoyuVanilla Jul 31, 2025
053f681
Update documentation for overrideCommand config options
iorizu Aug 1, 2025
7d16726
Fix more docs
iorizu Aug 1, 2025
81c4086
Migrate `convert_from_to_tryfrom` assist to use `SyntaxEditor`
Hmikihiro Aug 2, 2025
e314bfa
Migrate `generate_delegate_methods` assist to use `SyntaxEditor`
Hmikihiro Aug 2, 2025
4c6e804
Merge pull request #20358 from iorizu/issue-20346
ChayimFriedman2 Aug 2, 2025
ac34f3d
When renaming a parameter to `self`, change callers to use method cal…
ChayimFriedman2 Jul 31, 2025
f360d6c
Merge pull request #20351 from ChayimFriedman2/rename-self1
Veykril Aug 2, 2025
279b464
Merge pull request #20364 from Hmikihiro/migrate_convert_from_to_tryfrom
Veykril Aug 3, 2025
e47f791
Merge pull request #20368 from Hmikihiro/migrate_delegate_methods
Veykril Aug 3, 2025
b373cb1
Migrate `generate_trait_from_impl` assist to use `SyntaxEditor`
Hmikihiro Aug 3, 2025
0d2a7e6
Merge pull request #20371 from Hmikihiro/migrate_generate_trait_from_…
Veykril Aug 3, 2025
277cf46
Remove unused functions from edit_in_place
Hmikihiro Aug 3, 2025
efbe625
Merge pull request #20372 from Hmikihiro/remove_unused_fn_from_edit_i…
Veykril Aug 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
When displaying a projection into a type parameter that has bounds as…
… `impl Trait`, collect only the bounds of this projection

It used to collect the bounds of them all.
  • Loading branch information
ChayimFriedman2 committed Jul 29, 2025
commit ea1e24a989721a1d285d6de913be2be2b5101439
26 changes: 13 additions & 13 deletions src/tools/rust-analyzer/crates/hir-ty/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,19 +620,19 @@ impl HirDisplay for ProjectionTy {
.generic_predicates(id.parent)
.iter()
.map(|pred| pred.clone().substitute(Interner, &substs))
.filter(|wc| match wc.skip_binders() {
WhereClause::Implemented(tr) => {
matches!(
tr.self_type_parameter(Interner).kind(Interner),
TyKind::Alias(_)
)
}
WhereClause::TypeOutlives(t) => {
matches!(t.ty.kind(Interner), TyKind::Alias(_))
}
// We shouldn't be here if these exist
WhereClause::AliasEq(_) => false,
WhereClause::LifetimeOutlives(_) => false,
.filter(|wc| {
let ty = match wc.skip_binders() {
WhereClause::Implemented(tr) => tr.self_type_parameter(Interner),
WhereClause::TypeOutlives(t) => t.ty.clone(),
// We shouldn't be here if these exist
WhereClause::AliasEq(_) | WhereClause::LifetimeOutlives(_) => {
return false;
}
};
let TyKind::Alias(AliasTy::Projection(proj)) = ty.kind(Interner) else {
return false;
};
proj == self
})
.collect::<Vec<_>>();
if !bounds.is_empty() {
Expand Down
30 changes: 30 additions & 0 deletions src/tools/rust-analyzer/crates/ide/src/inlay_hints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
"#,
);
}
}