Guillaume Gomez
2d82c99f1e
Add "global" rustdoc test for RFC 3631
2025-09-27 11:29:48 +02:00
Guillaume Gomez
6537278e11
Update rustdoc tests
2025-09-27 11:29:48 +02:00
Simon Sapin
95c146a0c1
Fix tracking issue number for feature(macro_attr)
...
The ability to define an attribute macro with `macro_rules!` is tracked at https://github.com/rust-lang/rust/issues/143547 , not https://github.com/rust-lang/rust/issues/83527
2025-09-27 10:55:02 +02:00
bors
959b450747
Auto merge of #146636 - Mark-Simulacrum:bootstrap-bump, r=jieyouxu
...
Bump bootstrap compiler to 1.91 beta
https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-tuesday
2025-09-27 03:50:03 +00:00
bors
e131842222
Auto merge of #147074 - matthiaskrgr:rollup-sm3owsd, r=matthiaskrgr
...
Rollup of 10 pull requests
Successful merges:
- rust-lang/rust#145113 (resolve: Do not finalize shadowed bindings)
- rust-lang/rust#146523 (Demote both armebv7r-none-* targets.)
- rust-lang/rust#146704 (port `#[debugger_visualizer]` to the new attribute system)
- rust-lang/rust#146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu)
- rust-lang/rust#146778 (Use standard attribute logic for allocator shim)
- rust-lang/rust#146849 (Reduce some uses of `LegacyBang`)
- rust-lang/rust#147016 (fix doc comments to be more standard)
- rust-lang/rust#147027 (Add new `tyalias` intra-doc link disambiguator)
- rust-lang/rust#147031 (mbe: Simplify check_redundant_vis_repetition)
- rust-lang/rust#147058 (Ignore more failing ui tests for GCC backend)
Failed merges:
- rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-27 00:44:47 +00:00
Mark Rousskov
201f299ef6
Apply cfg(bootstrap) replacement
2025-09-26 19:09:23 -04:00
Mark Rousskov
4e9716fbc5
Update CURRENT_RUSTC_VERSION post-bump
2025-09-26 18:41:32 -04:00
beepster4096
413f095a85
this ice now requires -Zvalidate-mir
...
also slightly minimized the test
2025-09-26 15:37:19 -07:00
Aapo Alasuutari
e88fa086fb
move Reborrow to ops, fix fmt issues
2025-09-27 01:11:01 +03:00
Guillaume Gomez
b7e444de16
Add regression test for merged doctests compilation time display
2025-09-26 22:04:00 +02:00
Augie Fackler
eb3fb457f1
split-dwarf: add documentation and test coverage
2025-09-26 16:02:59 -04:00
Jules Bertholet
a4e87e9406
Support #[rustc_align_static] inside thread_local!
2025-09-26 13:51:09 -04:00
Augie Fackler
99456cc015
tests: use max-llvm-major-version instead of ignore-llvm-version
2025-09-26 13:32:03 -04:00
Matthias Krüger
a91918f96b
Rollup merge of #147058 - GuillaumeGomez:ignore-more-ui-tests, r=Kobzol
...
Ignore more failing ui tests for GCC backend
Needed for https://github.com/rust-lang/rust/pull/146414 .
r? ``@Kobzol``
2025-09-26 18:11:15 +02:00
Matthias Krüger
67d88f93cd
Rollup merge of #147027 - GuillaumeGomez:tyalias-disambiguator, r=lolbinarycat
...
Add new `tyalias` intra-doc link disambiguator
Fixes https://github.com/rust-lang/rust/issues/146855 .
Alternative to rust-lang/rust#146866 .
This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them.
cc ``@fmease``
r? lolbinarycat
2025-09-26 18:11:13 +02:00
Matthias Krüger
d09bb02eb5
Rollup merge of #146704 - jdonszelmann:port-debug-visualizer, r=petrochenkov
...
port `#[debugger_visualizer]` to the new attribute system
2025-09-26 18:11:09 +02:00
Matthias Krüger
f104ae4252
Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnr
...
resolve: Do not finalize shadowed bindings
I.e. do not mark them as used, or non-speculatively loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005 .
2025-09-26 18:11:08 +02:00
lcnr
d6fe533418
add tests
2025-09-26 16:33:15 +02:00
lcnr
eebf871fea
move tests
2025-09-26 16:33:15 +02:00
lcnr
148fd9ad3c
allow method calls on opaques
2025-09-26 16:33:15 +02:00
lcnr
6b379b560d
use try_structurally_resolve_type for method receiver
...
We'll still error due to the `opt_bad_ty` of `method_autoderef_steps`.
This slightly worsens the span of `infer_var.method()` which is now the
same as for `Box::new(infer_var).method()`.
Unlike `structurally_resolve_type`, `probe_op` does not check whether
the infcx is already tainted, so this results in 2 previously not emitted
errors.
2025-09-26 16:33:15 +02:00
Guillaume Gomez
a535c7be54
Ignore more failing ui tests for GCC backend
2025-09-26 15:33:48 +02:00
lcnr
4a0c7cc730
fix cycle head usages tracking
2025-09-26 15:29:01 +02:00
Guillaume Gomez
dba45cde68
Add tests for new tyalias intra-doc link disambiguator
2025-09-26 15:07:12 +02:00
bors
5b9007bfc3
Auto merge of #147054 - matthiaskrgr:rollup-660g92w, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#146283 (Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.)
- rust-lang/rust#146453 (Add general arm-linux.md platform doc.)
- rust-lang/rust#146991 (const_caller_location to use real Span instead of `DUMMY_SP`)
- rust-lang/rust#146994 (Add `clippy::unconditional_recursion` to `./x clippy ci`)
- rust-lang/rust#147038 (Rename verbosity functions in bootstrap)
- rust-lang/rust#147047 (rustdoc: put the toolbar on the all item index)
- rust-lang/rust#147049 (std: fix warning in VEXos stdio module)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-26 07:45:10 +00:00
Fabian Grünbichler
68c0e97cc6
re-order normalizations in run-make linker-warning test
...
otherwise a buildroot containing `libpanic_abort` would be mangled before being
replaced by the build root placeholder value..
e.g., running `./x.py test --verbose tests/run-make/linker-warning` with rustc
checked out in ~/ext/rustc-libpanic_abort will result in (output slightly shortened):
```
running 1 tests
test [run-make] tests/run-make/linker-warning ... FAILED
failures:
---- [run-make] tests/run-make/linker-warning stdout ----
------rustc stdout------------------------------
------rustc stderr------------------------------
------------------------------------------
error: rmake recipe failed to complete
status: exit status: 101
command: cd "/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake_out" && env -u RUSTFLAGS -u __RUSTC_DEBUG_ASSERTIONS_ENABLED -u __STD_DEBUG_ASSERTIONS_ENABLED AR="ar" BUILD_ROOT="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu" CC="cc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" CXX="c++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" HOST_RUSTC_DYLIB_PATH="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/lib" LD_LIBRARY_PATH="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="<...>" LLVM_FILECHECK="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUSTDOC="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/bin/rustdoc" SOURCE_ROOT="/home/user/ext/rustc-libpanic_abort" TARGET="x86_64-unknown-linux-gnu" TARGET_EXE_DYLIB_PATH="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake"
stdout: none
--- stderr -------------------------------
thread 'main' panicked at /home/user/ext/rustc-libpanic_abort/tests/run-make/linker-warning/rmake.rs:74:14:
test failed: `short-error.txt` is different from `(linker error)`
--- short-error.txt
+++ (linker error)
@@ -1,6 +1,6 @@
error: linking with `./fake-linker` failed: exit status: 1
|
- = note: "./fake-linker" "-m64" "/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/build-root/test/run-make/linker-warning/rmake_out/{libfoo,libbar}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/build-root/test/run-make/linker-warning/rmake_out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "main" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "run_make_error"
+ = note: "./fake-linker" "-m64" "/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/user/ext/rustc-libpanic_unwind/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake_out/{libfoo,libbar}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/user/ext/rustc-libpanic_unwind/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake_out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "main" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "run_make_error"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: error: baz
[..]
```
without this fix.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com >
2025-09-26 08:14:25 +02:00
Matthias Krüger
1285b164e1
Rollup merge of #147047 - notriddle:toolbar-index, r=GuillaumeGomez
...
rustdoc: put the toolbar on the all item index
2025-09-26 06:36:33 +02:00
bors
40ace17fc3
Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkov
...
Extended temporary argument to format_args!() in all cases
Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
2025-09-26 04:34:09 +00:00
Jules Bertholet
5de617e71f
Rename ui test items
2025-09-25 23:57:59 -04:00
bors
b733736ea2
Auto merge of #146919 - lcnr:yeet-fast-path, r=fee1-dead
...
remove incorrect fast path
Using `tcx.is_copy_modulo_regions` drops information from the current `typing_env`. Writing a regression test for this is really hard. We need to prove `Copy` of something that doesn't directly reference a coroutine or an opaque, but does so indirectly.
cc rust-lang/rust#146813 .
2025-09-25 23:50:40 +00:00
Michael Howell
51ae86dec9
rustdoc-search: add test case for all/index.html search
2025-09-25 15:45:11 -07:00
bors
7ac0330c6d
Auto merge of #147037 - matthiaskrgr:rollup-xtgqzuu, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- rust-lang/rust#142401 (Add proper name mangling for pattern types)
- rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
- rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
- rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
- rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 20:35:49 +00:00
Noratrieb
9316d4508c
Remove most #[track_caller] from allocating Vec methods
...
They cause significant binary size overhead while contributing little
value.
Also removes them from the wrapping String methods that do not panic.
2025-09-25 20:52:03 +02:00
Vadim Petrochenkov
f89660e4aa
resolve: Do not finalize shadowed bindings
...
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005 .
2025-09-25 20:36:14 +03:00
Matthias Krüger
958d1438b6
Rollup merge of #142401 - oli-obk:pattern-mango, r=petrochenkov
...
Add proper name mangling for pattern types
requires adding demangler support first https://github.com/rust-lang/rustc-demangle/pull/81
needed for https://github.com/rust-lang/rust/pull/136006#discussion_r2139792593 as otherwise we will have symbol collisions
2025-09-25 18:15:08 +02:00
Matthias Krüger
a028b7a9e3
Rollup merge of #135771 - GuillaumeGomez:jump-to-def-perf, r=fmease
...
[rustdoc] Add support for associated items in "jump to def" feature
Fixes https://github.com/rust-lang/rust/issues/135485 .
r? ``@fmease``
2025-09-25 18:15:06 +02:00
Matthias Krüger
a39d5134cd
Rollup merge of #116882 - fmease:rustdoc-generalized-priv-repr-heuristic, r=rustdoc
...
rustdoc: hide `#[repr]` if it isn't part of the public ABI
> [!IMPORTANT]
> Temporarily stacked on top of PR https://github.com/rust-lang/rust/pull/146527 ; only the last commit is relevant!
Follow-up to rust-lang/rust#115439 .
Unblocks rust-lang/rust#116743 , CC ``@dtolnay.``
Fixes rust-lang/rust#66401 .
Fixes rust-lang/rust#128364 .
Fixes rust-lang/rust#137440 .
Only display the representation `#[repr(REPR)]` (where `REPR` is not `Rust` or `transparent`) of a given type if none of its variants (incl. the synthetic variants of structs) are `#[doc(hidden)]` and all of its fields are public and not `#[doc(hidden)]` since it's likely not meant to be considered part of the public ABI otherwise.
`--document-{private,hidden}-items` works as expected in this context, too.
Moreover, we now also factor in the presence of `#[doc(hidden)]` when checking whether to show `repr(transparent)` or not.
2025-09-25 18:15:06 +02:00
helldawg
7e58c91105
usize/isize range matching error clarification
2025-09-25 18:15:04 +03:00
bors
6f34f4ee07
Auto merge of #147019 - Zalathar:rollup-boxzbmo, r=Zalathar
...
Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns)
- rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const)
- rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`)
- rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization)
- rust-lang/rust#146735 (unstably constify float mul_add methods)
- rust-lang/rust#146737 (f16_f128: enable some more tests in Miri)
- rust-lang/rust#146766 (Add attributes for #[global_allocator] functions)
- rust-lang/rust#146905 (llvm: update remarks support on LLVM 22)
- rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`)
- rust-lang/rust#147005 (Small string formatting cleanup)
- rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`)
- rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool)
- rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`)
- rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 14:03:21 +00:00
Stuart Cook
231002f0c2
Rollup merge of #146982 - fmease:fix-rmake-linker-warning, r=bjorn3
...
Remove erroneous normalization step in `tests/run-make/linker-warning`
Fixes rust-lang/rust#146977 .
r? bjorn3 or reassign
2025-09-25 20:31:57 +10:00
Stuart Cook
46e25aa7a3
Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercote
...
Add attributes for #[global_allocator] functions
Emit `#[rustc_allocator]` etc. attributes on the functions generated by the `#[global_allocator]` macro, which will emit LLVM attributes like `"alloc-family"`. If the module with the global allocator participates in LTO, this ensures that the attributes typically emitted on the allocator declarations are not lost if the definition is imported.
There is a similar issue when the allocator shim is used, but I've opted not to fix that case in this PR, because doing that cleanly is somewhat gnarly.
Related to https://github.com/rust-lang/rust/issues/145995 .
2025-09-25 20:31:56 +10:00
Stuart Cook
fab06469ee
Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJung
...
Add an attribute to check the number of lanes in a SIMD vector after monomorphization
Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages.
Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs.
r? ``@RalfJung``
cc ``@workingjubilee`` ``@programmerjake``
2025-09-25 20:31:53 +10:00
Stuart Cook
21b0e12e01
Rollup merge of #145277 - dingxiangfei2009:fold-coercion-into-const, r=nnethercote
...
Do not materialise X in [X; 0] when X is unsizing a const
Fix rust-lang/rust#143671
It turns out that MIR builder materialise `X` in `[X; 0]` into a temporary local when `X` is unsizing a `const`. This led to a confusing call to destructor of `X` when such a destructor is declared. [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=8dfc933af89efeb89c881bc77498ba63 )
This patch may miss out other cases that we should avoid materialisation in case of `[X; 0]`. Suggestions to include is most welcome!
2025-09-25 20:31:52 +10:00
bors
7cfd7d328b
Auto merge of #147003 - matthiaskrgr:rollup-b5z9uiz, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#146556 (Fix duration_since panic on unix when std is built with integer overflow checks)
- rust-lang/rust#146679 (Clarify Display for error should not include source)
- rust-lang/rust#146753 (Improve the pretty print of UnstableFeature clause)
- rust-lang/rust#146894 (Improve derive suggestion of const param)
- rust-lang/rust#146950 (core: simplify `CStr::default()`)
- rust-lang/rust#146958 (Fix infinite recursion in Path::eq with String)
- rust-lang/rust#146971 (fix ICE in writeback due to bound regions)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 10:30:50 +00:00
León Orell Valerian Liehr
85c193a4ed
rustdoc: hide #[repr(...)] if it isn't part of the public ABI
2025-09-25 11:49:27 +02:00
León Orell Valerian Liehr
d7d7725b8c
rustdoc: Fully escape link section and export name
...
Escape "special characters" (e.g., double quotes `"` and line breaks `\n`).
Escape HTML.
Lastly, add regression tests and clean up existing tests.
2025-09-25 11:30:58 +02:00
León Orell Valerian Liehr
bc37dd4a72
Remove an erroneous normalization step in tests/run-make/linker-warning
2025-09-25 06:30:19 +02:00
Matthias Krüger
57ee169ff2
Rollup merge of #146971 - lcnr:fix-writeback, r=BoxyUwU
...
fix ICE in writeback due to bound regions
fixes rust-lang/rust#117808
r? `@BoxyUwU`
2025-09-24 23:33:29 +02:00
Matthias Krüger
6351a63486
Rollup merge of #146894 - tiif:suggest_feature_attr, r=BoxyUwU
...
Improve derive suggestion of const param
Make the suggestion not to remove the adt and use the name of the adt variant in the diagnostic.
r? `@BoxyUwU`
2025-09-24 23:33:27 +02:00
Matthias Krüger
7a4ac48345
Rollup merge of #146753 - tiif:unsatisfiable-unstable-feature, r=BoxyUwU
...
Improve the pretty print of UnstableFeature clause
As per https://github.com/rust-lang/rust/pull/145095#discussion_r2349439492 , we could make the diagnostic for unsatisfiable ``UnstableFeature`` clause better.
r? `@BoxyUwU`
2025-09-24 23:33:26 +02:00