Commit Graph

285055 Commits

Author SHA1 Message Date
Michael Goulet
0a6a0e47d2 Dont consider fields that are forced unstable due to -Zforce-unstable-if-unmarked to be uninhabited 2025-03-18 18:24:02 +00:00
Michael Goulet
f6107ca173 Consider fields to be inhabited if they are unstable 2025-03-18 18:23:36 +00:00
Eric Holk
299e5d0514 Apply suggestions from code review
Co-authored-by: Travis Cross <tc@traviscross.com>
2025-03-18 10:50:33 -07:00
Josh Stone
1f64cb7e63 Add release notes for 1.85.1 2025-03-18 10:44:52 -07:00
Chris Denton
6b2fa32f14 Windows: fix FileType PartialEq implementation 2025-03-18 17:39:38 +00:00
Michael Goulet
93b31d9b21 Remove existing AFIDT implementation 2025-03-18 17:35:26 +00:00
Oli Scherer
f4b0984854 Create a safe wrapper around LLVMRustDIBuilderCreateMemberType 2025-03-18 17:15:02 +00:00
Taiki Endo
68267d0aed Fix build failure on Trusty 2025-03-19 02:05:01 +09:00
Oli Scherer
1f34b19596 Avoid splitting up a layout 2025-03-18 17:01:09 +00:00
Chris Denton
3bfb6af978 Test windows file type equality 2025-03-18 16:46:56 +00:00
aaishwarymishra@gmail.com
a3669b8982 updated compiler tests for rustc_intrinsic'
Update compiler/rustc_error_codes/src/error_codes/E0622.md

Co-authored-by: Ralf Jung <post@ralfj.de>

reverted chages on E0622.md

updated E0622.md
2025-03-18 16:22:42 +00:00
Berrysoft
2a0cd874a9 Add stack overflow handler for cygwin 2025-03-18 23:00:33 +08:00
Caleb Zulawski
c14f2fc3eb Merge pull request #452 from folkertdev/element-rotate-example
add examples for `shift_elements_{left, right}` and `rotate_elements_{left, right}`
2025-03-18 10:08:53 -04:00
Ayush Singh
9fa158d70a std: uefi: fs: Implement mkdir
- Since there is no direct mkdir in UEFI, first check if a file/dir with
  same path exists and then create the directory.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-18 19:32:46 +05:30
