Commit graph

298901 commits

Author SHA1 Message Date
lcnr
9eac7a3e04 move (and remove) impl Trait tests 2025-05-09 02:35:18 +00:00
Alex Macleod
33f81c08aa Use cargo dev setup toolchain in install from source docs 2025-05-09 01:38:20 +00:00
bors
c8b7f32434 Auto merge of #140176 - dpaoliello:arm64ecdec, r=wesleywiser
Fix linking statics on Arm64EC

Arm64EC builds recently started to fail due to the linker not finding a symbol:
```
symbols.o : error LNK2001: unresolved external symbol #_ZN3std9panicking11EMPTY_PANIC17hc8d2b903527827f1E (EC Symbol)
          C:\Code\hello-world\target\arm64ec-pc-windows-msvc\debug\deps\hello_world.exe : fatal error LNK1120: 1 unresolved externals
```

It turns out that `EMPTY_PANIC` is a new static variable that was being exported then imported from the standard library, but when exporting LLVM didn't prepend the name with `#` (as only functions are prefixed with this character), whereas Rust was prefixing with `#` when attempting to import it.

The fix is to have Rust not prefix statics with `#` when importing.

Adding tests discovered another issue: we need to correctly mark static exported from dylibs with `DATA`, otherwise MSVC's linker assumes they are functions and complains that there is no exit thunk for them.

CI found another bug: we only apply `DllImport` to non-local statics that aren't foreign items (i.e., in an `extern` block), that is we want to use `DllImport` for statics coming from other Rust crates. However, `__rust_no_alloc_shim_is_unstable` is a static generated by the Rust compiler if required, but downstream crates consider it a foreign item since it is declared in an `extern "Rust"` block, thus they do not apply `DllImport` to it and so fails to link if it is exported by the previous crate as `DATA`. The fix is to apply `DllImport` to foreign items that are marked with the `rustc_std_internal_symbol` attribute (i.e., we assume they aren't actually foreign and will be in some Rust crate).

Fixes #138541

