Commit Graph

300570 Commits

Author SHA1 Message Date
Matthias Krüger
05c68f30d8 Rollup merge of #143590 - GuillaumeGomez:reexport-shadowing, r=lolbinary
Fix weird rustdoc output when single and glob reexport conflict on a name

Fixes rust-lang/rust#143107.

The problem was that the second reexport would overwrite the first, leading to having unexpected results. To fix it, I now group items by their original `DefId` and their name and keep tracks of all imports for this item (should very rarely be more than one though, and even less often more than 2).

cc `@lolbinarycat`
2025-07-10 20:28:47 +02:00
Matthias Krüger
b11e9e31dd Rollup merge of #143446 - usamoi:export-executable-symbols, r=bjorn3,oli-obk
use `--dynamic-list` for exporting executable symbols

closes rust-lang/rust#101610
cc rust-lang/rust#84161

https://sourceware.org/binutils/docs-2.39/ld/VERSION.html:

> --dynamic-list=dynamic-list-file
Specify the name of a dynamic list file to the linker. This is typically used when creating shared libraries to specify a list of global symbols whose references shouldn’t be bound to the definition within the shared library, or creating dynamically linked executables to specify a list of symbols which should be added to the symbol table in the executable. This option is only meaningful on ELF platforms which support shared libraries.

`ld.lld --help`:

>   --dynamic-list=<file>: Similar to --export-dynamic-symbol-list. When creating a shared object, this additionally implies -Bsymbolic but does not set DF_SYMBOLIC

>  --export-dynamic-symbol-list=file: Read a list of dynamic symbol patterns. Apply --export-dynamic-symbol on each pattern

>  --export-dynamic-symbol=glob: (executable) Put matched symbols in the dynamic symbol table. (shared object) References to matched non-local STV_DEFAULT symbols shouldn't be bound to definitions within the shared object. Does not imply -Bsymbolic.

>  --export-dynamic: Put symbols in the dynamic symbol table

Use `--dynamic-list` because it's older than `--export-dynamic-symbol-list` (binutils 2.35)

