1
Fork 0
Commit graph

283940 commits

Author SHA1 Message Date
Mara Bos
fb9ce02976 Limit formatting width and precision to 16 bits. 2025-03-10 12:20:05 +01:00
许杰友 Jieyou Xu (Joe)
063ef18fdc Revert "Use workspace lints for crates in compiler/ #138084"
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to
consider options that avoids breaking downstream usages of cargo on
distributed `rustc-src` artifacts, where such cargo invocations fail due
to inability to inherit `lints` from workspace root manifest's
`workspace.lints` (this is only valid for the source rust-lang/rust
workspace, but not really the distributed `rustc-src` artifacts).

This breakage was reported in
<https://github.com/rust-lang/rust/issues/138304>.

This reverts commit 48caf81484, reversing
changes made to c6662879b2.
2025-03-10 18:12:47 +08:00
Laurențiu Nicola
52f39ffe83
Merge pull request #19331 from lnicola/sync-from-rust
minor: Sync from downstream
2025-03-10 09:52:17 +00:00
Laurențiu Nicola
1d983bf794 Format code 2025-03-10 11:37:21 +02:00
Oli Scherer
f87e58f194 Allow int literals for pattern types with int base types 2025-03-10 09:33:33 +00:00
Lukas Wirth
af32b22982
Merge pull request #19328 from Veykril/push-umwykvoskvyp
internal: Run proc-macro server tests as separate CI job
2025-03-10 09:30:22 +00:00
Oli Scherer
9d87d4e4f5 Add tests for pattern type literals 2025-03-10 09:27:13 +00:00
Oli Scherer
916f9552e9 Reject wrapping ranges of pattern types 2025-03-10 09:27:13 +00:00
Oli Scherer
f38819ce17 Add some layout tests for pattern type edge cases 2025-03-10 09:27:13 +00:00
Laurențiu Nicola
c372c55f2b Fix simd layout test 2025-03-10 11:21:03 +02:00
Laurențiu Nicola
87d5bf2b92 Bump rustc crates 2025-03-10 11:20:56 +02:00
Lukas Wirth
ee79f3e9dc Run proc-macro server tests are separate CI job
Touch tt
2025-03-10 10:16:32 +01:00
Lukas Wirth
1c8acd4b7f
Merge pull request #19330 from ChayimFriedman2/normalize-projection
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10 09:15:35 +00:00
Jakub Beránek
1483cb67d9 Handle empty test suites in job summary report 2025-03-10 10:07:03 +01:00
Lukas Wirth
44fad0b1d6
Merge pull request #19079 from ChayimFriedman2/rename-conflict
feat: Warn the user when a rename will change the meaning of the program
2025-03-10 08:59:43 +00:00
Bastian Kersting
e5dc1e3786 Add comments for #[no_sanitize(cfi)] in stdlib 2025-03-10 08:59:24 +00:00
Bastian Kersting
02bb2d4410 Disable CFI for weakly linked syscalls
Currently, when enabling CFI via -Zsanitizer=cfi and executing e.g.
std::sys::random::getrandom, we can observe a CFI violation. This is
the case for all consumers of the std::sys::pal::weak::weak macro,
as it is defining weak functions which don't show up in LLVM IR
metadata. CFI fails for all these functions.

