Commit Graph

281461 Commits

Author SHA1 Message Date
Ralf Jung
4a4207a650 use add-core-stubs / minicore for a few more tests 2025-02-16 18:37:50 +01:00
bors
4229b80f50 Auto merge of - jhpratt:rollup-izd98sx, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 -  (Import initial generated 1.85 relnotes)
 -  (Export kernel descriptor for amdgpu kernels)
 -  (nvptx64: update default alignment to match LLVM 21)
 -  (abi_unsupported_vector_types: say which type is the problem)
 -  (Ignore Self in bounds check for associated types with Self:Sized)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-16 07:54:08 +00:00
Jacob Pratt
7884e171f7
Rollup merge of - compiler-errors:sized-bound-self, r=oli-obk
Ignore Self in bounds check for associated types with Self:Sized

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

This is morally a fix of https://github.com/rust-lang/rust/pull/112319, since the `Self: Sized` check was just missing here.

r? oli-obk
2025-02-16 00:51:25 -05:00
Jacob Pratt
f10f0f09c8
Rollup merge of - RalfJung:abi_unsupported_vector_types-better-error, r=compiler-errors
abi_unsupported_vector_types: say which type is the problem
2025-02-16 00:51:25 -05:00
Jacob Pratt
d3556c6644
Rollup merge of - durin42:nvptx64-align, r=nikic
nvptx64: update default alignment to match LLVM 21

This changed in llvm/llvm-project@91cb8f5d32. The commit itself is mostly about some intrinsic instructions, but as an aside it also mentions something about addrspace for tensor memory, which I believe is what this string is telling us.

`@rustbot` label: +llvm-main
2025-02-16 00:51:24 -05:00
Jacob Pratt
20004d4bdd
Rollup merge of - Flakebi:amdgpu-kd, r=jieyouxu,workingjubilee
Export kernel descriptor for amdgpu kernels

The host runtime (HIP or HSA) expects a kernel descriptor object for each kernel in the ELF file. The amdgpu LLVM backend generates the object. It is created as a symbol with the name of the kernel plus a `.kd` suffix.

Add it to the exported symbols in the linker script, so that it can be found.

For reference, the symbol is created here in LLVM: d5457e4c16/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp (L966)
I wrote [a test](6a9115b121) for this as well, I’ll add that once the target is merged and working.
With this, all PRs to get working code for amdgpu are open (this + the target + the two patches adding addrspacecasts for alloca and global variables).

Tracking issue: 

r? `@workingjubilee`
2025-02-16 00:51:24 -05:00
Jacob Pratt
aa37d799fc
Rollup merge of - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
Import initial generated 1.85 relnotes

https://forge.rust-lang.org/release/release-notes.html#release-team-step-5-publish-relnotes-pr

r? rust-lang/release
2025-02-16 00:51:23 -05:00
bors
c3fe9e7e4d Auto merge of - bjorn3:sync_cg_clif-2025-02-15, r=bjorn3
Subtree sync for rustc_codegen_cranelift

