Skip to content

Commit 491e845

Browse files
Merge pull request rust-lang#22048 from ChayimFriedman2/upgrade-rustc
internal: Upgrade rustc crates
2 parents 722296f + 9a32199 commit 491e845

50 files changed

Lines changed: 1827 additions & 2200 deletions

Some content is hidden

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

src/tools/rust-analyzer/Cargo.lock

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,9 @@ dependencies = [
458458

459459
[[package]]
460460
name = "derive-where"
461-
version = "1.6.0"
461+
version = "1.6.1"
462462
source = "registry+https://github.com/rust-lang/crates.io-index"
463-
checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f"
463+
checksum = "d08b3a0bcc0d079199cd476b2cae8435016ec11d1c0986c6901c5ac223041534"
464464
dependencies = [
465465
"proc-macro2",
466466
"quote",
@@ -2048,9 +2048,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
20482048

20492049
[[package]]
20502050
name = "ra-ap-rustc_abi"
2051-
version = "0.143.0"
2051+
version = "0.160.0"
20522052
source = "registry+https://github.com/rust-lang/crates.io-index"
2053-
checksum = "1d49dbe5d570793b3c3227972a6ac85fc3e830f09b32c3cb3b68cfceebad3b0a"
2053+
checksum = "4b917ab47d7036977be4c984321af3e0de089229404d68ea9a286f50aa464697"
20542054
dependencies = [
20552055
"bitflags 2.9.4",
20562056
"ra-ap-rustc_hashes",
@@ -2060,33 +2060,33 @@ dependencies = [
20602060

20612061
[[package]]
20622062
name = "ra-ap-rustc_ast_ir"
2063-
version = "0.143.0"
2063+
version = "0.160.0"
20642064
source = "registry+https://github.com/rust-lang/crates.io-index"
2065-
checksum = "cd0956db62c264a899d15667993cbbd2e8f0b02108712217e2579c61ac30b94b"
2065+
checksum = "021d80bea67458b8c90cc25bfdca6f911ea818a41905e370c1f310cced1dd07e"
20662066

20672067
[[package]]
20682068
name = "ra-ap-rustc_hashes"
2069-
version = "0.143.0"
2069+
version = "0.160.0"
20702070
source = "registry+https://github.com/rust-lang/crates.io-index"
2071-
checksum = "7df512084c24f4c96c8cc9a59cbd264301efbc8913d3759b065398024af316c9"
2071+
checksum = "8bb89395306ecfc980d252f77a4038d8b8bb578a25c856b545cbeeb3fde8358e"
20722072
dependencies = [
20732073
"rustc-stable-hash",
20742074
]
20752075

20762076
[[package]]
20772077
name = "ra-ap-rustc_index"
2078-
version = "0.143.0"
2078+
version = "0.160.0"
20792079
source = "registry+https://github.com/rust-lang/crates.io-index"
2080-
checksum = "bca3a49a928d38ba7927605e5909b6abe77d09ff359e4695c070c3f91d69cc8a"
2080+
checksum = "84219d028a1954c4340ddde11adffe93eb83e476e942718fe926f4d99637cbbe"
20812081
dependencies = [
20822082
"ra-ap-rustc_index_macros",
20832083
]
20842084

20852085
[[package]]
20862086
name = "ra-ap-rustc_index_macros"
2087-
version = "0.143.0"
2087+
version = "0.160.0"
20882088
source = "registry+https://github.com/rust-lang/crates.io-index"
2089-
checksum = "4463e908a62c64c2a65c1966c2f4995d0e1f8b7dfc85a8b8de2562edf3d89070"
2089+
checksum = "3908fdfa258c663d8ee407e6b4a205b0880e323b533c0df7edceafbd54a02fb6"
20902090
dependencies = [
20912091
"proc-macro2",
20922092
"quote",
@@ -2095,20 +2095,20 @@ dependencies = [
20952095

20962096
[[package]]
20972097
name = "ra-ap-rustc_lexer"
2098-
version = "0.143.0"
2098+
version = "0.160.0"
20992099
source = "registry+https://github.com/rust-lang/crates.io-index"
2100-
checksum = "228e01e1b237adb4bd8793487e1c37019c1e526a8f93716d99602301be267056"
2100+
checksum = "34b50f19d5856b8e2b36150e89b53a6102ab096e8044e1f55fd6fef977b10d85"
21012101
dependencies = [
21022102
"memchr",
2103+
"unicode-ident",
21032104
"unicode-properties",
2104-
"unicode-xid",
21052105
]
21062106

21072107
[[package]]
21082108
name = "ra-ap-rustc_next_trait_solver"
2109-
version = "0.143.0"
2109+
version = "0.160.0"
21102110
source = "registry+https://github.com/rust-lang/crates.io-index"
2111-
checksum = "10d6f91143011d474bb844d268b0784c6a4c6db57743558b83f5ad34511627f1"
2111+
checksum = "76f83dcc451bcee8a99e284a583d5b3d82db5a200107a256a40ef132c4988f1b"
21122112
dependencies = [
21132113
"derive-where",
21142114
"ra-ap-rustc_index",
@@ -2119,19 +2119,19 @@ dependencies = [
21192119

21202120
[[package]]
21212121
name = "ra-ap-rustc_parse_format"
2122-
version = "0.143.0"
2122+
version = "0.160.0"
21232123
source = "registry+https://github.com/rust-lang/crates.io-index"
2124-
checksum = "37fa8effbc436c0ddd9d7b1421aa3cccf8b94566c841c4e4aa3e09063b8f423f"
2124+
checksum = "f31236bdc6cbcae8af42d0b2db2fa8d812a8715b90a2ba5afb1132b37a4d0bbc"
21252125
dependencies = [
21262126
"ra-ap-rustc_lexer",
2127-
"rustc-literal-escaper 0.0.5",
2127+
"rustc-literal-escaper 0.0.7",
21282128
]
21292129

21302130
[[package]]
21312131
name = "ra-ap-rustc_pattern_analysis"
2132-
version = "0.143.0"
2132+
version = "0.160.0"
21332133
source = "registry+https://github.com/rust-lang/crates.io-index"
2134-
checksum = "883c843fc27847ad03b8e772dd4a2d2728af4333a6d6821a22dfcfe7136dff3e"
2134+
checksum = "3fc4edac740e896fba4b3b4d9c423083e3eac49947732561ddfb2377e1f57829"
21352135
dependencies = [
21362136
"ra-ap-rustc_index",
21372137
"rustc-hash 2.1.1",
@@ -2142,15 +2142,16 @@ dependencies = [
21422142

21432143
[[package]]
21442144
name = "ra-ap-rustc_type_ir"
2145-
version = "0.143.0"
2145+
version = "0.160.0"
21462146
source = "registry+https://github.com/rust-lang/crates.io-index"
2147-
checksum = "a86e33c46b2b261a173b23f207461a514812a8b2d2d7935bbc685f733eacce10"
2147+
checksum = "8efa119afc1bcadd821b27aa94332abf79c48ac0a972cb78932f63004ba4cdd9"
21482148
dependencies = [
21492149
"arrayvec",
21502150
"bitflags 2.9.4",
21512151
"derive-where",
21522152
"ena",
21532153
"indexmap",
2154+
"ra-ap-rustc_abi",
21542155
"ra-ap-rustc_ast_ir",
21552156
"ra-ap-rustc_index",
21562157
"ra-ap-rustc_type_ir_macros",
@@ -2162,9 +2163,9 @@ dependencies = [
21622163

21632164
[[package]]
21642165
name = "ra-ap-rustc_type_ir_macros"
2165-
version = "0.143.0"
2166+
version = "0.160.0"
21662167
source = "registry+https://github.com/rust-lang/crates.io-index"
2167-
checksum = "15034c2fcaa5cf302aea6db20eda0f71fffeb0b372d6073cc50f940e974a2a47"
2168+
checksum = "e6b1dc03abfabc7179393c282892c73a3f0e4bbd5f0b6c87ff42c2b142e68f57"
21682169
dependencies = [
21692170
"proc-macro2",
21702171
"quote",
@@ -2385,9 +2386,9 @@ checksum = "ab03008eb631b703dd16978282ae36c73282e7922fe101a4bd072a40ecea7b8b"
23852386

23862387
[[package]]
23872388
name = "rustc-literal-escaper"
2388-
version = "0.0.5"
2389+
version = "0.0.7"
23892390
source = "registry+https://github.com/rust-lang/crates.io-index"
2390-
checksum = "e4ee29da77c5a54f42697493cd4c9b9f31b74df666a6c04dfc4fde77abe0438b"
2391+
checksum = "8be87abb9e40db7466e0681dc8ecd9dcfd40360cb10b4c8fe24a7c4c3669b198"
23912392

23922393
[[package]]
23932394
name = "rustc-stable-hash"
@@ -3139,21 +3140,15 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
31393140

31403141
[[package]]
31413142
name = "unicode-ident"
3142-
version = "1.0.19"
3143+
version = "1.0.24"
31433144
source = "registry+https://github.com/rust-lang/crates.io-index"
3144-
checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
3145+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
31453146

31463147
[[package]]
31473148
name = "unicode-properties"
3148-
version = "0.1.3"
3149-
source = "registry+https://github.com/rust-lang/crates.io-index"
3150-
checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0"
3151-
3152-
[[package]]
3153-
name = "unicode-xid"
3154-
version = "0.2.6"
3149+
version = "0.1.4"
31553150
source = "registry+https://github.com/rust-lang/crates.io-index"
3156-
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
3151+
checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"
31573152

31583153
[[package]]
31593154
name = "url"

src/tools/rust-analyzer/Cargo.toml

Lines changed: 13 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.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 }
89+
ra-ap-rustc_lexer = { version = "0.160", default-features = false }
90+
ra-ap-rustc_parse_format = { version = "0.160", default-features = false }
91+
ra-ap-rustc_index = { version = "0.160", default-features = false }
92+
ra-ap-rustc_abi = { version = "0.160", default-features = false }
93+
ra-ap-rustc_pattern_analysis = { version = "0.160", default-features = false }
94+
ra-ap-rustc_ast_ir = { version = "0.160", default-features = false }
95+
ra-ap-rustc_type_ir = { version = "0.160", default-features = false }
96+
ra-ap-rustc_next_trait_solver = { version = "0.160", default-features = false }
9797

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

@@ -127,7 +127,7 @@ object = { version = "0.36.7", default-features = false, features = [
127127
"macho",
128128
"pe",
129129
] }
130-
postcard = {version = "1.1.3", features = ["alloc"]}
130+
postcard = { version = "1.1.3", features = ["alloc"] }
131131
process-wrap = { version = "8.2.1", features = ["std"] }
132132
pulldown-cmark-to-cmark = "10.0.4"
133133
pulldown-cmark = { version = "0.9.6", default-features = false }
@@ -186,7 +186,10 @@ hashbrown = { version = "0.14.*", features = [
186186
elided_lifetimes_in_paths = "warn"
187187
explicit_outlives_requirements = "warn"
188188
unsafe_op_in_unsafe_fn = "warn"
189-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bootstrap)', "cfg(no_salsa_async_drops)"] }
189+
unexpected_cfgs = { level = "warn", check-cfg = [
190+
'cfg(bootstrap)',
191+
"cfg(no_salsa_async_drops)",
192+
] }
190193
unused_extern_crates = "warn"
191194
unused_lifetimes = "warn"
192195
unreachable_pub = "warn"

src/tools/rust-analyzer/crates/hir-def/src/attrs.rs

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ fn match_attr_flags(attr_flags: &mut AttrFlags, attr: ast::Meta) -> ControlFlow<
159159
None => match &*first_segment {
160160
"deprecated" => attr_flags.insert(AttrFlags::IS_DEPRECATED),
161161
"doc" => extract_doc_tt_attr(attr_flags, tt),
162-
"repr" => attr_flags.insert(AttrFlags::HAS_REPR),
162+
"repr" | "rustc_scalable_vector" => attr_flags.insert(AttrFlags::HAS_REPR),
163163
"target_feature" => attr_flags.insert(AttrFlags::HAS_TARGET_FEATURE),
164164
"proc_macro_derive" | "rustc_builtin_macro" => {
165165
attr_flags.insert(AttrFlags::IS_DERIVE_OR_BUILTIN_MACRO)
@@ -217,6 +217,7 @@ fn match_attr_flags(attr_flags: &mut AttrFlags, attr: ast::Meta) -> ControlFlow<
217217
"rustc_allow_incoherent_impl" => {
218218
attr_flags.insert(AttrFlags::RUSTC_ALLOW_INCOHERENT_IMPL)
219219
}
220+
"rustc_scalable_vector" => attr_flags.insert(AttrFlags::HAS_REPR),
220221
"fundamental" => attr_flags.insert(AttrFlags::FUNDAMENTAL),
221222
"no_std" => attr_flags.insert(AttrFlags::IS_NO_STD),
222223
"may_dangle" => attr_flags.insert(AttrFlags::MAY_DANGLE),
@@ -724,14 +725,40 @@ impl AttrFlags {
724725
fn repr(db: &dyn DefDatabase, owner: AdtId) -> Option<ReprOptions> {
725726
let mut result = None;
726727
collect_attrs::<Infallible>(db, owner.into(), |attr| {
727-
if let ast::Meta::TokenTreeMeta(attr) = attr
728-
&& attr.path().is1("repr")
728+
let mut current = None;
729+
if let ast::Meta::TokenTreeMeta(attr) = &attr
730+
&& let Some(path) = attr.path()
729731
&& let Some(tt) = attr.token_tree()
730-
&& let Some(repr) = parse_repr_tt(&tt)
731732
{
733+
if path.is1("repr")
734+
&& let Some(repr) = parse_repr_tt(&tt)
735+
{
736+
current = Some(repr);
737+
} else if path.is1("rustc_scalable_vector")
738+
&& let mut tt = TokenTreeChildren::new(&tt)
739+
&& let Some(NodeOrToken::Token(scalable)) = tt.next()
740+
&& let Some(scalable) = ast::IntNumber::cast(scalable)
741+
&& let Ok(scalable) = scalable.value()
742+
&& let Ok(scalable) = scalable.try_into()
743+
{
744+
current = Some(ReprOptions {
745+
scalable: Some(rustc_abi::ScalableElt::ElementCount(scalable)),
746+
..ReprOptions::default()
747+
});
748+
}
749+
} else if let ast::Meta::PathMeta(attr) = &attr
750+
&& attr.path().is1("rustc_scalable_vector")
751+
{
752+
current = Some(ReprOptions {
753+
scalable: Some(rustc_abi::ScalableElt::Container),
754+
..ReprOptions::default()
755+
});
756+
}
757+
758+
if let Some(current) = current {
732759
match &mut result {
733-
Some(existing) => merge_repr(existing, repr),
734-
None => result = Some(repr),
760+
Some(existing) => merge_repr(existing, current),
761+
None => result = Some(current),
735762
}
736763
}
737764
ControlFlow::Continue(())
@@ -1114,7 +1141,7 @@ impl AttrFlags {
11141141
}
11151142

11161143
fn merge_repr(this: &mut ReprOptions, other: ReprOptions) {
1117-
let ReprOptions { int, align, pack, flags, field_shuffle_seed: _ } = this;
1144+
let ReprOptions { int, align, pack, flags, scalable, field_shuffle_seed: _ } = this;
11181145
flags.insert(other.flags);
11191146
*align = (*align).max(other.align);
11201147
*pack = match (*pack, other.pack) {
@@ -1124,6 +1151,9 @@ fn merge_repr(this: &mut ReprOptions, other: ReprOptions) {
11241151
if other.int.is_some() {
11251152
*int = other.int;
11261153
}
1154+
if other.scalable.is_some() {
1155+
*scalable = other.scalable;
1156+
}
11271157
}
11281158

11291159
fn parse_repr_tt(tt: &ast::TokenTree) -> Option<ReprOptions> {

src/tools/rust-analyzer/crates/hir-def/src/hir.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use std::fmt;
2121
use hir_expand::{MacroDefId, name::Name};
2222
use intern::Symbol;
2323
use la_arena::Idx;
24-
use rustc_apfloat::ieee::{Half as f16, Quad as f128};
24+
use rustc_apfloat::ieee::{Double, Half, Quad, Single};
2525
use syntax::ast;
2626
use type_ref::TypeRefId;
2727

@@ -94,19 +94,19 @@ impl FloatTypeWrapper {
9494
Self(sym)
9595
}
9696

97-
pub fn to_f128(&self) -> f128 {
97+
pub fn to_f128(&self) -> Quad {
9898
self.0.as_str().parse().unwrap_or_default()
9999
}
100100

101-
pub fn to_f64(&self) -> f64 {
101+
pub fn to_f64(&self) -> Double {
102102
self.0.as_str().parse().unwrap_or_default()
103103
}
104104

105-
pub fn to_f32(&self) -> f32 {
105+
pub fn to_f32(&self) -> Single {
106106
self.0.as_str().parse().unwrap_or_default()
107107
}
108108

109-
pub fn to_f16(&self) -> f16 {
109+
pub fn to_f16(&self) -> Half {
110110
self.0.as_str().parse().unwrap_or_default()
111111
}
112112
}

0 commit comments

Comments
 (0)