Similar to other such cases in
https://github.com/rust-lang/rust/issues/115199, this change stops
emitting the CFI typecheck for consumers of the macro via the
\#[no_sanitize(cfi)] attribute.
2025-03-10 08:51:04 +00:00
Lukas Wirth
f53d1eba48
Merge pull request #19327 from Veykril/push-qyyvkulltzpz
Fix `path` macro hygiene
2025-03-10 08:45:04 +00:00
Laurențiu Nicola
e1da1b09bf Merge from rust-lang/rust 2025-03-10 10:41:53 +02:00
Laurențiu Nicola
fdee1c1455 Preparing for merge from rust-lang/rust 2025-03-10 10:41:28 +02:00
Matthias Krüger
49ca431c6c
Rollup merge of #138286 - aDotInTheVoid:aDotInTheVoid-patch-3, r=compiler-errors
triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (…

Followup to #137958. I managed to miss a place, as shown by the questionable labeling of #138285.
2025-03-10 09:32:16 +01:00
Matthias Krüger
86065acbc3
Rollup merge of #138270 - StevenMia:master, r=compiler-errors
chore: Fix some comments

 Fix some comments
2025-03-10 09:32:15 +01:00
Matthias Krüger
1ae083ddd5
Rollup merge of #138238 - compiler-errors:dyn-suggestion-in-struct, r=nnethercote
Fix dyn -> param suggestion in struct ICEs

Makes the logic from #138042 a bit less ICEy and more clean. Also fixes an incorrect suggestion when the struct already has generics. I'll point out the major changes and observations in the code.

Fixes #138229
Fixes #138211

r? nnethercote since you reviewed the original pr, or re-roll if you don't want to review this
2025-03-10 09:32:14 +01:00
Matthias Krüger
2f1908df61
Rollup merge of #138074 - thaliaarchi:hermit-seek, r=ChrisDenton
Support `File::seek` for Hermit

`lseek` was added in `hermit-abi` in commit [87dd201](87dd201a14) (add missing interface for lseek, 2024-07-15), which was just released in version 0.5.0.

cc ``@mkroening,`` ``@stlankes``

Fixes https://github.com/hermit-os/hermit-rs/issues/652
2025-03-10 09:32:13 +01:00
Matthias Krüger
cbde8b9dcf
Rollup merge of #137926 - Kobzol:lld-no-start-stop-test, r=lqd
Add a test for `-znostart-stop-gc` usage with LLD

This test replicates the behavior of https://github.com/dtolnay/linkme, to test that it still works even with LLD. Without `-znostart-stop-gc` the test fails.

r? ``@lqd``

try-job: x86_64-gnu
try-job: x86_64-msvc-1
2025-03-10 09:32:12 +01:00
Matthias Krüger
2270979935
Rollup merge of #137585 - xizheyin:issue-135801, r=workingjubilee
Update documentation to consistently use 'm' in atomic synchronization example

Fixes #135801
2025-03-10 09:32:11 +01:00
Matthias Krüger
c8194f1da3
Rollup merge of #137279 - estebank:codegen-structured-errors, r=nnethercote
Make some invalid codegen attr errors structured/translatable
2025-03-10 09:32:11 +01:00
Matthias Krüger
7c957ce002
Rollup merge of #136395 - ChrisDenton:rand-0-9, r=Mark-Simulacrum
Update to rand 0.9.0

Changes include:

- `thread_rng` has been renamed to `rng`
- `Standard` has been renamed to `StandardUniform`
- `gen`, `gen_range`, `gen_bool` have been renamed to `random`, `random_range` and `random_bool` respectively.
2025-03-10 09:32:10 +01:00
bors
2b285cd5f0 Auto merge of #138200 - weihanglo:update-cargo, r=weihanglo
Update cargo

22 commits in 2622e844bc1e2e6123e54e94e4706f7b6195ce3d..ab1463d632528e39daf35f263e10c14cbe590ce8
2025-02-28 12:33:57 +0000 to 2025-03-08 01:45:05 +0000
- test: redact host target when comparing CARGO_ENV path (rust-lang/cargo#15279)
- feat: add completions for install --path (rust-lang/cargo#15266)
- fix(package): report lockfile / workspace manifest is dirty  (rust-lang/cargo#15276)
- feat(tree): Add `--depth public` behind `-Zunstable-options` (rust-lang/cargo#15243)
- Don't use `$CARGO_BUILD_TARGET` in `cargo metadata` (rust-lang/cargo#15271)
- feat: show extra build description from bootstrap (rust-lang/cargo#15269)
- Upgrade to `rustc-stable-hash v0.1.2` (rust-lang/cargo#15268)
- fix: Respect --frozen everywhere --offline or --locked is accepted (rust-lang/cargo#15263)
- feat(tree): Color the output (rust-lang/cargo#15242)
- fix(vendor): dont remove non-cached source  (rust-lang/cargo#15260)
- docs: lockfile is always included since 1.84 (rust-lang/cargo#15257)
- Remove `Cargo.toml` from `package.include` in example (rust-lang/cargo#15253)
- Small cleanup: remove unneeded result (rust-lang/cargo#15256)
- Fix typo in build-scripts.md (rust-lang/cargo#15254)
- chore(deps): update rust crate pulldown-cmark to 0.13.0 (rust-lang/cargo#15250)
- chore(deps): update compatible (rust-lang/cargo#15249)
- feat(cli): forward bash completions of third party subcommands (rust-lang/cargo#15247)
- feat: add completions for `--lockfile-path` (rust-lang/cargo#15238)
- fix: reset $CARGO if the running program is real `cargo[.exe]`  (rust-lang/cargo#15208)
- Get all members as `available targets` even though default-members was specified. (rust-lang/cargo#15199)
- refactor: control byte display precision with std::fmt options (rust-lang/cargo#15246)
- fix(package): Ensure we can package directories ending with '.rs' (rust-lang/cargo#15240)
2025-03-10 08:31:27 +00:00
Lukas Wirth
7ee9ce8480 Fix path macro hygiene 2025-03-10 09:29:27 +01:00
Lukas Wirth
c961ee6456
Merge pull request #19311 from aibaars/log-build-script-error
Log build script error output in `load_cargo::load_workspace_at`
2025-03-10 08:16:10 +00:00
Lukas Wirth
71b9103ea2
Merge pull request #19314 from snprajwal/variantdef-impl
fix(hir): `VariantDef` is `impl HasSource`
2025-03-10 08:13:24 +00:00
Lukas Wirth
b2a4f3dcef
Merge pull request #19316 from snprajwal/git-commit-ec
fix: do not apply editorconfig to git commit msg
2025-03-10 08:11:48 +00:00
Lukas Wirth
b2501efad5
Merge pull request #19252 from flodiebold/fix-fixup-delimiters
Fix syntax fixup producing invalid punctuation
2025-03-10 08:11:27 +00:00
Lukas Wirth
f36e2ead55
Merge pull request #19232 from ShoyuVanilla/issue-19196
Bump chalk for built-in supports of async closures
2025-03-10 08:11:23 +00:00
Ralf Jung
b827087a41 add tracking issue for unqualified_local_imports 2025-03-10 08:51:19 +01:00
Thalia Archibald
8c7a94e4cd Implement read_buf and vectored read/write for SGX stdio 2025-03-10 00:48:13 -07:00
Jethro Beekman
b52666868f Copy from userspace to MaybeUninit
Co-authored-by: Thalia Archibald <thalia@archibald.dev>
2025-03-10 00:45:19 -07:00
Lukas Wirth
129545f41c
Merge pull request #19325 from Veykril/push-sxyvwwsmtxrr
Rank ADT constructors as constructors for completion scoring
2025-03-10 05:59:23 +00:00
bors
2c6a12ec44 Auto merge of #136780 - joboet:move_pal_stdio, r=Amanieu
std: move stdio to `sys`

As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
2025-03-10 04:32:14 +00:00
Ben Kimock
295c70ef03 Fix O(tests) stack usage in edition 2024 mergeable doctests 2025-03-10 00:04:08 -04:00
Ayush Singh
e0a9dd31c1
uefi: fs: Partially implement FileAttr
- Just the permission and file type.
- FileTimes will need some new conversion functions and thus will come
  with a future PR. Trying to keep things simple here.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-10 08:16:56 +05:30
Ayush Singh
c717cc7cd2
uefi: fs: Implement FileType
- Similar to FilePermissions, using bool to represent the bitfield.
- FileType cannot be changed, so no need to worry about converting back
  to attribute.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-10 08:16:56 +05:30
Ayush Singh
1833737e16
uefi: fs: Implement FilePermission
- UEFI file permissions are indicated using a u64 bitfield used for
  readonly/filetype, etc.
- Using normal bool with to and from attribute conversions to
  FilePermission from overriding some other bitfields.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-10 08:16:55 +05:30
Michael Goulet
f525b173ed Remove AdtFlags::IS_ANONYMOUS and Copy/Clone condition for anonymous ADT 2025-03-10 02:31:33 +00:00
Michael Goulet
279377f87a Fix pretty printing of parsed attrs in hir_pretty 2025-03-10 02:04:26 +00:00
Michael Goulet
6a38322d26 Rename print_something to should_render 2025-03-10 02:03:19 +00:00
bors
c8a5072028 Auto merge of #137899 - notriddle:merged-doctests-stable, r=fmease,GuillaumeGomez
doctests: fix merging on stable

Fixes #137898

The generated multi-test harness relies on nightly-only APIs, so the only way to run it on stable is to enable them.

To prevent the executing test case from getting at any of the stuff that the harness uses, they're built as two separate crates. The test bundle isn't built with RUSTC_BOOTSTRAP, while the runner harness is.
2025-03-10 01:25:19 +00:00
Chris Denton
aea9ddd745
Support locking versions in permitted rustc deps 2025-03-10 01:22:06 +00:00
Chris Denton
9b71e86724
Allow wit-bindgen-rt as compiler dependency 2025-03-10 01:22:06 +00:00