Skip to content

Commit b184c26

Browse files
authored
Merge pull request #4786 from rust-lang/rustup-2025-12-23
Automatic Rustup
2 parents fe5be23 + c1b7854 commit b184c26

189 files changed

Lines changed: 7921 additions & 4346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
> [!IMPORTANT]
2+
> We have enacted a feature freeze for IDE assists to cope with the PR backlog as well as allowing us to prepare for the rowan transition!
3+
> If you submit a PR that **adds** new ide-assists, chances are very high that we will just close it on this basis alone until we have the capacity to deal with them again.
4+
5+
16
# Contributing to rust-analyzer
27

38
Thank you for your interest in contributing to rust-analyzer! There are many ways to contribute
@@ -28,3 +33,11 @@ possibility of someone putting a lot of work into a feature that is then going t
2833
it out of scope (be it due to generally not fitting in with rust-analyzer, or just not having the
2934
maintenance capacity). If there already is a feature issue open but it is not clear whether it is
3035
considered accepted feel free to just drop a comment and ask!
36+
37+
## Use of AI tools
38+
39+
AI tool use is not discouraged on the rust-analyzer codebase, as long as it meets our quality standards.
40+
We kindly ask you to disclose usage of AI tools in your contributions.
41+
If you used them without disclosing it, we may reject your contribution on that basis alone due to the assumption that you likely not reviewed your own submission (so why should we?).
42+
43+
We may still reject AI-assisted contributions if we deem the quality of the contribution to be unsatisfactory as to reduce impact on the team's review budget.

Cargo.lock

Lines changed: 33 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
8686
vfs = { path = "./crates/vfs", version = "0.0.0" }
8787
edition = { path = "./crates/edition", version = "0.0.0" }
8888

89-
ra-ap-rustc_lexer = { version = "0.139", default-features = false }
90-
ra-ap-rustc_parse_format = { version = "0.139", default-features = false }
91-
ra-ap-rustc_index = { version = "0.139", default-features = false }
92-
ra-ap-rustc_abi = { version = "0.139", default-features = false }
93-
ra-ap-rustc_pattern_analysis = { version = "0.139", default-features = false }
94-
ra-ap-rustc_ast_ir = { version = "0.139", default-features = false }
95-
ra-ap-rustc_type_ir = { version = "0.139", default-features = false }
96-
ra-ap-rustc_next_trait_solver = { version = "0.139", default-features = false }
89+
ra-ap-rustc_lexer = { version = "0.143", default-features = false }
90+
ra-ap-rustc_parse_format = { version = "0.143", default-features = false }
91+
ra-ap-rustc_index = { version = "0.143", default-features = false }
92+
ra-ap-rustc_abi = { version = "0.143", default-features = false }
93+
ra-ap-rustc_pattern_analysis = { version = "0.143", default-features = false }
94+
ra-ap-rustc_ast_ir = { version = "0.143", default-features = false }
95+
ra-ap-rustc_type_ir = { version = "0.143", default-features = false }
96+
ra-ap-rustc_next_trait_solver = { version = "0.143", default-features = false }
9797

9898
# local crates that aren't published to crates.io. These should not have versions.
9999