---
try-job: dist-aarch64-msvc
try-job: dist-x86_64-msvc
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
2025-05-09 00:43:28 +00:00
Samuel Tardieu
3a6fcd2170
Allow any rust-lang team member to close an issue 2025-05-09 01:13:51 +02:00
Samuel Tardieu
d8726caacc
fix false negative for unnecessary_unwrap (#14758)
changelog: Fix [`unnecessary_unwrap`] false negative when any assignment
occurs in `if` branch (regardless of any variable).

Fixes: rust-lang/rust-clippy#14725
2025-05-08 22:12:02 +00:00
bors
667247db71 Auto merge of #140818 - matthiaskrgr:rollup-5eaotr2, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #140095 (Eliminate `word_and_empty` methods.)
 - #140341 (Clarify black_box warning a bit)
 - #140684 (Only include `dyn Trait<Assoc = ...>` associated type bounds for `Self: Sized` associated types if they are provided)
 - #140707 (Structurally normalize in range pattern checking in HIR typeck)
 - #140716 (Improve `-Zremap-path-scope` tests with dependency)
 - #140800 (Make `rustdoc-tempdir-removal` run-make tests work on other platforms than linux)
 - #140802 (Add release notes for 1.87.0)
 - #140811 (Enable triagebot note functionality for rust-lang/rust)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-08 21:32:19 +00:00
Christian Legnitto
d4862eb690 Update backtrace in Cargo.lock
Ran `cargo update -p backtrace`. This is needed to forward port the rust-gpu compiler backend.

Subsumes https://github.com/rust-lang/rust/pull/140631. Was supposed
to be fixed by https://github.com/rust-lang/rust/pull/140353, but there
were test failures and the fix was backed out.
2025-05-08 16:20:00 -04:00
Daniel Paoliello
d951c41a68 Enable non-leaf Frame Pointers for Arm64 Windows 2025-05-08 13:18:18 -07:00
Manish Goregaokar
33519b7c99
Set Manish in vacation mode (#14762)
changelog: none

r? @Manishearth
2025-05-08 19:50:09 +00:00
Samuel Tardieu
1044e5bbcc Set Manish in vacation mode 2025-05-08 21:40:20 +02:00
Samuel Tardieu
4cbd116460 unwrap.rs: internal naming cleanup
Since its conception, the lint has been extended from `Option`
only to `Option` and `Result`, but some function names and comment still
references only `Option`.

Also, one cascaded `if` was replaced by a shorter `match`.
2025-05-08 21:02:53 +02:00
Samuel Tardieu
668a292ca3 unwrap.rs: replace some strings usage by interned symbols 2025-05-08 21:02:46 +02:00
Matthias Krüger
4e4d6ad43c
Rollup merge of #140811 - jieyouxu:notes, r=Urgau
Enable triagebot note functionality for rust-lang/rust

Docs: <https://forge.rust-lang.org/triagebot/note.html>.

r? `@Urgau`
2025-05-08 20:22:25 +02:00
Matthias Krüger
196b5cbb9b
Rollup merge of #140802 - BoxyUwU:relnotes_1_87_0, r=pietroalbini
Add release notes for 1.87.0

Originally drafted in #140133

cc `@rust-lang/release`

r? `@pietroalbani` as you're running the release
2025-05-08 20:22:23 +02:00
Matthias Krüger
8d7a4c286b
Rollup merge of #140800 - GuillaumeGomez:rustdoc-tempdir-removal, r=jieyouxu
Make `rustdoc-tempdir-removal` run-make tests work on other platforms than linux

Follow-up of #140706.

r? `@jieyouxu`
2025-05-08 20:22:21 +02:00
Matthias Krüger
1aa0dd2dc8
Rollup merge of #140716 - Urgau:improve-remap_scope-tests, r=jieyouxu
Improve `-Zremap-path-scope` tests with dependency

This PR greatly improves our coverage of `-Zremap-path-scope` for diagnostic paths and macros with dependencies.

r? `@jieyouxu` (since we talked about it)

try-job: x86_64-msvc-1
2025-05-08 20:22:20 +02:00
Matthias Krüger
f7168af76f
Rollup merge of #140707 - compiler-errors:range-pat-struct-norm, r=lcnr
Structurally normalize in range pattern checking in HIR typeck

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/200

r? lcnr
2025-05-08 20:22:18 +02:00
Matthias Krüger
a054be7434
Rollup merge of #140684 - compiler-errors:unnecessary-assoc, r=lcnr
Only include `dyn Trait<Assoc = ...>` associated type bounds for `Self: Sized` associated types if they are provided

Since #136458, we began filtering out associated types with `Self: Sized` bounds when constructing the list of associated type bounds to put into our `dyn Trait` types. For example, given:

```rust
trait Trait {
    type Assoc where Self: Sized;
}
```

After #136458, even if a user writes `dyn Trait<Assoc = ()>`, the lowered ty would have an empty projection list, and thus be equivalent to `dyn Trait`. However, this has the side effect of no longer constraining any types in the RHS of `Assoc = ...`, not implying any WF implied bounds, and not requiring that they hold when unsizing.

After this PR, we include these bounds, but (still) do not require that they are provided. If the are not provided, they are skipped from the projections list.

This results in `dyn Trait` types that have differing numbers of projection bounds. This will lead to re-introducing type mismatches e.g. between `dyn Trait` and `dyn Trait<Assoc = ()>`. However, this is expected and doesn't suffer from any of the deduplication unsoundness from before #136458.

We may want to begin to ignore thse bounds in the future by bumping `unused_associated_type_bounds` to an FCW. I don't want to tangle that up into the fix that was originally intended in #136458, so I'm doing a "fix-forward" in this PR and deferring thinking about this for the future.

Fixes #140645

r? lcnr
2025-05-08 20:22:16 +02:00
Matthias Krüger
32e3207969
Rollup merge of #140341 - saethlin:black-box-qoi, r=Mark-Simulacrum
Clarify black_box warning a bit

Trying to bring the docs on black_box more in line with the advice that we have discussed in Zulip.

https://github.com/rust-lang/rust/pull/140341#issuecomment-2832592382
2025-05-08 20:22:13 +02:00
Matthias Krüger
6914d83de9
Rollup merge of #140095 - nnethercote:rm-word_or_empty, r=jdonszelmann
Eliminate `word_and_empty` methods.

To remove the last remaining `Ident::empty` uses.

r? `@jdonszelmann`
2025-05-08 20:22:09 +02:00
bors
50aa041807 Auto merge of #140786 - Kobzol:try-builds-no-deny-warnings, r=jieyouxu
Do not deny warnings in "fast" try builds

When we do the classic ``@bors` try` build without specifying `try-job` in the PR description, we want to get a compiler toolchain for perf./crater/local experimentation as fast as possible. We don't run any tests in that case, so it seems reasonable to also ignore warnings.

Fixes: https://github.com/rust-lang/rust/issues/140753

r? `@jieyouxu`

try-job: dist-x86_64-linux
2025-05-08 18:21:54 +00:00
Ralf Jung
0326a2c315 bootstrap: more consistent use of ... when citing configuration snippets 2025-05-08 20:14:10 +02:00
reddevilmidzy
b67549edd3 Add regression test for 125877 2025-05-09 03:08:40 +09:00
Jane Losare-Lusby
71e767f340 also export metrics from librustdoc 2025-05-08 10:58:13 -07:00
Ralf Jung
c4cffcebbe
Merge pull request #4316 from est31/no_let_chains
Remove let_chains feature as it is stable
2025-05-08 17:46:50 +00:00
relaxcn
b73d3b4384 fix issue-14725 2025-05-09 01:21:14 +08:00
est31
a1234d3b5e Remove let_chains feature as it is stable 2025-05-08 19:08:31 +02:00
Lukas Wirth
85ab1c48b0
Merge pull request #19507 from Hmikihiro/fix_module_doc_links
fix: resolve doc path from parent module if outer comments exist on module
2025-05-08 16:34:35 +00:00
Michael Goulet
292ecd5242 Remove some unnecessary erases 2025-05-08 16:20:57 +00:00
bendn
3b4c4938c5
add signed integers to unnecessary_lints to ensure feature parity with clippy 2025-05-08 23:16:49 +07:00
Jieyou Xu
eff20bfd29
Fix tests/rustdoc-json path 2025-05-09 00:08:40 +08:00
Jieyou Xu
c9a96eb379
Enable triagebot note functionality for rust-lang/rust
See <https://forge.rust-lang.org/triagebot/note.html>.
2025-05-09 00:00:52 +08:00
Ralf Jung
d0e63b225d
Merge pull request #4311 from est31/edition_2024
Update to edition 2024
2025-05-08 15:25:02 +00:00
bors
fe348cd1a8 Auto merge of #140797 - matthiaskrgr:rollup-3km95qh, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #140736 (trait selection: check `&` before suggest remove deref)
 - #140755 ([win][arm64] Disable various DebugInfo tests that don't work on Arm64 Windows)
 - #140756 ([arm64] Pointer auth test should link with C static library statically)
 - #140758 ([win][arm64] Disable MSVC Linker 'Arm Hazard' warning)
 - #140759 ([win][arm64] Disable std::fs tests that require symlinks)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-08 15:09:05 +00:00
Michael Goulet
9af6ee50ed Structurally resolve in check_ref_cast and calc_adjust_mode 2025-05-08 15:00:17 +00:00
est31
070fee2df3 Update miri, cargo-miri and miri-cript to edition 2024
Also update the format edition to 2024
2025-05-08 16:55:23 +02:00
lcnr
01854845bc refactor probe_and_consider_param_env_candidate 2025-05-08 14:51:41 +00:00
Ralf Jung
514d5461aa
Merge pull request #4315 from RalfJung/test-cleanup
remove stray stderr file
2025-05-08 14:39:35 +00:00
lcnr
31ebe11f61 normalization: avoid incompletely constraining GAT args 2025-05-08 14:38:47 +00:00
Hayashi Mikihiro
656a59e40f add assert to check ast_index smaller than INNER_ATTR_SET_BIT
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-08 23:37:47 +09:00
Tshepang Mbambo
079e0b4038
Merge pull request #2377 from smanilov/patch-6
Fix minor typo in installation.md
2025-05-08 16:31:26 +02:00
Ralf Jung
8930c41034 remove commented-out test leftover 2025-05-08 16:14:13 +02:00
Ralf Jung
c70dc4554c remove stray stderr file 2025-05-08 16:13:41 +02:00
Samuel Tardieu
82f8b1ccd0 Do not pretend that return is not significant
A `return` in an expression makes it divergent and cannot be removed
blindly. While this stripping might have been introduced as a way to
catch more cases, it was improperly used, and no tests exhibit a
failure when this special handling is removed.
2025-05-08 16:09:40 +02:00
Jakub Beránek
4f9bb8c735
Mention fast try builds in the rustc-dev-guide 2025-05-08 16:00:48 +02:00
Stan Manilov
a07c71d773
Fix minor typo in installation.md 2025-05-08 16:36:53 +03:00
Boxy
a278f8dcea Add release notes for 1.87.0 2025-05-08 14:33:52 +01:00
Guillaume Gomez
41ff588c70 Make rustdoc-tempdir-removal run-make tests work on other platforms than linux 2025-05-08 15:24:05 +02:00
xizheyin
88c1796384 Use span before macro expansion in lint for-loops-over-falibles
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-08 21:17:33 +08:00
xizheyin
c0f0b5157f
Add ui test for for-loops-over-falibles
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-08 21:17:28 +08:00