Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
3d3ffc2
Do not assume array destructuring assignments with rest pattern are c…
ChayimFriedman2 May 28, 2026
c93e28d
Guard against empty flycheck list in once invocation strategy
UnknownHacker1 Jun 23, 2026
c4bdb5d
Ask for disclosure in AI contributions
ChayimFriedman2 Jul 12, 2026
b62910e
Resolve non-plain paths in blocks correctly
ChayimFriedman2 Jul 12, 2026
467ab72
Merge pull request #22771 from ChayimFriedman2/ai-disclosure
ShoyuVanilla Jul 13, 2026
8fca81a
update links to `rustc_hir_analysis`
ada4a Jul 13, 2026
f50ff75
Merge pull request #22776 from ada4a/push-kqtpsnrxryrw
Veykril Jul 13, 2026
ea9cdbf
Merge pull request #22773 from ChayimFriedman2/block-non-plain
Veykril Jul 13, 2026
b7153ab
Treat library files as truly client immutable
Veykril Jul 11, 2026
e9a7b45
Merge pull request #22777 from Veykril/lukaswirth/push-ynsyxtpluxqp
Veykril Jul 13, 2026
c4c8da1
Split out a session construct
Veykril Jul 11, 2026
8c99c93
feat: early late classification of lifetimes
dfireBird Apr 19, 2026
d501645
fix: early/late bound idx and opaque captured lifetimes
dfireBird May 9, 2026
a50492c
fix: idx and type of lifetimes captured by opaque
dfireBird May 9, 2026
c31f1ba
fix: consider_late_bound field in Generics for RPITs
dfireBird May 15, 2026
90883ed
fix: lower all opaque type lifetime to early bound in async bounds lo…
dfireBird May 15, 2026
9eb9fe6
fix: address PR review comments
dfireBird May 18, 2026
06a3654
feat: use type_ref visit and lifetime indices for type alias constrai…
dfireBird May 18, 2026
f7067cc
refactor: use deref in get_constrained_lifetimes query and move where…
dfireBird May 29, 2026
0c7f279
fix: use dummy binder for impl trait size auto trait bounds
dfireBird Jun 3, 2026
c249208
Fix late params overlapping
Veykril Jun 6, 2026
88ce215
Fix invalid index usage in get_constrained_lifetimes_if_type_alias
Veykril Jun 6, 2026
4af26d1
fix: len method of generics next solver to use `consider_late_bound`
dfireBird Jun 6, 2026
2ebd3e3
Merge pull request #22778 from Veykril/lukaswirth/push-kumzlztynowk
Veykril Jul 13, 2026
f8a569c
Merge pull request #22283 from dfireBird/push-vqzllvyozoqs
Veykril Jul 13, 2026
1f04abb
Remove tree mutator from source_change in ide-db
bit-aloo Jul 13, 2026
0fad072
Turn `BlockLoc` into a tracked struct, take 3
Veykril Jun 6, 2026
1beb1bd
fix: Fix `render_const_using_debug_impl` constructing outdated std la…
Veykril Jun 13, 2026
30e918b
Eval const blocks
Veykril Jun 14, 2026
6c6c58a
feat: Hide private fields on hover depending on context
Veykril May 26, 2026
96e32ee
Merge pull request #22534 from Veykril/lukaswirth/push-yszpqlvwztyw
Veykril Jul 13, 2026
95ed590
Merge pull request #22583 from Veykril/lukaswirth/push-mrssuywrvpzo
Veykril Jul 13, 2026
0250eac
Merge pull request #22464 from Veykril/push-rkuqmqwwmpoq
Veykril Jul 13, 2026
243f631
move `cycle_result` from query group to the underlying queries
ada4a Jul 13, 2026
a21b8b5
remove cycle handling from `#[query_macro]`
ada4a Jul 13, 2026
4e47e98
fix: Reimplement `crate_supports_no_std` syntactic heuristic
Veykril Jul 9, 2026
e334319
Merge pull request #22747 from Veykril/lukaswirth/push-zwpsumlyprzo
Veykril Jul 13, 2026
ade63af
Merge pull request #22780 from ada4a/unquerygroup-cycle
ChayimFriedman2 Jul 13, 2026
3283ea5
Merge pull request #22779 from Shourya742/2026-07-13-remove-tree-muta…
ChayimFriedman2 Jul 13, 2026
abe290c
Do not `#[macro_use]` the sysroot crates
ChayimFriedman2 Jul 13, 2026
03456e6
docs: point ungrammar example doc at existing file
Jul 14, 2026
6245d91
Merge pull request #22787 from nataziel/ungrammar_doc
ChayimFriedman2 Jul 14, 2026
f640af1
Merge pull request #22784 from ChayimFriedman2/no-stdlib-macrouse
Veykril Jul 14, 2026
a0f12c4
Fix invalid `pattern_matching_variant` lowering due to recovery
Veykril Jul 14, 2026
f74d812
Merge pull request #22789 from Veykril/lukaswirth/push-vtwwyxkznxwt
Veykril Jul 14, 2026
0de8299
fix: Use quote! inside ast::make::expr_call()
Wilfred Jul 13, 2026
1e2a995
Merge pull request #22782 from Wilfred/fix-generate-delegate-trait-ca…
ChayimFriedman2 Jul 14, 2026
b60e2e2
Fix extract variable preserving whitespace from macro input
cuishuang Jul 14, 2026
c44e4ef
Fix extract variable preserving whitespace from macro input
cuishuang Jul 14, 2026
483dd34
Fix extract variable preserving whitespace from macro input
cuishuang Jul 14, 2026
9998c49
Merge pull request #22792 from cuishuang/master
A4-Tacks Jul 14, 2026
9572cc7
Remove always!() assert now that an empty flycheck list is valid
UnknownHacker1 Jul 14, 2026
19e5c5c
tidy: Reuse flyimport lowercase buffer
mingley Jul 14, 2026
253d9e9
Merge pull request #22794 from mingley/mingley/reuse-flyimport-lowerc…
ChayimFriedman2 Jul 14, 2026
3461311
Only write anon const ty in parent's inference result if it doesn't h…
ChayimFriedman2 Jul 14, 2026
96d10bf
Merge pull request #22634 from UnknownHacker1/fix/21638-flycheck-inde…
Veykril Jul 15, 2026
e84b5dd
Fix `hir` crate leaking bound variables
Veykril Jul 15, 2026
d446c15
Merge pull request #22810 from Veykril/lukaswirth/push-rtuzkyotnvxx
Veykril Jul 15, 2026
f9f8d22
Enable auto trait inference
Veykril Jul 14, 2026
dc6780d
feat: Add capture hints to coroutines
Veykril Jul 15, 2026
49e3bfa
Merge pull request #22811 from Veykril/lukaswirth/push-vntrlsumxwqz
Veykril Jul 15, 2026
a67a85a
Merge pull request #22791 from Veykril/lukaswirth/push-lnrnonstwsns
Veykril Jul 15, 2026
aea3658
internal: remove manual lifetime extension
ada4a Jul 15, 2026
fa180e0
When `experimental/serverStatus` is not supported by the client, only…
ChayimFriedman2 Jul 15, 2026
1820c52
Merge pull request #22815 from ada4a/push-mqsknqnotoku
ChayimFriedman2 Jul 15, 2026
c09e2c1
Merge pull request #22804 from ChayimFriedman2/array-repeat-closure
ChayimFriedman2 Jul 15, 2026
790cf83
misc improvements
ada4a Jul 9, 2026
ddb48de
migrate `HirDatabase::borrowck`
ada4a Jul 13, 2026
d8761e7
Merge pull request #22814 from ada4a/unquerygroup-borrowck
ChayimFriedman2 Jul 15, 2026
ad16a5c
Fix panic with a function item and a proc macro item having a duplica…
RealRTTV Jul 15, 2026
8fb9c65
Merge pull request #22822 from RealRTTV/master
ChayimFriedman2 Jul 15, 2026
22489ad
Do not store `Option` in the interner cache's thread local
ChayimFriedman2 Jul 15, 2026
b490df9
Merge pull request #22824 from ChayimFriedman2/interner-tls-cache
ChayimFriedman2 Jul 15, 2026
04140de
Respect the `hover.documentation.enable` config
ChayimFriedman2 Jul 15, 2026
4cafbe3
fix: Fix coroutines not recording binding owners correctly
Veykril Jul 16, 2026
10d5c06
Merge pull request #22832 from Veykril/lukaswirth/push-ntxsszurymwp
Veykril Jul 16, 2026
7ebb721
Merge pull request #22819 from ChayimFriedman2/serverstatus-same-message
Veykril Jul 16, 2026
2aa2a5b
Merge pull request #22825 from ChayimFriedman2/doc-config-hover
Veykril Jul 16, 2026
a538f05
feat: E0572 - add diagnostic support for when return or become statem…
Yashb404 Jul 15, 2026
dae44e0
fix!: use `Result` for the lsp-server `Response` payload type
ribru17 Jul 14, 2026
587245d
Merge pull request #22793 from ribru17/response_type_update
ChayimFriedman2 Jul 16, 2026
0f911fd
Fix: parser to error on macro type bound
RealRTTV Jul 16, 2026
b252fc7
Merge pull request #22827 from RealRTTV/master
ChayimFriedman2 Jul 16, 2026
4e7cc28
Merge pull request #22813 from Yashb404/master
ChayimFriedman2 Jul 17, 2026
7ae7c10
Merge pull request #22483 from ChayimFriedman2/destructuring-assignme…
Veykril Jul 17, 2026
5e6ac17
internal: Prefer quote! for make::param() and make::tail_only_block_expr
Wilfred Jul 13, 2026
c19056d
Merge pull request #22759 from Wilfred/fix/syntax-factory-mapping-unw…
A4-Tacks Jul 18, 2026
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/AI_POLICY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
We allow using AI (i.e., LLMs) as tools for contributing to rust-analyzer.
However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
We hold a high bar for all contributions to our projects.
Also, we kindly ask you to disclose usage of AI tools in your contributions.

