1
Fork 0
Commit graph

284024 commits

Author SHA1 Message Date
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
Chris Denton
1c7aaf95e1
Update rand to 0.9.0 2025-03-10 01:21:57 +00:00
Michael Howell
9cf531d26f
doctests: build test bundle and harness separately
This prevents the included test case from getting at nightly-only
features when run on stable. The harness builds with
RUSTC_BOOTSTRAP, but the bundle doesn't.
2025-03-10 01:47:36 +01:00
Michael Howell
5d6eeea5f9
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. Since
tests that use crate attrs don't be merged, there's no way to use
nightly-only features on it anyway.
2025-03-10 01:43:14 +01:00
joboet
c52e0596c5
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-09 23:42:13 +01:00
Thalia Archibald
1abaacd375 Support File::seek for Hermit 2025-03-09 15:38:30 -07:00
Thalia Archibald
32d0c4ed86 Update hermit-abi to 0.5.0 2025-03-09 15:38:29 -07:00
bors
2b4694a698 Auto merge of #137695 - nnethercote:always-inline-query_get_at, r=saethlin
Always inline `query_get_at`.

r? `@saethlin`
2025-03-09 21:36:57 +00:00
Alona Enraght-Moony
eecf17e803
triagebot.toml: Don't label test/rustdoc-json as A-rustdoc-search (again) 2025-03-09 20:20:52 +00:00
Michael Goulet
ed6dfddfeb Do not feed anon const a type that references generics that it does not have 2025-03-09 20:03:13 +00:00
Michael Goulet
8ab05adc37 Do not write user type annotation for const param value path 2025-03-09 19:50:50 +00:00
Michael Goulet
9067f7cad6 Explain weird quirk in user type annotation lowering 2025-03-09 19:50:42 +00:00
bors
3ea711f17e Auto merge of #138279 - matthiaskrgr:rollup-ndnoipr, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #122790 (Apply dllimport in ThinLTO)
 - #137650 (Move `fs` into `sys`)
 - #138228 (Use `disjoint_bitor` inside `borrowing_sub`)
 - #138233 (Windows: Don't link std (and run-make) against advapi32, except on win7)
 - #138253 (Continue to check attr if meet empty repr for adt)
 - #138263 (Fix `repr128-dwarf` test)
 - #138276 (Lazy load NtOpenFile for UWP)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-09 18:32:36 +00:00
Matthias Krüger
33530e4cb9
Rollup merge of #138276 - bdbai:fix-uwp-ntopenfile, r=ChrisDenton
Lazy load NtOpenFile for UWP

Lazily load `NtOpenFile` to allow libraries targeting UWP to build and link.

Fixes #138257 .

r? `@ChrisDenton`
2025-03-09 16:41:54 +01:00
Matthias Krüger
1105f4ac99
Rollup merge of #138263 - beetrees:fix-repr128-dwarf, r=jieyouxu
Fix `repr128-dwarf` test

The test now correctly ignores enums from `std`.

Fixes #138254
Unblocks #138200
2025-03-09 16:41:53 +01:00
Matthias Krüger
469f48db7f
Rollup merge of #138253 - mu001999-contrib:fix-138241, r=jdonszelmann
Continue to check attr if meet empty repr for adt

Fixes #138241

Returning while checking ReprEmpty results in missing the check for the next repr
2025-03-09 16:41:53 +01:00
Matthias Krüger
980a529164
Rollup merge of #138233 - smmalis37:no-advapi32, r=ChrisDenton
Windows: Don't link std (and run-make) against advapi32, except on win7

Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.
2025-03-09 16:41:52 +01:00
Matthias Krüger
2460fc68b9
Rollup merge of #138228 - TDecking:master, r=jhpratt
Use `disjoint_bitor` inside `borrowing_sub`

This makes the definition of `borrowing_sub` consistent with that of `carrying_add`.
2025-03-09 16:41:51 +01:00
Matthias Krüger
3bc41aa3e6
Rollup merge of #137650 - thaliaarchi:move-fs-pal, r=Noratrieb
Move `fs` into `sys`

Move platform definitions of `fs` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276.

cc `@joboet`
2025-03-09 16:41:49 +01:00
Matthias Krüger
827bb5e27b
Rollup merge of #122790 - Zoxc:dllimp-rev, r=ChrisDenton
Apply dllimport in ThinLTO

This partially reverts https://github.com/rust-lang/rust/pull/103353 by properly applying `dllimport` if  `-Z dylib-lto` is passed. That PR should probably fully be reverted as it looks quite sketchy. We don't know locally if the entire crate graph would be statically linked.

This should hopefully be sufficient to make ThinLTO work for rustc on Windows.

r? ``@wesleywiser``

---

Edit: This PR is changed to just generally revert https://github.com/rust-lang/rust/pull/103353.
2025-03-09 16:41:48 +01:00
bors
385970f0c1 Auto merge of #137655 - nnethercote:split-edges-iterator, r=nnethercote
Split the `Edges` iterator.

Some nice performance wins here, mostly on the `wg-grammar` benchmark.

r? `@lcnr`
2025-03-09 15:30:47 +00:00
bdbai
33c6c3a1e9 Lazy load NtOpenFile for UWP 2025-03-09 22:42:17 +08:00
Lukas Wirth
e1912f8fa9 Rank ADT constructors as constructors for completion scoring 2025-03-09 15:36:53 +01:00
bors
ed897d5f85 Auto merge of #138267 - matthiaskrgr:rollup-vt76bhs, r=matthiaskrgr
Rollup of 12 pull requests

Successful merges:

 - #136127 (Allow `*const W<dyn A> -> *const dyn A` ptr cast)
 - #136968 (Turn order dependent trait objects future incompat warning into a hard error)
 - #137319 (Stabilize `const_vec_string_slice`)
 - #137885 (tidy: add triagebot checks)
 - #138040 (compiler: Use `size_of` from the prelude instead of imported)
 - #138084 (Use workspace lints for crates in `compiler/`)
 - #138158 (Move more layouting logic to `rustc_abi`)
 - #138160 (depend more on attr_data_structures and move find_attr! there)
 - #138192 (crashes: couple more tests)
 - #138216 (bootstrap: Fix stack printing when a step cycle is detected)
 - #138232 (Reduce verbosity of GCC build log)
 - #138242 (Revert "Don't test new error messages with the stage 0 compiler")

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-09 12:29:49 +00:00