try-job: dist-i586-gnu-i586-i686-musl
2025-07-10 20:28:46 +02:00
Philipp Krones
ee400afc51 Merge commit 'cdbbf3afda0b1bf51568b368f629b1d828507f98' into clippy-subtree-update 2025-07-10 20:25:36 +02:00
Philipp Krones
cdbbf3afda Rustup (#15243)
r? @ghost

changelog: none
2025-07-10 18:06:14 +00:00
Philipp Krones
b9af6670d8 Bump nightly version -> 2025-07-10 2025-07-10 20:01:15 +02:00
Philipp Krones
9e0f749e08 Merge remote-tracking branch 'upstream/master' into rustup 2025-07-10 20:01:08 +02:00
León Orell Valerian Liehr
341f12df67 Properly track the depth when expanding free alias types 2025-07-10 19:49:32 +02:00
Esteban Küber
d6924441cd Update test 2025-07-10 17:34:39 +00:00
Esteban Küber
0674eca2f0 Make Diag::multipart_suggestions always verbose 2025-07-10 17:23:29 +00:00
Esteban Küber
7dfc3e9af4 Rework borrowing suggestions to use Expr instead of just Span
In the suggestion machinery for borrowing expressions and types, always use the available obligation `Span` to find the appropriate `Expr` to perform appropriateness checks no the `ExprKind` instead of on the textual snippet corresponding to the `Span`.

Unify the logic for the case where `&` *and* `&mut` are appropriate with the logic for only one of those cases.

Handle the case when `S::foo()` should have been `<&S>::foo()` (instead of suggesting the prior `&S::foo()`.
2025-07-10 17:23:29 +00:00
bors
a9f2aad045 Auto merge of #143525 - Shourya742:2025-07-06-add-profiler, r=Kobzol
Add profiler to bootstrap command

This PR adds command profiling to the bootstrap command. It tracks the total execution time and records cache hits for each command. It also provides the ability to export execution result to a JSON file. Integrating this with Chrome tracing could further enhance observability.

r? `@Kobzol`
2025-07-10 16:51:58 +00:00
Scott McMurray
f5fc8727db Add BuilderMethods::unreachable_nonterminator
So places that need `unreachable` but in the middle of a basic block can call that instead of figuring out the best way to do it.
2025-07-10 09:17:28 -07:00
Mu001999
889582e704 Check assoc consts and tys later like assoc fns 2025-07-10 23:39:54 +08:00
Ed Page
a11ee5614c fix: Include frontmatter in -Zunpretty output
In the implementation (#140035), this was left as an open question for
the tracking issue (#136889).  My assumption is that this should be
carried over.

Thankfully, either way, `-Zunpretty` is unstable and we can always
change it even if we stabilize frontmatter.
2025-07-10 10:26:02 -05:00
Ed Page
df53b3dc04 test(lexer): Add frontmatter unit test 2025-07-10 10:25:29 -05:00
Nia Espera
8d0e0c6d6f interpret/allocation: expose init + write_wildcards on a range 2025-07-10 16:33:31 +02:00
Scott Schafer
d67bf6095a chore: Improve how the other suggestions message gets rendered 2025-07-10 08:00:20 -06:00
Scott Schafer
61b172a34c test: Make one multi suggestion test unicode 2025-07-10 08:00:15 -06:00
Kivooeo
259512e3b6 cleaned up some tests 2025-07-10 18:50:35 +05:00
bors
78a6e13298 Auto merge of #143731 - matthiaskrgr:rollup-lm9q7vc, r=matthiaskrgr
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#136906 (Add checking for unnecessary delims in closure body)
 - rust-lang/rust#143652 (docs: document trait upcasting rules in `Unsize` trait)
 - rust-lang/rust#143657 (Resolver: refact macro map into external and local maps)
 - rust-lang/rust#143659 (Use "Innermost" & "Outermost" terminology for `AttributeOrder`)
 - rust-lang/rust#143663 (fix: correct typo in attr_parsing_previously_accepted message key)
 - rust-lang/rust#143666 (Re-expose nested bodies in rustc_borrowck::consumers)
 - rust-lang/rust#143668 (Fix VxWorks build errors)
 - rust-lang/rust#143670 (Add a new maintainer to the wasm32-wasip1 target)
 - rust-lang/rust#143675 (improve lint doc text)
 - rust-lang/rust#143683 (Assorted `run-make-support` maintenance)
 - rust-lang/rust#143695 (Auto-add `S-waiting-on-author` when the PR is/switches to draft state)
 - rust-lang/rust#143706 (triagebot.toml: ping lolbinarycat if tidy extra checks were modified)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-10 13:49:36 +00:00
Kivooeo
3ad95cccf9 cleaned up some tests 2025-07-10 18:47:20 +05:00
b-naber
7632c55abb extract single_import_can_define_name and finalize_glob_module_binding 2025-07-10 15:30:28 +02:00
Matthias Krüger
bd2a351788 Rollup merge of #143706 - lolbinarycat:triagebot-extra-checks-ping, r=Kobzol
triagebot.toml: ping lolbinarycat if tidy extra checks were modified

I rewrote a large chunk of this module, and plan to do further changes to it (namely moving rustdoc_js checks into it), so it would be nice to keep up with and provide feedback on any changes to it, at least for the immediate future.

r? `@Kobzol`
2025-07-10 15:19:36 +02:00
Matthias Krüger
840207fd62 Rollup merge of #143695 - Urgau:waiting-on-author-new_draft, r=Kobzol
Auto-add `S-waiting-on-author` when the PR is/switches to draft state

This PR adds the `S-waiting-on-author` as a `new_draft` when the PR is/switches to draft state.

Related to https://github.com/rust-lang/triagebot/issues/2102 & https://github.com/rust-lang/triagebot/pull/2104

cc `@jieyouxu`
r? `@Kobzol`
2025-07-10 15:19:35 +02:00
Matthias Krüger
b5b35f1aa4 Rollup merge of #143683 - jieyouxu:rms-cleanup, r=Kobzol
Assorted `run-make-support` maintenance

This PR should contain no functional changes.

- Commit 1: Removes the support library's CHANGELOG. In the very beginning, I thought maybe we would try to version this library. But this is a purely internal test support library, and it's just extra busywork trying to maintain changelog/versions. It's also hopelessly outdated.
- Commit 2: Resets version number to `0.0.0`. Ditto on busywork.
- Commit 3: Bump `run-make-support` to Edition 2024. The support library was already "compliant" with Edition 2024.
- Commit 4: Slightly organizes the support library dependencies.
- Commit 5: Previously, I tried hopelessly to maintain some manual formatting, but that was annoying because it required skipping rustfmt (so export ordering etc. could not be extra formatted). Give up, and do some rearrangements / module prefix tricks to get the `lib.rs` looking at least *reasonable*. IMO this is not a strict improvement, but I rather regain the ability to auto-format it with rustfmt.
- Commit {6,7}: Noticed in rust-lang/rust#143669 that we apparently had *both* {`is_msvc`, `is_windows_msvc`}. This PR removes `is_msvc` in favor of `is_windows_msvc` to make it unambiguous (and only retain one way of gating) as there are some UEFI targets which are MSVC but not Windows.

Best reviewed commit-by-commit.

r? `@Kobzol`
2025-07-10 15:19:35 +02:00
Matthias Krüger
8c5398a7f7 Rollup merge of #143675 - hkBst:overflowing-1, r=oli-obk
improve lint doc text
2025-07-10 15:19:34 +02:00
Matthias Krüger
9ee9b0e0c2 Rollup merge of #143670 - loganek:loganek/wasm32-wasip1-new-maintainer, r=alexcrichton
Add a new maintainer to the wasm32-wasip1 target

cc: `@alexcrichton`
2025-07-10 15:19:34 +02:00
Matthias Krüger
a17559bff5 Rollup merge of #143668 - biabbas:vxworks, r=Noratrieb
Fix VxWorks build errors

fixes rust-lang/rust#143442

r? ``@Noratrieb``
2025-07-10 15:19:33 +02:00
Matthias Krüger
90ead986d5 Rollup merge of #143666 - nilehmann:nested_bodies_in_consumers, r=lcnr
Re-expose nested bodies in rustc_borrowck::consumers

After https://github.com/rust-lang/rust/pull/138499, it's not possible anymore to get borrowck information for nested bodies via `get_body_with_borrowck_facts`. This PR re-exposes nested bodies by returning a map containing the typeck root and all its nested bodies. To collect the bodies, a map is added to `BorrowCheckRootCtxt`, and a body is inserted every time `do_mir_borrowck` is called.

r? ``@lcnr``
2025-07-10 15:19:32 +02:00
Matthias Krüger
4b26882641 Rollup merge of #143663 - dillona:fix-typo, r=jdonszelmann
fix: correct typo in attr_parsing_previously_accepted message key
2025-07-10 15:19:32 +02:00
Matthias Krüger
097ad4b2bd Rollup merge of #143659 - GrigorenkoPV:attributes/inner-outer, r=jdonszelmann
Use "Innermost" & "Outermost" terminology for `AttributeOrder`

Follow-up to rust-lang/rust#143603.

https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/attribute.20parsing.20rework/near/527768926

Also remove some outdated comments. cc `@jdonszelmann`
2025-07-10 15:19:31 +02:00
Matthias Krüger
f587784a48 Rollup merge of #143657 - LorrensP-2158466:split-macro-map, r=petrochenkov
Resolver: refact macro map into external and local maps

Puts `MacroData` inside of the `ResolverArena` and splits `macro_map` into 2 maps: `local_macro_map` and `external_macro_map`. This way `get_macro_by_def_id` can take a `&Resolver` instead of a mutable one.

Part of [#gsoc > Project: Parallel Macro Expansion](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/with/516965603)

r? `@petrochenkov`
2025-07-10 15:19:31 +02:00
Matthias Krüger
bdf1941c12 Rollup merge of #143652 - moulins:doc-unsize-trait-upcasting, r=compiler-errors
docs: document trait upcasting rules in `Unsize` trait

The trait upcasting feature stabilized in 1.86 added new `Unsize` implementation, but this wasn't reflected in the trait's documentation.
2025-07-10 15:19:30 +02:00
Matthias Krüger
a0c7887199 Rollup merge of #136906 - chenyukang:yukang-fix-136741-closure-body, r=oli-obk
Add checking for unnecessary delims in closure body

Fixes #136741
2025-07-10 15:19:29 +02:00
bit-aloo
7de11749d2 update rust-dev-guide to point about new command execution summary report under bootstrap profiling section 2025-07-10 18:25:43 +05:30
bit-aloo
eac1ed5b74 enable report summary when BOOTSTRAP_PROFILE is set 2025-07-10 18:25:43 +05:30
bit-aloo
75b454b320 expose report summary via build 2025-07-10 18:25:43 +05:30
bit-aloo
13c31d445e update streaming to record its execution via commandprofiler 2025-07-10 18:25:42 +05:30
bit-aloo
5e0c197828 add commandProfiler to bootstrap execution context 2025-07-10 18:25:42 +05:30
bit-aloo
f5c73a14ff change cachekey to CommandFingerprint and change related API's and add start time to deferred execution 2025-07-10 18:25:42 +05:30
Shoyu Vanilla (Flint)
c1cf45a2f3 Merge pull request #20054 from Young-Flash/folding_all
feat: support folding multiline arg list & fn body in one folding range
2025-07-10 12:05:31 +00:00
Shoyu Vanilla (Flint)
649ec27ced Merge pull request #20223 from Hmikihiro/migrate_generate_impl
Migrate `generate_impl` assist to use `SyntaxEditor`
2025-07-10 11:45:25 +00:00
Kivooeo
81a6f18940 added error for invalid char cast 2025-07-10 15:44:36 +05:00
bors
119574f835 Auto merge of #143721 - tgross35:rollup-sjdfp6r, r=tgross35
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#141996 (Fix `proc_macro::Ident`'s handling of `$crate`)
 - rust-lang/rust#142950 (mbe: Rework diagnostics for metavariable expressions)
 - rust-lang/rust#143011 (Make lint `ambiguous_glob_imports` deny-by-default and report-in-deps)
 - rust-lang/rust#143265 (Mention as_chunks in the docs for chunks)
 - rust-lang/rust#143270 (tests/codegen/enum/enum-match.rs: accept negative range attribute)
 - rust-lang/rust#143298 (`tests/ui`: A New Order [23/N])
 - rust-lang/rust#143396 (Move NaN tests to floats/mod.rs)
 - rust-lang/rust#143398 (tidy: add support for `--extra-checks=auto:` feature)
 - rust-lang/rust#143644 (Add triagebot stdarch mention ping)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-10 10:08:08 +00:00
Guillaume Gomez
086b13d170 Add regression test for #143107 2025-07-10 11:41:50 +02:00
Hayashi Mikihiro
b6920519e3 Migrate generate_impl assist to use SyntaxEditor 2025-07-10 18:12:16 +09:00
许杰友 Jieyou Xu (Joe)
c7cdd1457a Merge pull request #2501 from Kobzol/compiler-builtins-josh 2025-07-10 16:03:47 +08:00
Jakub Beránek
c6bedc1bf9 Migrate rustc-pull to CI workflow from josh-sync 2025-07-10 10:02:39 +02:00
Jakub Beránek
f1ae43f14d Mention that compiler-builtins is now using rustc-josh-sync 2025-07-10 09:56:59 +02:00
Tomasz Miąsko
9681786409 Propagate from borrowed locals in CopyProp 2025-07-10 09:36:20 +02:00