Commit Graph

285822 Commits

Author SHA1 Message Date
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
lapla-cogito
90dbc5bf94 make never_loop applicability more flexible 2025-03-10 15:00:57 +09: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
yanglsh
97275d523c fix: unnecessary_safety_comment FP on desugared assign 2025-03-10 12:36:37 +08: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
Timo
819f3c7c67 arbitrary_source_item_ordering: Make alphabetic ordering in module item groups optional (#13718)
From feedback to the `arbitrary_source_item_ordering` lint after its
inclusion in clippy 1.82, making alphabetic ordering within module item
groups has turned out to be the most requested improvement. With this
improvement, it is possible to make the lint perform certain top-level
structural checks on modules (e.g. use statements and module inclusions
at the top), but still leaving everything else up to the developer.

Implements parts of the suggestions from #13675. A catch-all-group is
still to be implemented.

changelog: [`arbitrary_source_item_ordering`]: Make alphabetic ordering
in module item groups optional (off by default)
2025-03-09 20:25:30 +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
Manish Goregaokar
3d775b3963 docs: Add documentation to json.rs module (#14383)
Add top-level documentation comments to improve code readability and
maintainability in the json.rs module.
- Add module-level documentation describing JSON serialization and diff
functionality
- Document LintJson struct
- Add function-level documentation to explain purpose and behavior
- Document missing constants and structs

changelog: none
2025-03-09 17:41:43 +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
Alex Macleod
7bae269e3a fix broken theme CSS links in the website (#14379)
Currently, some parts of the
[website](https://rust-lang.github.io/rust-clippy/master/index.html)'s
CSS are not being applied. This seems to be due to a broken link to the
originally referenced CSS. I suspect
https://github.com/rust-lang/mdBook/pull/1368.

changelog: none
2025-03-09 14:33:57 +00:00
Turtel216
184feee826 Fix key function description 2025-03-09 16:29:07 +02:00
Turtel216
8dd65e4098 Add documentation to json.rs module 2025-03-09 16:03:12 +02:00
Folkert de Vries
a312635821 expose is_s390x_feature_detected from std::arch 2025-03-09 14:04:39 +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
Marijn Schouten
506c304654 Clarify iterator by_ref docs 2025-03-09 13:24:46 +01:00
Marijn Schouten
db7e61cfa5 document capacity for ZST as example and prose 2025-03-09 13:11:51 +01:00
lapla-cogito
ab21f716fc fix broken CSS links 2025-03-09 21:01:59 +09:00
Vadim Petrochenkov
d577883f92 metadata: Ignore sysroot when doing the manual native lib search in rustc 2025-03-09 14:23:41 +03:00