diff options
| author | bors <bors@rust-lang.org> | 2025-09-10 15:09:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-10 15:09:18 +0000 |
| commit | 565a9ca63e9df4b223fed0da01f15e578acfb538 (patch) | |
| tree | fdbc4245cfe17954d617a6f3c9b89c025ff128cb /compiler/rustc_hir/src/hir.rs | |
| parent | 7ad23f43a225546c095123de52cc07d8719f8e2b (diff) | |
| parent | 212baec446dd7fc7bbda66a4b3b0e2f856d575ce (diff) | |
| download | rust-565a9ca63e9df4b223fed0da01f15e578acfb538.tar.gz rust-565a9ca63e9df4b223fed0da01f15e578acfb538.zip | |
Auto merge of #146409 - matthiaskrgr:rollup-thju381, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang/rust#144765 (inclusive `Range`s: change `end` to `last`) - rust-lang/rust#146178 (Implement `#[rustc_align_static(N)]` on `static`s) - rust-lang/rust#146368 (CI: rfl: move job forward to Linux v6.17-rc5 to remove temporary commits) - rust-lang/rust#146378 (Update wasm-component-ld to 0.5.17) - rust-lang/rust#146391 (Trim paths less in MIR dumping) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir/src/hir.rs')
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index ae03121e5f7..75551fe4c19 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -2616,6 +2616,18 @@ impl Expr<'_> { ) | ( ExprKind::Struct( + QPath::LangItem(LangItem::RangeToInclusiveCopy, _), + [val1], + StructTailExpr::None, + ), + ExprKind::Struct( + QPath::LangItem(LangItem::RangeToInclusiveCopy, _), + [val2], + StructTailExpr::None, + ), + ) + | ( + ExprKind::Struct( QPath::LangItem(LangItem::RangeFrom, _), [val1], StructTailExpr::None, @@ -2705,7 +2717,8 @@ pub fn is_range_literal(expr: &Expr<'_>) -> bool { | LangItem::RangeToInclusive | LangItem::RangeCopy | LangItem::RangeFromCopy - | LangItem::RangeInclusiveCopy, + | LangItem::RangeInclusiveCopy + | LangItem::RangeToInclusiveCopy, .. ) ), |