This fixes a miscompilation (https://github.com/rust-lang/rustc_codegen_cranelift/issues/1560)

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-02-16 04:42:16 +00:00
bors
500a686ba8 Auto merge of - matthiaskrgr:rollup-72j7mut, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 -  (Fix crate name validation)
 -  (Do not allow attributes on struct field rest patterns)
 -  (Try to recover from path sep error in type parsing)
 -  (rustdoc: Properly restore search input placeholder)
 -  (fix(rustdoc): Fixed `Copy Item Path` in rust doc)
 -  (Do not generate invalid links in job summaries)
 -  (compiletest: add `{ignore,only}-rustc_abi-x86-sse2` directives)
 -  (triagebot.toml: ping me on changes to `tests/rustdoc-json`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-16 01:29:09 +00:00
Mark Rousskov
8aa2290b86 Add relnotes for 1.85 2025-02-15 18:16:05 -05:00
bors
e72df78268 Auto merge of - cuviper:version-1.87.0, r=cuviper
Bump to version 1.87.0

https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-friday-the-week-before

r? cuviper
2025-02-15 22:19:13 +00:00
Michael Goulet
309e371f7b Ignore Self in bounds check for associated types with Self:Sized 2025-02-15 20:38:14 +00:00
Matthias Krüger
b3d5a770f6
Rollup merge of - aDotInTheVoid:pingme-pingme-pingme, r=jieyouxu
triagebot.toml: ping me on changes to `tests/rustdoc-json`
2025-02-15 20:15:03 +01:00
Matthias Krüger
77ed54ad7d
Rollup merge of - jieyouxu:rustc_abi, r=onur-ozkan
compiletest: add `{ignore,only}-rustc_abi-x86-sse2` directives

As requested in https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/compiletest.20target.20selection.20is.20way.20too.20rigid, cc `@RalfJung`

r? bootstrap (or compiler)
2025-02-15 20:15:02 +01:00
Matthias Krüger
6a7bff2915
Rollup merge of - Kobzol:ci-summary-invalid-link, r=marcoieni
Do not generate invalid links in job summaries

Avoid [this](https://github.com/rust-lang-ci/rust/actions/runs/13341911341#summary-37267605606). It has bugged me for quite some time :) When a directory is empty, the `*.xz` bash glob "expands" to a file called `*.xz`.

r? `@marcoieni`
2025-02-15 20:15:01 +01:00
Matthias Krüger
29e2caf7c3
Rollup merge of - tapanprakasht:fix-copy-item-path, r=aDotInTheVoid
fix(rustdoc): Fixed `Copy Item Path` in rust doc

This PR aims to address the issue reported by https://github.com/rust-lang/rust/issues/137048
Issue caused by previous changes for removing `@ts-expect-error` by this change 2ea95f8670
2025-02-15 20:15:00 +01:00
Matthias Krüger
df7002fac0
Rollup merge of - fmease:rustdoc-js-fix-input-placeholder-logic, r=notriddle
rustdoc: Properly restore search input placeholder

Fix the search input placeholder literally getting set to the string *undefined* on blur/defocus.
This was caused by us trying to access an undefined property in the event listener.
To prevent this from regressing again, stop typescript from ignoring the relevant site.

Steps to reproduce the bug fixed in this PR:

1. Focus the search input field by clicking on it and clear the input if necessary
2. Blur/defocus it by clicking somewhere outside of it

---

First bug that would've been caught by TSC if we had had it earlier! Type (quasi-)safety, ahoy! :)
2025-02-15 20:15:00 +01:00
Matthias Krüger
f06b75d86d
Rollup merge of - chenyukang:yukang-fix-arg-list-error-129273, r=estebank
Try to recover from path sep error in type parsing

Fixes 

Error using `:` in the argument list may mess up the parser.

case `tests/ui/suggestions/struct-field-type-including-single-colon` also changed, seems it's  the same meaning, should be OK.

r? `@estebank`
2025-02-15 20:14:59 +01:00
Matthias Krüger
06b2f6208a
Rollup merge of - Skepfyr:no-field-rest-pattern-attrs, r=compiler-errors
Do not allow attributes on struct field rest patterns

Fixes .

This removes support for attributes on struct field rest patterns (the `..` bit) from the parser. Previously any attributes were being parsed but dropped from the AST, so didn't work and were deleted by rustfmt.

This needs an equivalent change to the reference but I wanted to see how this PR is received first.
The error message it produces isn't great, however it does match the error you get if you try to add attributes to .. in struct expressions atm, although I can understand wanting to do better given this was previously accepted. I think I could move attribute parsing back up to where it was and then emit a specific new error for this case, however I might need some guidance as this is the first time I've messed around inside the compiler.

While this is technically breaking I don't think it's much of an issue: attributes in this position don't currently do anything and rustfmt outright deletes them, meaning it's incredibly unlikely to affect anyone. I have already made the equivalent change to *add* support for attributes (mostly) but the conversation in the linked issue suggested it would be more reasonable to just remove them (and pointed out it's much easier to add support later if we realise we need them).
2025-02-15 20:14:58 +01:00
Matthias Krüger
522c8f7617
Rollup merge of - fmease:fix-crate_name-validation, r=bjorn3
Fix crate name validation

Reject macro calls inside attribute `#![crate_name]` like in `#![crate_name = concat!("na", "me")]`.

Prior to , the result of the expansion (here: `"name"`) would actually be properly picked up by the compiler and used as the crate name. However since  / on master, we extract the "value" (i.e., the *literal* string literal) of the `#![crate_name]` much earlier in the pipeline way before macro expansion and **skip**/**ignore** any `#![crate_name]`s "assigned to" a macro call. See also .

T-lang has ruled to reject `#![crate_name = MACRO!(...)]` outright very similar to other built-in attributes whose value we need early like `#![crate_type]`. See accepted FCP: https://github.com/rust-lang/rust/issues/122001#issuecomment-2023203182.

Note that the check as implemented in this PR is even more "aggressive" compared to the one of `#![crate_type]` by running as early as possible in order to reject `#![crate_name = MACRO!(...)]` even in "non-normal" executions of `rustc`, namely on *print requests* (e.g., `--print=crate-name` and `--print=file-names`). If I were to move the validation step a bit further back close to the `#![crate_type]` one, `--print=crate-name` (etc.) would *not* exit fatally with an error in this kind of situation but happily report an incorrect crate name (i.e., the "crate name" as if `#![crate_name]` didn't exist / deduced from other sources like `--crate-name` or the file name) which would match the behavior on master. Again, see also .

I'm mentioning this explicitly because I'm not sure if it was that clear in the FCP'ed issue. I argue that my current approach is the most reasonable one. I know (from reading the code and from past experiments) that various print requests are still quite broken (mostly lack of validation).

To the best of my knowledge, there's no print request whose output references/contains a crate *type*, so there's no "inherent need" to move `#![crate_type]`'s validation to happen earlier.

---

Fixes .

https://github.com/rust-lang/rust/labels/relnotes: Compatibility. Breaking change.
2025-02-15 20:14:58 +01:00
Ralf Jung
313e8526dc abi_unsupported_vector_types: say which type is the problem 2025-02-15 20:02:16 +01:00
bors
9cd60bd2cc Auto merge of - weihanglo:update-cargo, r=weihanglo
Update cargo

13 commits in 2928e32734b04925ee51e1ae88bea9a83d2fd451..ce948f4616e3d4277e30c75c8bb01e094910df39
2025-02-07 16:50:22 +0000 to 2025-02-14 20:32:07 +0000
- util: provide a better error message for invalid SSH URLs ()
- Fix the description of the `"root"` field of the `cargo metadata`'s output ()
- refactor: Consolidate creation of SourceId from manifest path ()
- docs(embedded): Note the shebang deviation ()
- refactor(embedded): Integrate cargo-script logic into main parser ()
- feat: implement workspace feature unification ()
- Fix race condition in panic_abort_tests ()
- Update all dependencies ()
- Update curl from 8.9.0 to 8.12.0 ()
- Update annotate-snippets from 0.11.4 to 0.11.5 ()
- Update deny.toml ()
- Update rusqlite from 0.32.1 to 0.33.0 ()
- fix: align first line of unordered list with following ()
2025-02-15 17:58:43 +00:00
León Orell Valerian Liehr
9b6fd35738
Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
许杰友 Jieyou Xu (Joe)
d419da1a49 rustc-dev-guide: document {ignore,only}-rustc_abi-x86-sse2 2025-02-15 23:17:07 +08:00
许杰友 Jieyou Xu (Joe)
880d8c0000 compiletest: add {ignore,only}-rustc_abi-x86-sse2 directives 2025-02-15 23:17:07 +08:00
bors
608e228ca9 Auto merge of - onur-ozkan:137034-blocker, r=jieyouxu
check if CI-LLVM is enabled before testing it

Blocker for 
2025-02-15 14:58:47 +00:00
bjorn3
7a6206e9c4 Merge commit '557ed8ebb7e981817d03c87352892c394183dd70' into sync_cg_clif-2025-02-15 2025-02-15 14:13:01 +00:00
Alona Enraght-Moony
f065a5588e triagebot.toml: ping me on changes to tests/rustdoc-json 2025-02-15 13:07:44 +00:00
bjorn3
557ed8ebb7 Rustup to rustc 1.86.0-nightly (d8810e3e2 2025-02-14) 2025-02-15 12:30:44 +00:00
bors
69fd5e4059 Auto merge of - yotamofek:pr/rustdoc/more-laziness, r=GuillaumeGomez,aDotInTheVoid
Do more lazy-formatting in `librustdoc` 🦥

Modify some formatting to be lazy, i.e. to not allocate interim strings that are later formatted into different strings.
Commits are small and stand on their own, and should mostly compile separately. (The first one doesn't compile due to `dead_code` because all it does is introduce a helper used in later commits)

Really excited about this one, local perf results are really good. I'd love a perf run to see how this looks on CI. This is the comparison of `instructions:u` count between master and this PR, on my computer:

# Summary
| | Range | Mean | Count |
|:---:|:---:|:---:|:---:|
| Regressions | - | 0.00% | 0 |
| Improvements | -8.03%, -0.40% | -2.93% | 5 |
| All | -8.03%, -0.40% | -2.93% | 5 |

# Primary benchmarks
| Benchmark | Profile | Scenario | % Change | Significance Factor |
|:---:|:---:|:---:|:---:|:---:|
| typenum-1.17.0 | doc | full | -8.03% | 40.16x |
| nalgebra-0.33.0 | doc | full | -4.19% | 20.97x |
| stm32f4-0.14.0 | doc | full | -1.35% | 6.73x |
| libc-0.2.124 | doc | full | -0.67% | 3.33x |
| cranelift-codegen-0.82.1 | doc | full | -0.40% | 1.99x |
2025-02-15 11:57:15 +00:00
bjorn3
91397074fc Sync from rust d8810e3e2d 2025-02-15 11:24:22 +00:00
Jakub Beránek
e3412617df Do not generate invalid links in job summaries 2025-02-15 11:45:41 +01:00
Tapan Prakash
02f1f346c2 fix(rustdoc): Fixed Copy Item Path in rust doc 2025-02-15 15:34:27 +05:30
onur-ozkan
b2d6a7f693 check if CI-LLVM is enabled before testing it
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-15 11:00:31 +03:00
bors
8c07d140e0 Auto merge of - jhpratt:rollup-ree9mej, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 -  (re-export `FromCoroutine` from `core::iter`)
 -  (CI: split i686-mingw job to three free runners)
 -  (Implement Extend<AsciiChar> for String)
 -  (Add safe new() to NotAllOnes)
 -  (Windows: Update generated bindings)
 -  (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
 -  (Remove unnecessary check code in unused_delims)
 -  (made check_argument_compat public for use in miri)
 -  (Forward all default methods for I/O impls)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-15 07:52:03 +00:00
Jacob Pratt
ba89ea8add
Rollup merge of - thaliaarchi:io-optional-methods/write, r=workingjubilee
Forward all default methods for I/O impls

Forward all default methods for `&mut T` and `Box<T>` to the inner `io::Read`, `io::Write`, `io::Seek`, and `io::BufRead` types.
2025-02-15 02:37:33 -05:00
Jacob Pratt
6593a25028
Rollup merge of - geetanshjuneja:pub, r=RalfJung
made check_argument_compat public for use in miri

Links to [issue](https://github.com/rust-lang/miri/issues/3842) and it's [PR](https://github.com/rust-lang/miri/pull/4185#issuecomment-2657554989)  in miri.
2025-02-15 02:37:32 -05:00
Jacob Pratt
221ba2dfd1
Rollup merge of - chenyukang:yukang-fix-unused-check, r=jieyouxu,compiler-errors
Remove unnecessary check code in unused_delims

After PR , we make sure there is no unmatched delims in early lint check.
2025-02-15 02:37:31 -05:00
Jacob Pratt
c133123102
Rollup merge of - Zalathar:thir-pat-expr, r=compiler-errors
mir_build: Clarify some code for lowering `hir::PatExpr` to THIR

A few loosely-related improvements to the code that lowers certain parts of HIR patterns to THIR.

I was originally deferring this until after , but that PR probably won't happen, whereas these changes should hopefully be uncontroversial.

r? Nadrieril or reroll
2025-02-15 02:37:31 -05:00
Jacob Pratt
224be79129
Rollup merge of - ChrisDenton:windows-bindgen, r=Amanieu
Windows: Update generated bindings

Update to windows-bindgen 0.59.

This update is aimed at reducing churn in the future, but means a bit more churn now:

- `bindings.txt` no longer needs us to write the namespace for each item. This is good because it means in the future we won't need to change them if the namespace changes. However, there are a few where we still need to disambiguate due to duplicate items (this is a bug in the upstream metadata).
- The output in `windows-sys.rs` is now sorted. It was mostly sorted before but not intentionally. This should mean future changes are less noisy.

The actual code changes are minimal here. A few types are now `bool` instead of `BOOLEAN`, which is more convenient.
2025-02-15 02:37:30 -05:00
Jacob Pratt
1524b5319a
Rollup merge of - kornelski:non1, r=Noratrieb
Add safe new() to NotAllOnes

Replaces duplicated `unsafe` code with a single, easier to verify implementation.
2025-02-15 02:37:29 -05:00
Jacob Pratt
26be558650
Rollup merge of - mzeitlin11:extend-asciichar, r=scottmcm
Implement Extend<AsciiChar> for String

Implement `Extend<AsciiChar>` for `String` as suggested in https://github.com/rust-lang/rust/issues/110998#issuecomment-2590122968. Also implements `Extend<&AsciiChar>` since there's an analogous impl for `Extend<&char>`, but happy to remove if not thought useful.

r? `@scottmcm`
since you requested it, but no pressure to review!
2025-02-15 02:37:28 -05:00
Jacob Pratt
92adb927f1
Rollup merge of - marcoieni:free-runner-i686-mingw, r=jdno
CI: split i686-mingw job to three free runners

try-job: i686-mingw-1
try-job: i686-mingw-2
try-job: i686-mingw-3
try-job: x86_64-mingw-1
2025-02-15 02:37:27 -05:00
Jacob Pratt
afbeefb684
Rollup merge of - joseluis:feat-reexport_from_coroutine, r=scottmcm
re-export `FromCoroutine` from `core::iter`

tracking issue: https://github.com/rust-lang/rust/issues/43122
fixes: 
2025-02-15 02:37:27 -05:00
Ralf Jung
8769d03caf
add a doc comment 2025-02-15 08:21:27 +01:00
Thalia Archibald
11c174006e Forward all default methods for I/O impls 2025-02-14 21:48:12 -08:00
bors
f77247ac59 Auto merge of - GrigorenkoPV:erf, r=tgross35
Implement `f{16,32,64,128}::{erf,erfc}` (`#![feature(float_erf)]`)

Tracking issue: 

try-job: x86_64-gnu-aux
2025-02-15 04:52:50 +00:00
Weihang Lo
ed870c3804
Update cargo
Also add Zlib to Cargo's license exception
2025-02-14 23:11:12 -05:00
geetanshjuneja
f3fa720352 made check_argument_compat public 2025-02-15 09:37:01 +05:30
León Orell Valerian Liehr
46d53a68aa
Move #![crate_type] UI tests into attributes directory
Gets rid of two top-level UI tests which is always great.

Furthermore, move `need-crate-arg-ignore-tidy$x.rs`
from `command/` to `invalid-compile-flags/`.
`command/` concerns `std::process::Command` tests, not CLI tests.
2025-02-15 03:41:07 +01:00