tests/ui/borrowck/issue-92157.rs: Remove (bug not fixed)
The bug the test tests for is masked by the wrong `#[lang = "start"]` signature. If the signature is corrected, the test builds. But that is not because the bug is fixed, but because the test has been changed too much from the original reproducer. The original reproducer still ICE:s. See https://github.com/rust-lang/rust/issues/92157#issuecomment-3722060317.
But that's fine since in the latest compiler says:
> note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly
So let's remove the test and close the issue as "won't fix". See https://github.com/rust-lang/rust/issues/92157#issuecomment-3725036997.
r? @JohnTitor since you added the test in https://github.com/rust-lang/rust/pull/106878
Fix trait method anchor disappearing before user can click on it
A good example of this bug is going to https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_analysis/collect/struct.ItemCtxt.html#impl-HirTyLowerer%3C'tcx%3E-for-ItemCtxt%3C'tcx%3E, and then try to click on the `§` anchor of the `tcx` method.
The solution to this bug is to simply "glue" the anchor to the method, so when the mouse cursor moves to it, there is no gap between the two, preventing the anchor to disappear (hopefully this explanation doesn't make sense only to me ^^').
First commit fixes the bug by expanding the anchor size.
Second commit is a small clean-up of the GUI test.
Third commit actually adds the GUI regression test.
cc @BoxyUwU
r? @camelid
rename the `derive_{eq, clone_copy}` features to `*_internals`
Features like `derive_from` and `derive_coerce_pointee` refer to actual unstable derive macros, but the `derive_eq` and `derive_clone_copy` features are internal hacks. Rename them accordingly by adding the suffix `_internals`.
Use functions more in rustdoc GUI tests
Now that conditions are supported in `browser-ui-test`, we can start simplify some parts of the tests. This is a first cleanup, but I guess a lot more could be simplified. For follow-ups I guess. :)
I made some improvements in backtrace display in `browser-ui-test`, hence the version update once more.
r? @lolbinarycat
Clarify `MoveData::init_loc_map`.
Change the `SmallVec` size from 4 to 1, because that's sufficient in the vast majority of cases. (This doesn't affect performance in practice, so it's more of a code clarity change than a performance change.)
r? @cjgillot
Finish transition from `semitransparent` to `semiopaque` for `rustc_macro_transparency`
Since it's a bit annoying to have different names for the same thing.
My understanding is that this is just internal stuff that is not part of any public API even tough rust-analyzer knows about it.
Continuation of
- https://github.com/rust-lang/rust/pull/139084.
Discovered while investigating
- https://github.com/rust-lang/rust/issues/150514
fix `Expr::can_have_side_effects` for `[x; N]` style array literal and binary expressions
AFAIK `[0; 3]` is basically a syntax sugar for `[0, 0, 0]` so it should return whether the repeat's element can have side effects, like what it does on arrays.
And it seems that the rule for unary operators and indexings can be applied to binary operators as well.
Query associated_item_def_ids when needed
This commit moves a query to `associated_item_defs` from above an error condition caused independently of it to below it.
It looks generally cleaner and might potentially save some runtime in case the error condition is met, rendering `items` to be left unused, yet still queried.
Store defids instead of symbol names in the aliases list
I was honestly surprised this worked in the past. This causes a cycle error since we now compute a symbol name in codegen_attrs, and then compute codegen attrs when we try to get the symbol name.
It only worked when there weren't any codegen attributes to begin with, causing symbol name computation to skip the call to codegen_attrs.
Like this we won't have the same problem.
r? @bjorn3
Update `literal-escaper` version to `0.0.7`
It removes the `std` dependency for this crate (which doesn't change anything for rustc 😄 ).
cc @bjorn3
r? @Urgau
Deprecated doc intra link
fixes https://github.com/rust-lang/rust/issues/98342
r? @GuillaumeGomez
Renders intra-doc links in the note text of the `#[deprecated]` attribute. It is quite natural to suggest some other function to use there. So e.g.
```rust
#[deprecated(since = "0.0.0", note = "use [`std::mem::size_of`] instead")]
```
renders as
<img width="431" height="74" alt="Screenshot from 2026-01-06 12-08-21" src="https://github.com/user-attachments/assets/8f608f08-13ee-4bbf-a631-6008058a51e2" />
std: sys: fs: uefi: Implement remove_dir_all
- Using the implementation from sys::fs::common since UEFI does not have a built-in for this functionality.
@rustbot label +O-UEFI
This commit moves a query to `associated_item_defs` from above an error
condition caused independently of it to below it.
It looks generally cleaner and might potentially save some runtime in
case the error condition is met, rendering `items` to be left unused,
yet still queried.
Add myself as co-maintainer for s390x-unknown-linux-musl
Having two dedicated target maintainers is a prerequisite for promoting this target to tier 2. I've been in contact with Ulrich and he's agreed to having me as a co-maintainer in preparation for a MCP to promote it to tier 2.
cc @uweigand
Thread `--jobs` from `bootstrap` -> `compiletest` -> `run-make-support`
Context is https://github.com/rust-lang/rust/pull/150524#issuecomment-3712701586, where we would like to thread the `--jobs` config from bootstrap explicitly through to run-make tests without relying on an "external env var" that bypasses the build/test infra.
Note that this PR currently intentionally couples the jobs configured for *builds*, versus for `TestMode::RunMake` tests. We can further specialize some kind of `run-make-jobs` bootstrap config *if actually needed*; I will keep this configuration naive for now.
r? @Kobzol
./x check miri: enable check_only feature
With this, we should no longer need to turn off the default features, so we can undo https://github.com/rust-lang/rust/pull/149550.
@bjorn3 you seem to have a test setup to check if this works properly in terms of skipping all the work that should not be required -- could you test if this PR works as intended?
FWIW we could now remove `default_features` from `run_tool_check_step`. Not sure if that's worth it.
Ensure that static initializers are acyclic for NVPTX
NVPTX does not support cycles in static initializers (see rust-lang/rust#146787). LLVM produces an error when attempting to generate code for such constructs, like self-referential structs.
To avoid LLVM UB, we emit a post-monomorphization error on the Rust side before reaching codegen.
This is achieved by analyzing a subgraph of the "mono item graph" that only contains statics.
1. Calculate the strongly connected components (SCCs) of the graph.
2. Check for cycles (more than one node in an SCC or one node that references itself).
rustc: Fix `-Zexport-executable-symbols` on wasm
This commit reorders some cases in `export_symbols` in the linker implementation for wasm to ensure that the `is_like_wasm` case is handled before the catch-all `CrateType::Executable` case.
`c_variadic`: provide our own `va_arg` implementation for more targets
tracking issue: https://github.com/rust-lang/rust/issues/44930
Provide our own implementations in order to guarantee the behavior of `va_arg`. We will only be able to stabilize `c_variadic` on targets where we know and guarantee the properties of `va_arg`.
r? workingjubilee
Similarly to i686 and X86_64 MinGW targets, Rust needs to provide the
right chkstk symbol for AArch64 to avoid relying on the linker to
provide it.
CC https://github.com/rust-lang/rust/issues/150725