Skip to content

Subtree update of rust-analyzer #119732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 104 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
331abe2
Updated instructions for installing rust-analyzer under Gentoo.
paul-jewell Nov 17, 2023
8a0a3b2
fix: extract_struct_from_enum_variant should resolve `Self` generic arg
Young-Flash Dec 26, 2023
67f001e
test: add test case for `Self`
Young-Flash Dec 26, 2023
a38a79e
use SyntaxKind instead of "Self" literal comparison
Young-Flash Dec 27, 2023
6a7d3f1
add test case for nested generic arg with `Self`
Young-Flash Dec 27, 2023
52f7575
minor: chore: fix typos and urls in docs/dev/guide.md
davidsemakula Dec 29, 2023
1b7968a
fix: try obligation of `IndexMut` when infer
Austaras Dec 11, 2023
613774e
feat: add quickfix for redundant_assoc_item diagnostic
Young-Flash Jan 1, 2024
4eb3d2e
test: add test case for redundant_assoc_item quickfix
Young-Flash Jan 1, 2024
932d85b
Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-fro…
lnicola Jan 3, 2024
d3d7c4b
Allow unexpected_cfgs in proc-macro-test imp
lnicola Dec 25, 2023
375f1cc
scip: Populate SymbolInformation::display_name
nicolas-guichard Dec 8, 2023
62663e6
scip: Refactor token_to_symbol to moniker_to_symbol
nicolas-guichard Dec 5, 2023
495a556
scip: Populate SymbolInformation::enclosing_symbol
nicolas-guichard Dec 5, 2023
b249149
Refactor label & docs from ide::hover::render to ide-db::defs::Defini…
nicolas-guichard Dec 8, 2023
566bb77
scip: Populate SymbolInformation::signature_documentation
nicolas-guichard Dec 8, 2023
cf22f02
fix: Fix focus range being discarded in attributes/derives when upmap…
Veykril Jan 3, 2024
73d9c77
scip: Populate SymbolInformation::kind
nicolas-guichard Dec 8, 2023
099c320
fix: use PathTransform to resolve GenericArg
Young-Flash Jan 3, 2024
1a9b1b8
test: add test case for TupleField
Young-Flash Jan 3, 2024
d987137
Auto merge of #16234 - Veykril:token-upmap, r=Veykril
bors Jan 3, 2024
0781832
Auto merge of #16179 - nicolas-guichard:scip/new_fields, r=Veykril
bors Jan 3, 2024
91ffbd7
Auto merge of #15922 - paul-jewell:master, r=Veykril
bors Jan 3, 2024
fe6f931
hir: resolve associated items in docs (excl. type aliases)
71 Nov 19, 2023
570ee51
Tweak Gentoo instructions
lnicola Jan 3, 2024
c5c1360
fix: make diagnostic range accommodate for macros
Young-Flash Jan 3, 2024
4f94ebb
Auto merge of #16238 - lnicola:gentoo-docs, r=lnicola
bors Jan 3, 2024
3fe6ff7
Auto merge of #16085 - Austaras:master, r=Veykril
bors Jan 3, 2024
3fc043c
internal: Remove unnecessary Arc allocations in `macro_expand`
Veykril Jan 3, 2024
c3c07c6
Auto merge of #15933 - 71:inherent-items-in-docs, r=Veykril
bors Jan 3, 2024
9279c65
Auto merge of #16237 - Veykril:expand-arc-alloc, r=Veykril
bors Jan 3, 2024
f0f7448
Give a userful error when rustc cannot be found in explicit sysroot
Noratrieb Jan 3, 2024
751d9d1
Add proc-macro-test crate back to the main workspace
Veykril Jan 4, 2024
adf052c
Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-fro…
lnicola Jan 4, 2024
a66777c
Merge branch 'master' into sync-from-rust
lnicola Jan 4, 2024
8356bc9
Auto merge of #16249 - lnicola:sync-from-rust, r=lnicola
bors Jan 4, 2024
95e047e
Auto merge of #16248 - Veykril:proc-macro-test, r=lnicola
bors Jan 4, 2024
6889117
Add description to span crate manifest
lnicola Jan 4, 2024
c3a00b5
Auto merge of #16251 - lnicola:span-description, r=lnicola
bors Jan 4, 2024
084acc2
Extract relevant information into hashmaps
Urhengulas Jan 4, 2024
d1f4171
Refactor to iterators
Urhengulas Jan 4, 2024
05a3c2f
Make filtering a function
Urhengulas Jan 4, 2024
dea149d
Switch to BTreeMap for stable ordering
Urhengulas Jan 4, 2024
f2b872a
Switch to Vec, because we do want to have duplicate keys
Urhengulas Jan 4, 2024
ea675ab
Insert newline at the end
Urhengulas Jan 4, 2024
656ac10
Do not extract FileId for file_system_edits
Urhengulas Jan 4, 2024
7f75815
Auto merge of #16252 - Urhengulas:dont-assert-debug, r=Veykril
bors Jan 4, 2024
a2aab00
Auto merge of #16241 - Nilstrieb:sysrooting, r=Veykril
bors Jan 4, 2024
e9632bd
Only compare test name
Urhengulas Jan 4, 2024
f3770c1
Compare test ids instead of names, seems more robust
Urhengulas Jan 4, 2024
3f8083f
Only compare navigation targets
Urhengulas Jan 4, 2024
9bc005a
Only iterate through runnables once
Urhengulas Jan 4, 2024
971fc1b
Also compare navigation targets for tests
Urhengulas Jan 4, 2024
dbeb27e
Refactor check
Urhengulas Jan 4, 2024
9b30521
internal: Rewrite ImportMap::search_dependencies
Veykril Jan 4, 2024
594e0a5
Only compare range and label
Urhengulas Jan 4, 2024
e88788e
Auto merge of #16258 - Veykril:import-map-fix, r=Veykril
bors Jan 4, 2024
61b5521
Move check_expect and check_expect_clear_loc to `inlayhints::chaining`
Urhengulas Jan 4, 2024
c3a29e5
Remove limit from import_map::Query
Veykril Jan 4, 2024
03b1ecd
Replace only occurence of check_expect with check_diagnostics
Urhengulas Jan 4, 2024
a795f48
Auto merge of #16260 - Urhengulas:ide-diagnostics-refactor-tests, r=l…
bors Jan 4, 2024
f8ff4fb
Conditionally include use_name_in_title and cfg
Urhengulas Jan 4, 2024
f098123
update docs/dev/guide.md based on 2024-01-01 release
davidsemakula Jan 4, 2024
0af780e
Fix symbol_index::Query::search_maps not adhering to case-sensitivity…
Veykril Jan 4, 2024
2666349
Remove limit from symbol_index::Query
Veykril Jan 4, 2024
c84352a
Auto merge of #16261 - Veykril:import-map-fix, r=Veykril
bors Jan 4, 2024
0d6ec9c
Further tuning of the Gentoo installation instructions.
paul-jewell Jan 4, 2024
443787f
Added reference to the binaries available from GitHub.
paul-jewell Jan 4, 2024
7c259a0
fix typos and update descriptions
davidsemakula Jan 4, 2024
bf0c4ac
internal: refactor generate_delegate_trait and add comments
roife Jan 4, 2024
fbdc59c
internal: remove unnecessary path_tranform on type_gen_args in genera…
roife Jan 5, 2024
03ec008
Tweak wording a little more
lnicola Jan 5, 2024
28e4a9a
Auto merge of #16262 - paul-jewell:gentoo-instruction-tuneup, r=lnicola
bors Jan 5, 2024
d60638e
Deduplicate some code
Veykril Jan 4, 2024
11b0126
Auto merge of #16267 - Veykril:import-map-fix, r=Veykril
bors Jan 5, 2024
4f75e0f
Remove completion limit for trait importing method completions
Veykril Jan 5, 2024
dc31cef
Auto merge of #16268 - Veykril:method-trait-completion-limit, r=Veykril
bors Jan 5, 2024
cc2b79f
internal: Speed up import searching some more
Veykril Jan 5, 2024
af102ba
Auto merge of #16270 - Veykril:flyimport-perf, r=Veykril
bors Jan 5, 2024
1c6755c
Auto merge of #16213 - davidsemakula:guide-typos-urls, r=lnicola
bors Jan 5, 2024
2980d54
Auto merge of #16223 - Young-Flash:quickfix_redundant_assoc_item, r=V…
bors Jan 5, 2024
5945709
Auto merge of #16199 - Young-Flash:extract_struct_with_Self, r=Veykril
bors Jan 5, 2024
2271b82
Auto merge of #16264 - roife:refactor/refactor-generate-delegate-trai…
bors Jan 5, 2024
e53792b
Auto merge of #16256 - Urhengulas:ide-runnables-assert_eq, r=Veykril
bors Jan 5, 2024
963568b
feat: IDE features for primitive tuple fields
Veykril Jan 6, 2024
c9c4053
More aliases
Veykril Jan 6, 2024
5125063
Remove unnecessary cloning
Veykril Jan 6, 2024
30e17e3
Fix panic on unaligned packed attribute
lnicola Jan 6, 2024
f8eab9b
Auto merge of #16279 - Veykril:ide-tuple-fields, r=Veykril
bors Jan 6, 2024
d17156a
Add some repr(packed) tests
lnicola Jan 6, 2024
5ac0c14
Remove some vec clones in const-eval
Veykril Jan 6, 2024
e9ae0b7
Auto merge of #16285 - lnicola:repr-packed-unaligned, r=Veykril
bors Jan 6, 2024
f595e60
Auto merge of #16290 - Veykril:chalk, r=Veykril
bors Jan 6, 2024
476e10e
remove redundant clones
matthiaskrgr Jan 6, 2024
b22bd36
remove more redundant clones manually
matthiaskrgr Jan 6, 2024
196650d
don't to_string() format args
matthiaskrgr Jan 7, 2024
3fb2cd2
autofix remaining perf findings
matthiaskrgr Jan 7, 2024
3c378b9
Add inlay hint for exclusive ranges
riverbl Jan 6, 2024
1c5fa44
Auto merge of #16294 - matthiaskrgr:less_alloc, r=Veykril
bors Jan 7, 2024
6ce3f44
Auto merge of #16298 - riverbl:exclusive-range-hint, r=Veykril
bors Jan 7, 2024
747fa7d
line-index: Create README.md
homersimpsons Jan 7, 2024
0f69276
line-index: Update README.md with suggestions
homersimpsons Jan 7, 2024
af40101
Auto merge of #16302 - homersimpsons:patch-1, r=lnicola
bors Jan 7, 2024
fd63ff0
Merge commit 'af40101841c45aa75b56f4e9ca745369da8fb4ba' into sync-fro…
lnicola Jan 8, 2024
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
1 change: 1 addition & 0 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ dependencies = [
"expect-test",
"hir-def",
"hir-expand",
"indexmap",
"intern",
"itertools",
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down
4 changes: 2 additions & 2 deletions src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = ["xtask/", "lib/*", "crates/*"]
exclude = ["crates/proc-macro-srv/proc-macro-test/"]
exclude = ["crates/proc-macro-srv/proc-macro-test/imp"]
resolver = "2"

[workspace.package]
Expand Down Expand Up @@ -138,4 +138,4 @@ dashmap = { version = "=5.5.3", features = ["raw-api"] }
collapsible_if = "allow"
needless_pass_by_value = "allow"
nonminimal_bool = "allow"
redundant_pattern_matching = "allow"
redundant_pattern_matching = "allow"
7 changes: 4 additions & 3 deletions src/tools/rust-analyzer/crates/hir-def/src/body/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use smallvec::SmallVec;
use syntax::{
ast::{
self, ArrayExprKind, AstChildren, BlockExpr, HasArgList, HasAttrs, HasLoopBody, HasName,
SlicePatComponents,
RangeItem, SlicePatComponents,
},
AstNode, AstPtr, SyntaxNodePtr,
};
Expand Down Expand Up @@ -622,7 +622,8 @@ impl ExprCollector<'_> {
ast::Expr::IndexExpr(e) => {
let base = self.collect_expr_opt(e.base());
let index = self.collect_expr_opt(e.index());
self.alloc_expr(Expr::Index { base, index }, syntax_ptr)
let is_assignee_expr = self.is_lowering_assignee_expr;
self.alloc_expr(Expr::Index { base, index, is_assignee_expr }, syntax_ptr)
}
ast::Expr::RangeExpr(e) => {
let lhs = e.start().map(|lhs| self.collect_expr(lhs));
Expand Down Expand Up @@ -1609,7 +1610,7 @@ impl ExprCollector<'_> {
|name| self.alloc_expr_desugared(Expr::Path(Path::from(name))),
|name, span| {
if let Some(span) = span {
mappings.push((span, name.clone()))
mappings.push((span, name))
}
},
),
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/body/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl Printer<'_> {
w!(self, ") ");
}
}
Expr::Index { base, index } => {
Expr::Index { base, index, is_assignee_expr: _ } => {
self.print_expr(*base);
w!(self, "[");
self.print_expr(*index);
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/data/adt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ fn parse_repr_tt(tt: &Subtree) -> Option<ReprOptions> {
} else {
0
};
let pack = Align::from_bytes(pack).unwrap();
let pack = Align::from_bytes(pack).unwrap_or(Align::ONE);
min_pack =
Some(if let Some(min_pack) = min_pack { min_pack.min(pack) } else { pack });
ReprFlags::empty()
Expand Down
3 changes: 2 additions & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ pub enum Expr {
Index {
base: ExprId,
index: ExprId,
is_assignee_expr: bool,
},
Closure {
args: Box<[PatId]>,
Expand Down Expand Up @@ -432,7 +433,7 @@ impl Expr {
f(rhs);
}
}
Expr::Index { base, index } => {
Expr::Index { base, index, .. } => {
f(*base);
f(*index);
}
Expand Down
Loading