Skip to content

Commit 80c97ca

Browse files
authored
Merge pull request #18746 from lnicola/sync-from-rust
minor: Sync from downstream
2 parents fa4a40b + 31ff42d commit 80c97ca

File tree

6 files changed

+23
-21
lines changed

6 files changed

+23
-21
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
8585
vfs = { path = "./crates/vfs", version = "0.0.0" }
8686
edition = { path = "./crates/edition", version = "0.0.0" }
8787

88-
ra-ap-rustc_lexer = { version = "0.85", default-features = false }
89-
ra-ap-rustc_parse_format = { version = "0.85", default-features = false }
90-
ra-ap-rustc_index = { version = "0.85", default-features = false }
91-
ra-ap-rustc_abi = { version = "0.85", default-features = false }
92-
ra-ap-rustc_pattern_analysis = { version = "0.85", default-features = false }
88+
ra-ap-rustc_lexer = { version = "0.87", default-features = false }
89+
ra-ap-rustc_parse_format = { version = "0.87", default-features = false }
90+
ra-ap-rustc_index = { version = "0.87", default-features = false }
91+
ra-ap-rustc_abi = { version = "0.87", default-features = false }
92+
ra-ap-rustc_pattern_analysis = { version = "0.87", default-features = false }
9393

9494
# local crates that aren't published to crates.io. These should not have versions.
9595
test-fixture = { path = "./crates/test-fixture" }

crates/hir-expand/src/inert_attr_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
237237
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
238238
experimental!(no_sanitize)
239239
),
240-
gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, coverage_attribute, experimental!(coverage)),
240+
ungated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing),
241241

242242
ungated!(
243243
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk

crates/hir-ty/src/mir/eval.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ impl Evaluator<'_> {
813813
ProjectionElem::Field(Either::Left(f)) => {
814814
let layout = self.layout(&prev_ty)?;
815815
let variant_layout = match &layout.variants {
816-
Variants::Single { .. } => &layout,
816+
Variants::Single { .. } | Variants::Empty => &layout,
817817
Variants::Multiple { variants, .. } => {
818818
&variants[match f.parent {
819819
hir_def::VariantId::EnumVariantId(it) => {
@@ -1638,6 +1638,7 @@ impl Evaluator<'_> {
16381638
return Ok(0);
16391639
};
16401640
match &layout.variants {
1641+
Variants::Empty => unreachable!(),
16411642
Variants::Single { index } => {
16421643
let r = self.const_eval_discriminant(self.db.enum_data(e).variants[index.0].0)?;
16431644
Ok(r)
@@ -1800,7 +1801,7 @@ impl Evaluator<'_> {
18001801
}
18011802
let layout = self.layout_adt(adt, subst)?;
18021803
Ok(match &layout.variants {
1803-
Variants::Single { .. } => (layout.size.bytes_usize(), layout, None),
1804+
Variants::Single { .. } | Variants::Empty => (layout.size.bytes_usize(), layout, None),
18041805
Variants::Multiple { variants, tag, tag_encoding, .. } => {
18051806
let enum_variant_id = match it {
18061807
VariantId::EnumVariantId(it) => it,

crates/hir-ty/src/utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ pub(crate) fn detect_variant_from_bytes<'a>(
334334
e: EnumId,
335335
) -> Option<(EnumVariantId, &'a Layout)> {
336336
let (var_id, var_layout) = match &layout.variants {
337+
hir_def::layout::Variants::Empty => unreachable!(),
337338
hir_def::layout::Variants::Single { index } => {
338339
(db.enum_data(e).variants[index.0].0, layout)
339340
}

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5a6036a1802262f8cf02192b02026688d396f1d7
1+
0eca4dd3205a01dba4bd7b7c140ec370aff03440

0 commit comments

Comments
 (0)