Skip to content

Commit 0f1efaf

Browse files
committedSep 22, 2024
Auto merge of rust-lang#130722 - matthiaskrgr:rollup-ocqdu4y, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#122565 (Try to write the panic message with a single `write_all` call) - rust-lang#129550 (Add str.as_str() for easy Deref to string slices) - rust-lang#130659 (Support `char::encode_utf16` in const scenarios.) - rust-lang#130705 (No longer mark RTN as incomplete) - rust-lang#130712 (Don't call `ty::Const::normalize` in error reporting) - rust-lang#130713 (Mark `u8::make_ascii_uppercase` and `u8::make_ascii_lowercase` as const.) - rust-lang#130714 (Introduce `structurally_normalize_const`, use it in `rustc_hir_typeck`) - rust-lang#130715 (Replace calls to `ty::Const::{try_}eval` in mir build/pattern analysis) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 6c6d210 + 4217792 commit 0f1efaf

File tree

204 files changed

+609
-766
lines changed

Some content is hidden

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

204 files changed

+609
-766
lines changed
 

‎compiler/rustc_feature/src/unstable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ declare_features! (
578578
/// be used to describe E or vise-versa.
579579
(unstable, result_ffi_guarantees, "1.80.0", Some(110503)),
580580
/// Allows bounding the return type of AFIT/RPITIT.
581-
(incomplete, return_type_notation, "1.70.0", Some(109417)),
581+
(unstable, return_type_notation, "1.70.0", Some(109417)),
582582
/// Allows `extern "rust-cold"`.
583583
(unstable, rust_cold_cc, "1.63.0", Some(97544)),
584584
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics

‎compiler/rustc_hir/src/hir.rs

+10-3
Original file line numberDiff line numberDiff line change
@@ -1668,10 +1668,17 @@ pub enum ArrayLen<'hir> {
16681668
}
16691669

16701670
impl ArrayLen<'_> {
1671-
pub fn hir_id(&self) -> HirId {
1671+
pub fn span(self) -> Span {
1672+
match self {
1673+
ArrayLen::Infer(arg) => arg.span,
1674+
ArrayLen::Body(body) => body.span(),
1675+
}
1676+
}
1677+
1678+
pub fn hir_id(self) -> HirId {
16721679
match self {
1673-
ArrayLen::Infer(InferArg { hir_id, .. }) | ArrayLen::Body(ConstArg { hir_id, .. }) => {
1674-
*hir_id
1680+
ArrayLen::Infer(InferArg { hir_id, .. }) | ArrayLen::Body(&ConstArg { hir_id, .. }) => {
1681+
hir_id
16751682
}
16761683
}
16771684
}

0 commit comments

Comments
 (0)