**AI should not be used to generate comments when communicating with maintainers**.
We expect comments on our projects to be written by humans.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ dependencies = [

[[package]]
name = "lsp-server"
version = "0.9.0"
version = "0.10.0"
dependencies = [
"anyhow",
"crossbeam-channel",
Expand Down
5 changes: 5 additions & 0 deletions src/tools/rust-analyzer/crates/base-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ impl Default for Nonce {
}

impl Nonce {
#[inline]
pub const fn invalid() -> Nonce {
Nonce(usize::MAX)
}

#[inline]
pub fn new() -> Nonce {
Nonce(NEXT_NONCE.fetch_add(1, std::sync::atomic::Ordering::SeqCst))
Expand Down
23 changes: 23 additions & 0 deletions src/tools/rust-analyzer/crates/hir-def/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,29 @@ pub fn parse_extra_crate_attrs(db: &dyn SourceDatabase, krate: Crate) -> Option<
Some(p.tree())
}

/// Whether the crate root declares `#![no_std]`, looking through `cfg_attr` gating.
#[salsa::tracked(returns(copy))]
pub(crate) fn crate_supports_no_std(db: &dyn SourceDatabase, krate: Crate) -> bool {
fn contains_no_std(meta: ast::Meta) -> bool {
match meta {
ast::Meta::PathMeta(meta) => meta.path().is1("no_std"),
ast::Meta::CfgAttrMeta(meta) => meta.metas().any(contains_no_std),
ast::Meta::UnsafeMeta(meta) => meta.meta().is_some_and(contains_no_std),
ast::Meta::CfgMeta(_) | ast::Meta::KeyValueMeta(_) | ast::Meta::TokenTreeMeta(_) => {
false
}
}
}

let root_file = krate.root_file_id(db).parse(db).tree();
parse_extra_crate_attrs(db, krate)
.into_iter()
.flat_map(|extra| extra.attrs())
.chain(root_file.attrs())
.filter_map(|attr| attr.meta())
.any(contains_no_std)
}

fn attrs_source(
db: &dyn SourceDatabase,
owner: AttrDefId,
Expand Down
40 changes: 24 additions & 16 deletions src/tools/rust-analyzer/crates/hir-def/src/expr_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ impl ExpressionStore {
}
}

pub trait StoreVisitor {
pub trait StoreVisitor: Sized {
fn on_expr(&mut self, expr: ExprId) {
let _ = expr;
}
Expand All @@ -963,6 +963,26 @@ pub trait StoreVisitor {
fn on_lifetime(&mut self, lifetime: LifetimeRefId) {
let _ = lifetime;
}

fn on_generic_args(&mut self, args: &GenericArgs) {
visit_generic_args(self, args);
}
}

pub(crate) fn visit_generic_args<V: StoreVisitor>(visitor: &mut V, args: &GenericArgs) {
let GenericArgs { args, bindings, parenthesized: _, has_self_type: _ } = args;
for arg in args {
match arg {
GenericArg::Type(arg) => visitor.on_type(*arg),
GenericArg::Const(ConstRef { expr }) => visitor.on_anon_const_expr(*expr),
GenericArg::Lifetime(arg) => visitor.on_lifetime(*arg),
}
}
for AssociatedTypeBinding { name: _, args, type_ref, bounds } in bindings {
visitor.on_generic_args_opt(args);
visitor.on_type_opt(*type_ref);
visitor.on_type_bounds(bounds);
}
}

impl<V: StoreVisitor> StoreVisitor for &mut V {
Expand All @@ -981,25 +1001,13 @@ impl<V: StoreVisitor> StoreVisitor for &mut V {
fn on_lifetime(&mut self, lifetime: LifetimeRefId) {
V::on_lifetime(self, lifetime);
}
}

trait StoreVisitorExt: StoreVisitor {
fn on_generic_args(&mut self, args: &GenericArgs) {
let GenericArgs { args, bindings, parenthesized: _, has_self_type: _ } = args;
for arg in args {
match arg {
GenericArg::Type(arg) => self.on_type(*arg),
GenericArg::Const(ConstRef { expr }) => self.on_anon_const_expr(*expr),
GenericArg::Lifetime(arg) => self.on_lifetime(*arg),
}
}
for AssociatedTypeBinding { name: _, args, type_ref, bounds } in bindings {
self.on_generic_args_opt(args);
self.on_type_opt(*type_ref);
self.on_type_bounds(bounds);
}
V::on_generic_args(self, args);
}
}

trait StoreVisitorExt: StoreVisitor {
fn on_type_bound(&mut self, bound: &TypeBound) {
match bound {
TypeBound::Path(path_id, _) => self.on_type(path_id.type_ref()),
Expand Down
Loading
Loading