@@ -135,13 +135,13 @@ rayon = "1.10.0"
135135
rowan = "=0.15.17"
136136
# Ideally we'd not enable the macros feature but unfortunately the `tracked` attribute does not work
137137
# on impls without it
138-
salsa = { version = "0.24.0", default-features = false, features = [
138+
salsa = { version = "0.25.2", default-features = false, features = [
139139
"rayon",
140140
"salsa_unstable",
141141
"macros",
142142
"inventory",
143143
] }
144-
salsa-macros = "0.24.0"
144+
salsa-macros = "0.25.2"
145145
semver = "1.0.26"
146146
serde = { version = "1.0.219" }
147147
serde_derive = { version = "1.0.219" }

crates/base-db/src/input.rs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ pub struct CrateData<Id> {
351351
/// declared in source via `extern crate test`.
352352
pub dependencies: Vec<Dependency<Id>>,
353353
pub origin: CrateOrigin,
354+
/// Extra crate-level attributes, including the surrounding `#![]`.
355+
pub crate_attrs: Box<[Box<str>]>,
354356
pub is_proc_macro: bool,
355357
/// The working directory to run proc-macros in invoked in the context of this crate.
356358
/// This is the workspace root of the cargo workspace for workspace members, the crate manifest
@@ -465,7 +467,7 @@ impl Crate {
465467
/// including the crate itself.
466468
///
467469
/// **Warning**: do not use this query in `hir-*` crates! It kills incrementality across crate metadata modifications.
468-
pub fn transitive_deps(self, db: &dyn salsa::Database) -> Box<[Crate]> {
470+
pub fn transitive_deps(self, db: &dyn salsa::Database) -> Vec<Crate> {
469471
// There is a bit of duplication here and in `CrateGraphBuilder` in the same method, but it's not terrible
470472
// and removing that is a bit difficult.
471473
let mut worklist = vec![self];
@@ -480,7 +482,7 @@ impl Crate {
480482

481483
worklist.extend(krate.data(db).dependencies.iter().map(|dep| dep.crate_id));
482484
}
483-
deps.into_boxed_slice()
485+
deps
484486
}
485487

486488
/// Returns all transitive reverse dependencies of the given crate,
@@ -530,6 +532,7 @@ impl CrateGraphBuilder {
530532
mut potential_cfg_options: Option<CfgOptions>,
531533
mut env: Env,
532534
origin: CrateOrigin,
535+
crate_attrs: Vec<String>,
533536
is_proc_macro: bool,
534537
proc_macro_cwd: Arc<AbsPathBuf>,
535538
ws_data: Arc<CrateWorkspaceData>,
@@ -539,12 +542,17 @@ impl CrateGraphBuilder {
539542
if let Some(potential_cfg_options) = &mut potential_cfg_options {
540543
potential_cfg_options.shrink_to_fit();
541544
}
545+
let crate_attrs: Vec<_> = crate_attrs
546+
.into_iter()
547+
.map(|raw_attr| format!("#![{raw_attr}]").into_boxed_str())
548+
.collect();
542549
self.arena.alloc(CrateBuilder {
543550
basic: CrateData {
544551
root_file_id,
545552
edition,
546553
dependencies: Vec::new(),
547554
origin,
555+
crate_attrs: crate_attrs.into_boxed_slice(),
548556
is_proc_macro,
549557
proc_macro_cwd,
550558
},
@@ -648,6 +656,7 @@ impl CrateGraphBuilder {
648656
edition: krate.basic.edition,
649657
is_proc_macro: krate.basic.is_proc_macro,
650658
origin: krate.basic.origin.clone(),
659+
crate_attrs: krate.basic.crate_attrs.clone(),
651660
root_file_id: krate.basic.root_file_id,
652661
proc_macro_cwd: krate.basic.proc_macro_cwd.clone(),
653662
};
@@ -975,6 +984,7 @@ mod tests {
975984
Default::default(),
976985
Env::default(),
977986
CrateOrigin::Local { repo: None, name: None },
987+
Vec::new(),
978988
false,
979989
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
980990
empty_ws_data(),
@@ -988,6 +998,7 @@ mod tests {
988998
Default::default(),
989999
Env::default(),
9901000
CrateOrigin::Local { repo: None, name: None },
1001+
Vec::new(),
9911002
false,
9921003
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
9931004
empty_ws_data(),
@@ -1001,6 +1012,7 @@ mod tests {
10011012
Default::default(),
10021013
Env::default(),
10031014
CrateOrigin::Local { repo: None, name: None },
1015+
Vec::new(),
10041016
false,
10051017
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
10061018
empty_ws_data(),
@@ -1034,6 +1046,7 @@ mod tests {
10341046
Default::default(),
10351047
Env::default(),
10361048
CrateOrigin::Local { repo: None, name: None },
1049+
Vec::new(),
10371050
false,
10381051
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
10391052
empty_ws_data(),
@@ -1047,6 +1060,7 @@ mod tests {
10471060
Default::default(),
10481061
Env::default(),
10491062
CrateOrigin::Local { repo: None, name: None },
1063+
Vec::new(),
10501064
false,
10511065
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
10521066
empty_ws_data(),
@@ -1075,6 +1089,7 @@ mod tests {
10751089
Default::default(),
10761090
Env::default(),
10771091
CrateOrigin::Local { repo: None, name: None },
1092+
Vec::new(),
10781093
false,
10791094
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
10801095
empty_ws_data(),
@@ -1088,6 +1103,7 @@ mod tests {
10881103
Default::default(),
10891104
Env::default(),
10901105
CrateOrigin::Local { repo: None, name: None },
1106+
Vec::new(),
10911107
false,
10921108
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
10931109
empty_ws_data(),
@@ -1101,6 +1117,7 @@ mod tests {
11011117
Default::default(),
11021118
Env::default(),
11031119
CrateOrigin::Local { repo: None, name: None },
1120+
Vec::new(),
11041121
false,
11051122
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
11061123
empty_ws_data(),
@@ -1129,6 +1146,7 @@ mod tests {
11291146
Default::default(),
11301147
Env::default(),
11311148
CrateOrigin::Local { repo: None, name: None },
1149+
Vec::new(),
11321150
false,
11331151
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
11341152
empty_ws_data(),
@@ -1142,6 +1160,7 @@ mod tests {
11421160
Default::default(),
11431161
Env::default(),
11441162
CrateOrigin::Local { repo: None, name: None },
1163+
Vec::new(),
11451164
false,
11461165
Arc::new(AbsPathBuf::assert_utf8(std::env::current_dir().unwrap())),
11471166
empty_ws_data(),

0 commit comments

Comments
 (0)