Commit Graph

17682 Commits

Author SHA1 Message Date
SynapLink f9ddd9fdbb tests: mark import UI tests as check-pass 2026-05-04 19:38:47 +02:00
Jacob Pratt 19fbc622a6 Rollup merge of #156120 - inq:test-alias-relate-7, r=lcnr
Regression test for trait-system-refactor#7

Adds a regression test for [`AliasRelate` hides info in transitive cases](https://github.com/rust-lang/trait-system-refactor-initiative/issues/7).

The example previously errored under the new solver but compiles cleanly now thanks to eager normalization (post-rust-lang/rust#119106). Verified on both the `old` and `next` revisions.

The issue body has an older TODO suggesting a goal-proving variant test; per lcnr's recent note in `#t-types/trait-system-refactor` ("this isn't an issue as we eagerly normalize"), the underlying mechanism is now resolved across both inference and goal-proving paths, so this single regression test is sufficient. Closing the upstream issue manually after merge.

r? @lcnr
2026-05-04 04:25:24 -04:00
inkyu d4c413e348 Apply suggestion from @lcnr
Co-authored-by: lcnr <rust@lcnr.de>
2026-05-04 15:05:04 +07:00
bors a51f3a89b2 Auto merge of #156044 - danieljofficial:move-tests-array-slice-vec, r=JonathanBrouwer
Move tests array slice vec

r? @Kivooeo 
Hi, some tests that belong in the  array-slice-vec folder
2026-05-04 03:00:26 +00:00
inq 44a7eb01fc Regression test for trait-system-refactor#7 2026-05-04 04:00:57 +07:00
bors ad3a598ca4 Auto merge of #156113 - JonathanBrouwer:rollup-yXpNY1L, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#153536 (Add `const_param_ty_unchecked` gate)
 - rust-lang/rust#155528 (const-stabilize `char::is_control()`)
 - rust-lang/rust#156086 (VaList::next_arg: track_caller for better Miri errors)
2026-05-03 17:54:12 +00:00
Jonathan Brouwer 43fbdfd2f4 Rollup merge of #153536 - zedddie:const-param-ty-unchecked-gate, r=BoxyUwU
Add `const_param_ty_unchecked` gate

Add `const_param_ty_unchecked` internal feature gate to skip `ConstParamTy_` trait enforcement on type. Provides an escape hatch for writing tests and examples that use const generics without needing to ensure all fields implement `ConstParamTy_`.

r? BoxyUwU
2026-05-03 19:23:52 +02:00
Jonathan Brouwer 081e7c4481 Rollup merge of #155433 - oli-obk:bye-bye-long-attribute, r=RalfJung,ShoyuVanilla
Rip out rustc_layout_scalar_valid_range_* attribute support

And either removes tests for it or replaces the uses with pattern types.

primarily fixes rust-lang/rust#135996

fixes rust-lang/rust#147761
fixes rust-lang/rust#133652
2026-05-03 16:33:22 +02:00
Jonathan Brouwer 11610db252 Rollup merge of #152216 - GTimothy:map-diagnostics-fix, r=JonathanBrouwer
Fix 'assign to data in an index of' collection suggestions

fixes https://github.com/rust-lang/rust/issues/150001
fixes https://github.com/rust-lang/rust-analyzer/issues/16076
fixes https://github.com/rust-lang/rust/issues/134917

The issues are threefold and linked:
 1. Assigning data to a ~~collection~~BTreeMap/HashMap suggests 3 solutions all marked as `MachineApplicable`
 2. The suggestions are slightly wrong with regards to their borrowing needs.
 3. The suggestions are not guaranteed to produce code that is valid, and suggestion number two is equivalent to an update, not an insertion.

This PR:
 - splits the large triple suggestion into three
 - sets them to `MaybeIncorrect`
 - automatically determines the required borrowing to use.

 I think this solution may not be very elegant, expecially the key typechecking / borrowing part, but it works. I am however very open to any improvement/change :)

 edit: edited to replace 'collection' with  BTreeMap/HashMap'
2026-05-03 16:33:21 +02:00
Oli Scherer 11d88ee42b Rip out rustc_layout_scalar_valid_range_* attribute support 2026-05-03 10:59:52 +02:00
bors 6769f690f9 Auto merge of #156097 - jhpratt:rollup-haL7A1y, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#155666 (Interning cleanups)
 - rust-lang/rust#155940 (refactor rustc_on_unimplemented's filtering)
 - rust-lang/rust#156065 (Remove unused spans from AttributeKind)
 - rust-lang/rust#156079 (Move and rename the `clone-never.rs` test)
 - rust-lang/rust#156091 (change field `tools` on `AttributeParser` to hold `&'tcx RegisteredTools`)
2026-05-03 06:40:27 +00:00
Jacob Pratt 98d754bab8 Rollup merge of #156079 - JonathanBrouwer:clone-never, r=mejrs
Move and rename the `clone-never.rs` test
2026-05-03 00:25:33 -04:00
Jacob Pratt b7c65513ba Rollup merge of #155940 - mejrs:filter, r=jdonszelmann
refactor rustc_on_unimplemented's filtering

Previously when you had a
```rust
pub struct Directive {
    pub is_rustc_attr: bool,
    pub condition: Option<OnUnimplementedCondition>,
    pub subcommands: ThinVec<Directive>,
    pub message: Option<(Span, FormatString)>,
    ...
}
```
that condition would control the emission of the message, label, notes etc. I've changed that to
```rust
pub struct Directive {
    pub is_rustc_attr: bool,
    pub filters: ThinVec<(Filter, Directive)>,
    pub message: Option<(Span, FormatString)>,
    ...
```

so that the message etc is always emitted, and there's a vec of tuples with (filter, directive) where the filter controls whether that directive is even emitted,  which i think is much clearer. That also makes it easier to not have to do the reverse iteration thing and this makes it so that notes are emitted in declaration order (with nonfiltered options always last).

The rename is because I plan on making it available to other diagnostic attributes at some point (very wip) so `OnUnimplementedCondition` and the like would have to be renamed anyway.
2026-05-03 00:25:32 -04:00
bors 44860d3e9e Auto merge of #152277 - gurry:114865-ice-format-args, r=chenyukang
Validate source snippet when format input is raw string



Fixes rust-lang/rust#114865

The issue occurred because the user's proc macro respanned the format arg to an unrelated multi-byte string and we ICE'd by landing in the middle of a multi-byte char.

This PR adds validation that prevents the parser from trying to walk such obviously wrong snippets. Such validation already existed for non-raw strings. This PR adds it for raw strings as well.
2026-05-03 03:24:52 +00:00
bors a3e96d8cb8 Auto merge of #155767 - adwinwhite:eager-norm-outside, r=lcnr
`-Znext-solver` Eager normalization outside of solver 




This PR adds a normalization routine for the next solver that behaves the same as the normalization in the old solver.
The new routine is used to normalize eagerly outside of the next solver.

This is [part 2](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/Eager.20normalization.2C.20ahoy.21/near/582996783) of modifying the next solver to support eager normalization.

Those test changes are mostly wording changes, duplicating some errors or reducing some duplicates. But I could have overlooked something.
Notably it fixes the first, third and fourth examples in https://github.com/rust-lang/trait-system-refactor-initiative/issues/191, but not the second variant.

It's probably easier to review commit by commit.

Fixes rust-lang/rust#151308
Fixes rust-lang/rust#101557
Fixes rust-lang/rust#119692
Fixes rust-lang/rust#136859
2026-05-02 20:56:41 +00:00
bors 20de910db4 Auto merge of #154341 - RalfJung:retag-on-typed-copy, r=oli-obk
Make retags an implicit part of typed copies



Ever since Stacked Borrows was first implemented in Miri, that was done with `Retag` statements: given a place (usually a local variable), those statements find all references stored inside the place and refresh their tags to ensure the aliasing requirements are upheld. However, this is a somewhat unsatisfying approach for multiple reasons:
- It leaves open the [question](https://github.com/rust-lang/unsafe-code-guidelines/issues/371) of where to even put `Retag` statements. Over time, the AddRetag pass settled on one possible answer to this, but it wasn't very canonical.
- For assignments of the form `*ptr = expr`, if the assignment involves copying a reference, we probably want to do a retag -- but if we do a `Retag(*ptr)` as the next instruction, it can be non-trivial to argue that this even retags the right value, so we refrained from doing retags in that case. This has [come up](https://github.com/llvm/llvm-project/pull/160913#issuecomment-3341908717) as a potential issue for Rust making better use of LLVM "captures" annotations. (That said, there might be [other ways](https://github.com/rust-lang/unsafe-code-guidelines/issues/593#issuecomment-4328112031) to obtain this desired optimization.)
- Normal compilation avoids generating retags, but we still generate LLVM IR with `noalias`. What does that even mean? How do MIR optimization passes interact with retags? These are questions we have to figure out to make better use of aliasing information, but currently we can't even really ask such questions.

I think we should resolve all that by making retags part of what happens during a typed copy (a concept and interpreter infrastructure that did not exist yet when retags were initially introduced). Under this proposal, when executing a MIR assignment statement, what conceptually happens is as follows:
- We evaluate the LHS to a place.
- We evaluate the RHS to a value. This does a typed load from memory if needed, raising UB if memory does not contain a valid representation of the assignment's type.
- We walk that value, identify all references inside of it, and retag them. If this happens as part of passing a function argument, this is a protecting retag.
- We store (a representation of) the value into the place.

However, this semantics doesn't fully work: there's a mandatory MIR pass that turns expressions like `&mut ***ptr` into intermediate deref's. Those must *not* do any retags. So far this happened because the AddRetag pass did not add retags for assignments to deref temporaries, but that information is not recorded in cross-crate MIR. Therefore I instead added a field to `Rvalue::Use` to indicate whether this value should be retagged or not. A non-retagging copy seems like a sufficiently canonical primitive that we should be able to express it. Dealing with the fallout from that is a large chunk of the overall diff. (I also considered adding this field to `StatementKind::Assign` instead, but decided against that as we only actually need it for `Rvalue::Use`. I am not sure if this was the right call...)

This neatly answers the question of when retags should occur, and handles cases like `*ptr = expr`. It avoids traversing values twice in Miri. It makes codegen's use of `noalias` sound wrt the actual MIR that it is working on. It also gives us a target semantics to evaluate MIR opts against. However, I did not carefully check all MIR opts -- in particular, GVN needs a thorough look under the new semantics; it currently can turn alias-correct code into alias-incorrect code. (But this PR doesn't make things any worse for normal compilation where the retag indicator is anyway ignored.)

Another side-effect of this PR is that `-Zmiri-disable-validation` now also disables alias checking. It'd be nicer to keep them orthogonal but I find this an acceptable price to pay.

- [rustc benchmark results](https://github.com/rust-lang/rust/pull/154341#issuecomment-4125313290)
- [miri benchmark results](https://github.com/rust-lang/rust/pull/154341#issuecomment-4129840926)
2026-05-02 17:42:41 +00:00
Jonathan Brouwer da58ae79e1 Move and rename the clone-never.rs test 2026-05-02 18:02:02 +02:00
mejrs d6969da512 rustc_on_unimplemented: emit notes in declared order 2026-05-02 17:59:25 +02:00
Ralf Jung e402c1edf0 miri: remove retag statements, make typed copies retag implicitly instead 2026-05-02 17:40:33 +02:00
bors 3d5dfdc29f Auto merge of #156088 - JonathanBrouwer:rollup-qdmx6JQ, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#156074 (Add extra symbol check for `.to_owned()`)
 - rust-lang/rust#156045 (Move tests associated consts)
 - rust-lang/rust#156064 (Do not depend on typeck to borrow-check inline consts.)
 - rust-lang/rust#156083 (Move tests attributes)
2026-05-02 14:30:57 +00:00
Jonathan Brouwer dd3cb25042 Rollup merge of #156083 - danieljofficial:move-tests-attributes, r=JonathanBrouwer
Move tests attributes

I moved some attribute tests out of the issues folder into the attribute folder, please find time to review
2026-05-02 16:19:21 +02:00
Jonathan Brouwer 8de6b7aaf7 Rollup merge of #156045 - danieljofficial:move-tests-associated-consts, r=Kivooeo
Move tests associated consts

r? @Kivooeo moved tests into associated-consts
2026-05-02 16:19:20 +02:00
Adwin White 03cabe7bab bless more than merely diagnostics change 2026-05-02 21:07:24 +08:00
Adwin White 1c1372c908 bless diagnostics change 2026-05-02 21:07:23 +08:00
GTimothy 5f1e962824 fix: wrong assumption could cause panic
added a valid example that violated the assumption in the proposed
change: it is possible for a borrowee type to be a ref of it's borrowed
type.

removed the assumption, treated all cases appropriately.
2026-05-02 13:37:59 +02:00
danieljofficial 40904ddd75 add issue links and bless attribute tests 2026-05-02 12:02:25 +01:00
danieljofficial 200d4e3b8a move tests from issues into attributes folder 2026-05-02 11:38:56 +01:00
Jonathan Brouwer a1a8e57a35 Rollup merge of #156059 - Enselic:print-mir-passes, r=mu001999
compiler: Print valid `-Zmir-enable-passes` names if invalid name is used

If a user passes an invalid name to `-Zmir-enable-passes`, print the valid names as a note.

To avoid the annoyance of having to keep blessing test output, completely normalize away the list of names in the test.

The diagnostic is duplicated, but that is not introduced by this commit. In other words, we don't make matters worse. The existing "is unknown and will be ignored" diagnostic is already duplicated, as can be seen in the existing test stderr.

The output is on one long line, but that makes normalization in tests easier, and I don't think we have to overdo this. We can let terminals wrap the line.

<details>

<summary>Click to expand current output</summary>

`note: valid MIR pass names are: AbortUnwindingCalls, AddCallGuards, AddMovesForPackedDrops, AddRetag, CheckAlignment, CheckCallRecursion, CheckConstItemMutation, CheckDropRecursion, CheckEnums, CheckForceInline, CheckInlineAlwaysTargetFeature, CheckLiveDrops, CheckNull, CheckPackedRef, CleanupPostBorrowck, CopyProp, CtfeLimit, DataflowConstProp, DeadStoreElimination-final, DeadStoreElimination-initial, Derefer, DestinationPropagation, EarlyOtherwiseBranch, ElaborateBoxDerefs, ElaborateDrops, EnumSizeOpt, EraseDerefTemps, ForceInline, FunctionItemReferences, GVN, ImpossiblePredicates, Inline, InstSimplify-after-simplifycfg, InstSimplify-before-inline, InstrumentCoverage, JumpThreading, KnownPanicsLint, LowerIntrinsics, LowerSliceLenCalls, Marker, MatchBranchSimplification, MentionedItems, MultipleReturnTerminators, PostAnalysisNormalize, PreCodegen, PromoteTemps, ReferencePropagation, RemoveNoopLandingPads, RemovePlaceMention, RemoveStorageMarkers, RemoveUninitDrops, RemoveUnneededDrops, RemoveZsts, ReorderBasicBlocks, ReorderLocals, RequiredConstsVisitor, SanityCheck, ScalarReplacementOfAggregates, SimplifyCfg-after-unreachable-enum-branching, SimplifyCfg-final, SimplifyCfg-initial, SimplifyCfg-make_shim, SimplifyCfg-post-analysis, SimplifyCfg-pre-optimizations, SimplifyCfg-promote-consts, SimplifyCfg-remove-false-edges, SimplifyComparisonIntegral, SimplifyConstCondition-after-const-prop, SimplifyConstCondition-after-inst-simplify, SimplifyConstCondition-final, SimplifyLocals-after-value-numbering, SimplifyLocals-before-const-prop, SimplifyLocals-final, SingleUseConsts, SsaRangePropagation, StateTransform, StripDebugInfo, Subtyper, UnreachableEnumBranching, UnreachablePropagation, Validator`

</details>
2026-05-02 10:18:32 +02:00
Martin Nordholts e906d1f9eb compiler: Print valid -Zmir-enable-passes names if invalid name is used
If a user passes an invalid name to `-Zmir-enable-passes`, print the
valid names as a note.

The diagnostic is duplicated, but that is not introduced by this commit.
In other words, we don't make matters worse. The existing "is unknown
and will be ignored" diagnostic is already duplicated.

To avoid the annoyance of having to keep blessing test output,
completely normalize away the list of names in the test.
2026-05-02 08:29:55 +02:00
Guillaume Gomez e95df7d6d5 Rollup merge of #155749 - ShoyuVanilla:leakcheck-vis, r=lcnr
`-Znext-solver` Ignore region constraints from the nested goals in leakcheck

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/251
Fixes https://github.com/rust-lang/rust/issues/140577
Fixes https://github.com/rust-lang/rust/issues/153596
2026-05-02 04:12:05 +02:00
bors 67bcaa9c4b Auto merge of #153968 - jyn514:jyn/linker-warn-by-default, r=mati865
linker-messages is warn-by-default again

cc rust-lang/rust#136096 

I ended up keeping it a lint and adding an option for lints to ignore `-Dwarnings` (there was already a lint that did that actually, it was just hard-coded in rustc_middle instead of in rustc_lint_defs like I'd expect). This allows people to actually see the warnings without them failing the build in CI.
2026-05-01 17:15:17 +00:00
Shoyu Vanilla e43a1b5b44 -Znext-solver Ignore region constraints from the nested goals in leakcheck 2026-05-02 00:11:43 +09:00
danieljofficial 30e0c8f548 add issue links and bless 2026-05-01 14:30:58 +01:00
danieljofficial 3c82a61486 move tests from issues into associated-consts 2026-05-01 14:20:12 +01:00
danieljofficial f3261786d8 add issue links and bless 2026-05-01 13:50:56 +01:00
danieljofficial 74c133bdba move tests from issues into array-slice-vec 2026-05-01 12:34:59 +01:00
Jonathan Brouwer 825291ad1e Rollup merge of #155600 - CrooseGit:dev/reucru01/adds-polonius-ui-tests, r=jackh726
Adds a couple UI tests for polonius

I went through all the open issues labeled `fixed-by-polonius` and from that created two UI tests based on issues that seemed a little novel.
One for rust-lang/rust#92038 and another for rust-lang/rust#70044.
Both tests fail under NLL but pass with polonius (legacy and alpha).
2026-05-01 13:10:36 +02:00
Jonathan Brouwer 7bea50b3d9 Rollup merge of #156001 - Human9000-bit:ssa-range-prop-155836, r=dianqk
ssa-range-prop: fix ICE when encountering self-domiating bb

- **Add `strictly_dominates` method**
- **fix ice in ssa-range-prop**

Fixes rust-lang/rust#155836

r? dianqk
2026-05-01 13:10:35 +02:00
Jonathan Brouwer 7be04ef0a6 Rollup merge of #155948 - SynapLink:fix/pub-visibility-order, r=petrochenkov,mu001999
Fix order-dependent visibility diagnostics

Fixes rust-lang/rust#40066.
Fixes https://github.com/rust-lang/rust/issues/109657.
Delay visibility path diagnostics until module collection has finished, so paths to later non-ancestor modules report E0742 instead of an unresolved path error.
2026-05-01 13:10:34 +02:00
Jonathan Brouwer 9996d99761 Rollup merge of #155186 - cijiugechu:fix/loop-match-no-self-assign, r=folkertdev,WaffleLapkin
Avoid loop_match self-assignment in MIR lowering

Transform
```
bb2: {
        PlaceMention(_1);
        _1 = copy _1;
        goto -> bb7;
    }
```
to
```
bb2: {
        PlaceMention(_1);
        _4 = copy _1;
        _1 = copy _4;
        goto -> bb7;
    }
```

Closes rust-lang/rust#143806

<details>
<summary>Previous MIR</summary>

```
fn helper() -> u8 {
    let mut _0: u8;
    let mut _1: u8;
    let mut _2: !;
    let mut _3: !;
    scope 1 {
        debug state => _1;
    }

    bb0: {
        StorageLive(_1);
        _1 = const 0_u8;
        FakeRead(ForLet(None), _1);
        StorageLive(_2);
        goto -> bb1;
    }

    bb1: {
        falseUnwind -> [real: bb2, unwind: bb11];
    }

    bb2: {
        PlaceMention(_1);
        _1 = copy _1;
        goto -> bb7;
    }

    bb3: {
        FakeRead(ForMatchedPlace(None), _1);
        unreachable;
    }

    bb4: {
        unreachable;
    }

    bb5: {
        goto -> bb6;
    }

    bb6: {
        goto -> bb8;
    }

    bb7: {
        goto -> bb8;
    }

    bb8: {
        goto -> bb1;
    }

    bb9: {
        unreachable;
    }

    bb10: {
        StorageDead(_2);
        StorageDead(_1);
        return;
    }

    bb11 (cleanup): {
        resume;
    }
}
```

</details>

<details>
<summary>Current MIR</summary>

```
fn helper() -> u8 {
    let mut _0: u8;
    let mut _1: u8;
    let mut _2: !;
    let mut _3: !;
    let mut _4: u8;
    scope 1 {
        debug state => _1;
    }

    bb0: {
        StorageLive(_1);
        _1 = const 0_u8;
        FakeRead(ForLet(None), _1);
        StorageLive(_2);
        goto -> bb1;
    }

    bb1: {
        falseUnwind -> [real: bb2, unwind: bb11];
    }

    bb2: {
        PlaceMention(_1);
        _4 = copy _1;
        _1 = copy _4;
        goto -> bb7;
    }

    bb3: {
        FakeRead(ForMatchedPlace(None), _1);
        unreachable;
    }

    bb4: {
        unreachable;
    }

    bb5: {
        goto -> bb6;
    }

    bb6: {
        goto -> bb8;
    }

    bb7: {
        goto -> bb8;
    }

    bb8: {
        goto -> bb1;
    }

    bb9: {
        unreachable;
    }

    bb10: {
        StorageDead(_2);
        StorageDead(_1);
        return;
    }

    bb11 (cleanup): {
        resume;
    }
}
```
</details>
2026-05-01 13:10:33 +02:00
Jonathan Brouwer 30bec0608b Rollup merge of #154971 - fmease:enum-var-verify-enum-seg, r=BoxyUwU
Verify that penultimate segment of enum variant path refers to enum if it has args

Fixes rust-lang/rust#154962.
2026-05-01 13:10:33 +02:00
human9000 d3d6c126d3 fix ice in ssa-range-prop
It used to ICE when hitting an `assert_ne!(location.block, successor.block` due
to hitting a self-dominating bb

Fixed by checking *strict* domination instead of normal one
2026-05-01 15:21:40 +05:00
Jacob Pratt 5b91e270dc Rollup merge of #155523 - ujjwalvishwakarma2006:reorg-tests-02, r=Kivooeo
Reorganize `tests/ui/issues/` - 02

| old-name | new-sub-dir | new-name |
|-|-|-|
| `issue-19001.rs` [issue](https://github.com/rust-lang/rust/issues/19001) | `recursion/` | `recursive-struct-with-raw-pointer-field.rs` |
| `issue-31769.rs` [issue](https://github.com/rust-lang/rust/issues/31769) | `attributes/` | `dont-allow-inline-and-repr-at-invalid-positions.rs` |
| `issue-31769.stderr` | `attributes/` | `dont-allow-inline-and-repr-at-invalid-positions.stderr` |
| `issue-33202.rs` [issue](https://github.com/rust-lang/rust/issues/33202) | `attributes/` | `repr-on-single-variant-Enum.rs` |
| `issue-38763.rs` [issue](https://github.com/rust-lang/rust/issues/38763) | `foreign/` | `foreign-fn-with-more-than-8-byte-arg-size.rs` |

r? Kivooeo
2026-04-30 22:28:31 -04:00
Jacob Pratt 654c350837 Rollup merge of #154610 - jakubadamw:issue-13065, r=TaKO8Ki
Suggest public re-exports when a private module makes an import path inaccessible

This is an attempt at solving rust-lang/rust#13065.

When a `use` path fails because it passes through a private module (E0603), and a public re-export of the target item exists elsewhere, the compiler will now suggest importing through that re-export instead.

For example, given:

```rust
mod outer {
    pub use self::inner::MyStruct;
    mod inner {
        pub struct MyStruct;
    }
}

use outer::inner::MyStruct; // error: module `inner` is private
```

the compiler will now suggest use `outer::MyStruct`; - the publicly accessible path - rather than just pointing at the private module definition and leaving the user to figure out the alternative.

When possible, relative paths are suggested, including those using `super` (currently capped at a maximum of one `super` path item).

The newly added test is parametrised by editions because of the change in behaviour around `crate::`-prefixed imports in edition 2018. Perhaps that’s an overkill – I’ll be happy to remove the variations for editions 2021 and 2024.

Closes rust-lang/rust#13065.
2026-04-30 22:28:31 -04:00
Jacob Pratt 248756dc40 Rollup merge of #153566 - JohnTitor:sugg-generic-params-from-outer-item-err, r=wesleywiser
Add suggestion for E0401 on inner const items

Fix rust-lang/rust#68373
r? @estebank
2026-04-30 22:28:30 -04:00
Jacob Pratt fae8c6edd1 Rollup merge of #155974 - folkertdev:c-variadic-experimental-arch, r=joshtriplett
add `c_variadic_experimental_arch` feature

tracking issue: https://github.com/rust-lang/rust/issues/155973

Based on https://hackmd.io/pIbUgMQuQcGaibJcinOcEw#Stabilize-c-variadic-function-definitions-rust155697, we'll gate niche targets where we don't control the implementation of `va_arg`, the ABI is unclear, or in general where we're not confident stabilizing the implementation.
2026-04-30 22:28:28 -04:00
Jacob Pratt f7b1e7d892 Rollup merge of #155939 - scrabsha:view-types/feature-gate, r=nikomatsakis
Add feature gate for view_types experiment
2026-04-30 22:28:26 -04:00
SynapLink f7c62f533e Fix order-dependent visibility diagnostics 2026-04-30 20:51:53 +02:00
GTimothy 9de80d4179 add index-mut test case where mut index access to a map produces E0277 instead of E0594
a set of slightly different tests showing that E0594 can be reached in
some cases via autodereferencing, but also that slight variations
produce E0277 instead.
2026-04-30 16:38:13 +02:00
GTimothy f2bf6a8911 rebless the ui tests 2026-04-30 16:38:12 +02:00