Commit Graph

285822 Commits

Author SHA1 Message Date
binarycat
6893f0ac7a rustdoc test suite: clean up wording and intro 2025-03-18 13:19:33 -05:00
binarycat
a172f23df0 htmldocck: expand limitations and mention compiletest directives 2025-03-18 13:10:26 -05: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
binarycat
3668c36662 add htmldocck.md to SUMMARY.md 2025-03-18 12:10:43 -05:00
Taiki Endo
68267d0aed Fix build failure on Trusty 2025-03-19 02:05:01 +09:00
binarycat
4f053a9ee9 add new section on the rustdoc test suite 2025-03-18 12:04:47 -05: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
Jakub Beránek
a9f46f145b Merge pull request #2294 from Kobzol/ping-group
Add Fuchsia ping group page and mention Fuchsia and RfL ping groups in integration test pages
2025-03-18 16:32:12 +01:00
Jakub Beránek
c987d34a7e Add Fuchsia ping group page 2025-03-18 16:22:57 +01:00
Jakub Beránek
9ff4936afb Reorder RfL tests page to move the "what if it breaks" section to the top 2025-03-18 16:17:59 +01:00
Jakub Beránek
74698d7c2c Add Fuchsia ping group notice 2025-03-18 16:16:28 +01:00
Berrysoft
2a0cd874a9 Add stack overflow handler for cygwin 2025-03-18 23:00:33 +08:00
bjorn3
cb4a25ca81 Remove liballoc compiler-builtins f16/f128 disable patch
We already build with the compiler-builtins-no-f16-f128 feature enabled.
2025-03-18 14:49:15 +00:00
许杰友 Jieyou Xu (Joe)
7faf2a53a0 Merge pull request #2268 from xizheyin/issue-137421
Add issue link for explaining that why rustc_private linker fails
2025-03-18 22:44:16 +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
xizheyin
3e448fd4f5 Add chapter Remarks on perma-unstable features
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-18 20:49:20 +08: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
bjorn3
1adce908c6 Run alloctests tests too 2025-03-18 09:52:12 +00:00
bjorn3
ebef14a7b6 Reuse the Cargo.lock of the library workspace for coretests 2025-03-18 09:46:49 +00: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
bjorn3
93a9102a06 Rustup to rustc 1.87.0-nightly (43a2e9d2c 2025-03-17) 2025-03-18 09:01:19 +00:00
bjorn3
e69d216ab9 Sync from rust 43a2e9d2c7 2025-03-18 08:53:49 +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