Alex Macleod
a422d9e68c fix: bad indent in doc comments (#14419)
TLDR
```diff
- ///    01234
+ ///     01234
     12345
```

Sometimes, in doc comments, there are 3 spaces + 1 instead of 4 spaces +
1.
To make it coherent with the rest of the clippy codebase, I `fd -t f -X
sed -E -i 's,///\s{4}(\S),/// \1,g'` and manually verified and fixed the
relevant part of code that had bad indentation.

### Example

```rs
/// fn a() {
///    01234
/// }
```
Becomes
```rs
/// fn a() {
///     01234
/// }
```

changelog: none
2025-03-18 13:59:53 +00:00
Alex Macleod
d443f38f73 Reinstate single_match/single_match_else lints with comments (#14420)
Commit efe3fe9b8c removed the ability for
`single_match` and `single_match_else` to trigger if comments were
present outside of the arms, as those comments would be lost while
rewriting the `match` expression.

This reinstates the lint, but prevents the suggestion from being applied
automatically in the presence of comments by using the `MaybeIncorrect`
applicability. Also, a note is added to the lint message to warn the
user about the need to preserve the comments if acting upon the
suggestion.

changelog: [`single_match`, `single_match_else`]: reinstate lint when
comments are inside the `match` but do not autofix the code

Fix #14418
2025-03-18 12:45:19 +00:00
Alejandra González
ea30a09fe1 Leave assignments for now (#14428)
I love this project but I (again) don't have the time nor energy at the
moment. Will go through my current assignments over time and still
review occasionally.

PS: sorry about the branch on upstream!
changelog: none
2025-03-18 12:29:56 +00:00
Ralf Jung
20d04d8a40 Revert "Rollup merge of #136355 - GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu"
This reverts commit 08dfbf49e3, reversing
changes made to 10bcdad7df.
2025-03-18 13:28:56 +01:00
Zalathar
cc8336b6c1 coverage: Don't store a body span in FunctionCoverageInfo 2025-03-18 23:18:24 +11:00
Zalathar
cd2b978433 coverage: Don't refer to the body span when enlarging empty spans
Given that we now only enlarge empty spans to "{" or "}", there shouldn't be
any danger of enlarging beyond a function body.
2025-03-18 23:18:23 +11:00
MarcoIeni
d76e89f363 CI: mirror alpine and centos images to ghcr 2025-03-18 11:35:16 +01:00
Philipp Krones
a07e887e24 Improve string_to_string lint in case it is in a map call (#14396)
Fixes https://github.com/rust-lang/rust-clippy/issues/14175.

There are two "big" cases to handle: `.map(|x| x.to_string())` and
`.map(String::to_string)`. If the closure has more than one expression,
we should not suggest `.cloned()`.

changelog: Improve `string_to_string` lint in case it is in a map call

r? @samueltardieu
2025-03-18 10:29:10 +00:00
Marijn Schouten
e5b86e2c73 Apply suggestions from code review
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-03-18 11:16:18 +01:00
Guillaume Gomez
269b913bfd Better handle blocks with just one expression 2025-03-18 11:09:20 +01:00
Folkert de Vries
85a494bd91 add examples for shift_elements_{left, right} and rotate_elements_{left, right} 2025-03-18 10:34:02 +01:00
bjorn3
7f4d3bd6af Remove the regex dependency from coretests
It is only used by a single test, yet would take up unnecessary space
once stdlib deps get vendored.
2025-03-18 09:34:01 +00:00
Jakub Beránek
9dac4797be Remove double nesting in post-merge workflow 2025-03-18 10:24:25 +01:00
Pietro Albini
5fe1e47f80 reintroduce remote-test support in run-make tests
The old Makefile-based infrastructure included support for executing
binaries with remote-test-client if configured, but that didn't get
ported to run_make_support as part of the rmake migration.

This PR re-introduces back that support, with the same implementation
(and limitations) of the original Makefile-based support.
2025-03-18 10:10:50 +01:00
Matthias Krüger
f364f3ec71 Rollup merge of #138644 - mu001999-contrib:add-cfg, r=nnethercote
Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute`

`Transition` is only used in the `Transitions::insert` in test after #137776

Detected by #128637
2025-03-18 10:09:31 +01:00
Matthias Krüger
20096eabdb Rollup merge of #138642 - jieyouxu:unvac, r=jieyouxu
Unvacation myself

Feeling better now.

r? ghost
2025-03-18 10:09:31 +01:00
Matthias Krüger
6e48c984bd Rollup merge of #138635 - Zalathar:immediate-subpat, r=compiler-errors
Extract `for_each_immediate_subpat` from THIR pattern visitors

This is extracted from some larger changes I've been working on, trying to introduce a “THIR pattern id” to refer to THIR pattern nodes without a direct reference.

The future of those changes is somewhat uncertain, due to some [proposed changes involving upvar inference](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/upvar.20inference.20on.20THIR.3F). So I'm taking my preparatory changes that make sense on their own, and extracting them into one or more independent PRs.

---

This particular patch takes two different functions that were both matching on `PatKind` to traverse subpatterns, and extracts the core match into a single helper function.
2025-03-18 10:09:30 +01:00
Matthias Krüger
bf98654e6c Rollup merge of #138569 - aDotInTheVoid:reprdoc-json, r=GuillaumeGomez
rustdoc-json: Add tests for `#[repr(...)]`

Works towards #137645 and #81359

Based on #138018, but with only the test changes. CC ```@obi1kenobi```

r? ```@GuillaumeGomez```
2025-03-18 10:09:30 +01:00
Matthias Krüger
800b8fbe39 Rollup merge of #138301 - thaliaarchi:io-optional-methods/hermit, r=tgross35
Implement `read_buf` for Hermit

Following https://github.com/hermit-os/kernel/pull/1606, it is now safe to implement `Read::read_buf` for file descriptors on Hermit.

cc ```@mkroening```
2025-03-18 10:09:29 +01:00
Matthias Krüger
42293e3c68 Rollup merge of #138080 - moxian:bootstrap-breadcrumb, r=jieyouxu
Leave a breadcrumb towards bootstrap config documentation in `bootstrap.toml`

I was curious as to the possible bootstrap options I can put in config.toml, but had some trouble figuring it out. There is no obvious documentation in `config.toml` (obviously), the documentation in src/bootstrap/defaults is *nice*, but also rather sparse, by design.
I had to dive into the parsing code, and stuble upon [a very helpful doc comment](30f168ef81/src/bootstrap/src/core/config/config.rs (L181)) there to realize that `config.example.toml` *exists*, and that it does, indeed, answer all of my questions.

So I figured it might be worth making this journey a bit easier for future contributors and add mention the `config.example.toml` directly in `config.toml`.

Now, since #137081 is in-flight which would rename `config(.example)?.toml` to `bootstrap(.example)?.toml`, I figure it's better to wait until that one lands, and submit the "new", "correct" filename upfront, instead of landing `config.toml` now and updating it to `boostrap.toml` later.

`@rustbot` blocked #137081
2025-03-18 10:09:28 +01:00
Matthias Krüger
098db784c7 Rollup merge of #136320 - RalfJung:exit, r=the8472
exit: document interaction with C

Cc https://github.com/rust-lang/rust/issues/126600
2025-03-18 10:09:28 +01:00
bors
75530e9f72 Auto merge of #135368 - Ayush1325:uefi-fs-2, r=jhpratt,nicholasbishop
uefi: fs: Implement exists

Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators.

This is an effort to break the original PR (https://github.com/rust-lang/rust/pull/129700) into much smaller chunks for faster upstreaming.
2025-03-18 09:09:12 +00:00
Thalia Archibald
a0c3dd4df4 Optimize io::Write::write_fmt for constant strings
When the formatting args to `fmt::Write::write_fmt` are a statically
known string, it simplifies to only calling `write_str` without a
runtime branch. Do the same in `io::Write::write_fmt` with `write_all`.

Also, match the convention of `fmt::Write` for the name of `args`.
2025-03-18 01:40:27 -07:00
mu001999
835357749b Add #[cfg(test)] for Transition in dfa 2025-03-18 07:17:16 +00:00
Manuel Drehwald
81b2d5508e addressing feedback, removing unused arg 2025-03-18 02:47:37 -04:00
Jakub Beránek
e9d50f4c57 Merge pull request #2293 from jieyouxu/rustc-pull
Rustc pull
2025-03-18 07:43:12 +01:00
bors
9932e5e669 Auto merge of #138630 - matthiaskrgr:rollup-kk1gogr, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #138384 (Move `hir::Item::ident` into `hir::ItemKind`.)
 - #138508 (Clarify "owned data" in E0515.md)
 - #138531 (Store test diffs in job summaries and improve analysis formatting)
 - #138533 (Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitly)
 - #138556 (Fix ICE: attempted to remap an already remapped filename)
 - #138608 (rustc_target: Add target feature constraints for LoongArch)
 - #138619 (Flatten `if`s in `rustc_codegen_ssa`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-18 05:58:46 +00:00
bors
259fdb5212 Auto merge of #138630 - matthiaskrgr:rollup-kk1gogr, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #138384 (Move `hir::Item::ident` into `hir::ItemKind`.)
 - #138508 (Clarify "owned data" in E0515.md)
 - #138531 (Store test diffs in job summaries and improve analysis formatting)
 - #138533 (Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitly)
 - #138556 (Fix ICE: attempted to remap an already remapped filename)
 - #138608 (rustc_target: Add target feature constraints for LoongArch)
 - #138619 (Flatten `if`s in `rustc_codegen_ssa`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-18 05:58:46 +00:00
Jieyou Xu
a2b7ccb0fa Unvacation myself 2025-03-18 13:51:29 +08:00
Zalathar
8bb8d74182 Extract for_each_immediate_subpat from THIR pattern visitors 2025-03-18 15:55:47 +11:00
Jieyou Xu
69ed0232ef Merge from rustc 2025-03-18 12:08:38 +08:00
Jieyou Xu
6d515a73e2 Preparing for merge from rustc 2025-03-18 12:08:16 +08:00
Catherine Flores
b057ba4622 Leave assignments for now
I love this project but I (again) don't have the time nor energy at the moment. Will go through my current assignments over time and still review occasionally.
2025-03-17 22:34:44 -05:00
Caleb Zulawski
abd5d05ec4 Merge pull request #450 from programmerjake/update-llvm-workaround-comment
update llvm workaround comment to link to rust tracking issue too
2025-03-17 23:33:54 -04:00
Caleb Zulawski
c6596476bb Merge pull request #455 from Urgau/deny-unreachable_pub
Deny `unreachable_pub` lint
2025-03-17 23:32:23 -04:00
Ayush Singh
2e70cfc04d uefi: fs: Implement exists
Also adds the initial file abstractions.

The file opening algorithm is inspired from UEFI shell. It starts by
classifying if the Path is Shell mapping, text representation of device
path protocol, or a relative path and converts into an absolute text
representation of device path protocol.

After that, it queries all handles supporting
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the
device path protocol prefix (similar to Windows drive). After that, it
opens the file in the volume using the remaining pat.

It also introduces OwnedDevicePath and BorrowedDevicePath abstractions
to allow working with the base UEFI and Shell device paths efficiently.

DevicePath in UEFI behaves like an a group of nodes laied out in the
memory contiguously and thus can be modeled using iterators.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-18 08:11:16 +05:30