Commit Graph

285822 Commits

Author SHA1 Message Date
Matthias Krüger
f47c7e8564 Rollup merge of #137375 - steffahn:clarify-read_line-comment, r=Mark-Simulacrum
Minor internal comments fix for `BufRead::read_line`

Just a little fix that came up while I was reading through this source code, and had to search for a few minutes to find out what was actually *meant* here.
2025-03-02 22:44:23 +01:00
Alejandra González
aa2180f5fe fix: map_entry suggest wrongly when key is not Copy (#14314)
Closes #13306
Closes #9925
Closes #9470
Closes #9305

Clippy gives wrong suggestions when the key is not `Copy`. As suggested
in #9925, in such cases Clippy will simply warn but no fix.

changelog: [`map_entry`]: fix wrong suggestions when key is not `Copy`
2025-03-02 20:55:17 +00:00
Ayush Singh
61e550a583 uefi: helpers: Add DevicePathNode abstractions
- UEFI device path is a series of nodes layed out in a contiguous memory
  region. So it makes sense to use Iterator abstraction for modeling
  DevicePaths
- This PR has been split off from #135368 for easier review. The allow
  dead_code will be removed in #135368

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-03 00:33:10 +05:30
Michael Goulet
5f575bc4bc Add a test 2025-03-02 18:53:49 +00:00
Michael Goulet
a59a8f9e75 Revert "Auto merge of #135335 - oli-obk:push-zxwssomxxtnq, r=saethlin"
This reverts commit a7a6c64a65, reversing
changes made to ebbe63891f.
2025-03-02 18:52:48 +00:00
Marijn Schouten
6867806f67 Document workings of successors more clearly
This is an attempt to fix #135087 together with https://github.com/rust-lang/rust/pull/135886, but I am not sure if I've succeeded in adding much clarity here, so don't be shy with your comments.
2025-03-02 17:41:42 +01:00
bors
f4a216d28e Auto merge of #137661 - nikic:llvm20-rc3, r=cuviper
Update to LLVM 20 rc 3

Fixes a compiler-builtins miscompile (see https://github.com/rust-lang/compiler-builtins/pull/760).
2025-03-02 15:52:42 +00:00
binarycat
57046e1470 doc: clarify that consume can be called after BufReader::peek 2025-03-02 09:49:43 -06:00
Mu001999
4508f5f862 update outdated doc with new example 2025-03-02 23:21:43 +08:00
Samuel Tardieu
336d34481e Apply ptr_eq lint only if cmp_null is not applicable
The `cmp_null` lint is more specialized than `ptr_eq`. The former should
take precedence, unless the user allows it.
2025-03-02 16:21:12 +01:00
Laurențiu Nicola
a43a5f9aef Merge pull request #19266 from the-mikedavis/lsp-pull-diagnostics-identifier
Add `identifier` to pull diagnostic LSP capabilities
2025-03-02 14:51:59 +00:00
Samuel Tardieu
d7d0abd2ad Lint more cases of ptr::eq()
Also, do not strip conversions of a function pointer to a `*const`, as
no implicit conversion will take place.
2025-03-02 15:50:13 +01:00
Michael Davis
1c00d8ffd6 Add identifier to pull diagnostic LSP capabilities
This field in the server capabilities instructs the client to maintain
the diagnostics received from a `textDocument/diagnostic` pull request
as a separate set from other diagnostics: namely those sent with classic
"push" diagnostics, `textDocument/publishDiagnostic`. rust-analyzer
emits "native" diagnostics (computed by rust-analyzer itself) in pull
diagnostics and separately emits cargo-based diagnostics with push, so
push and pull diagnostics should be different sets. Setting this field
instructs the client to avoid clearing push diagnostics when new pull
diagnostics arrive and vice versa.
2025-03-02 09:27:45 -05:00
Laurențiu Nicola
5c124a3b00 Merge pull request #19264 from lnicola/theme-color
minor: Fix transparent diagnostics
2025-03-02 14:21:42 +00:00
bit-aloo
1840f57dde add diagnostic for dangling impl 2025-03-02 19:42:42 +05:30
bit-aloo
2f9e5586a0 add diagnostic for dangling dyn 2025-03-02 19:41:39 +05:30
Laurențiu Nicola
6c1e5b4edb Fix transparent diagnostics 2025-03-02 16:05:59 +02:00
bors
7c4a55c2ac Auto merge of #137425 - yotamofek:pr/rustdoc/return-impl-display-redux, r=GuillaumeGomez
`librustdoc`: return `impl fmt::Display` in more places instead of writing to strings

Continuation of #136784 , another attempt at landing the larger parts of #136748 .
I'd like to, gradually, make all of the building blocks for rendering docs in `librustdoc` return `impl fmt::Display` instead of returning `Strings`, or receiving a `&mut String` (or `&mut impl fmt::Write`). Another smaller end goal is to be able to get rid of [`write_str`](8dac72bb1d/src/librustdoc/html/format.rs (L40-L42)).
This PR is a large step in that direction.

Most of the changes are quite mechanical, and split up into separate commits for easier reviewing (hopefully). I took `print_item` and then started by converting all the functions it called (and their dependencies), and the last commit does the conversion for `print_item` itself. Ignoring whitespace should make reviewing a bit easier.

And most importantly, perf run shows pretty good results locally, hopefully CI will also show green 😁

r? `@GuillaumeGomez` , if you feel like it.
2025-03-02 12:35:48 +00:00
Moulins
cbe32a7647 Remove layouting dead code for non-array SIMD types.
These aren't supported anymore, and are already rejected in type checking.
2025-03-02 12:50:14 +01:00
onur-ozkan
cfb475c1d2 extend scope of build_all test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-02 14:41:23 +03:00
NotLebedev
a3378f5938 Remove duplication in name/trimmed_anem docs
Reference `DefId` in `CrateDef` docs to avoid duplicating long
description of `trimmed_name`
2025-03-02 13:02:20 +03:00
Trevor Gross
37e223ccaa dec2flt: Refactor the fast path
This is just a bit of code cleanup to make use of returning early.
2025-03-02 09:35:42 +00:00
Trevor Gross
19a909ae0e dec2flt: Refactor float traits
A lot of the magic constants can be turned into expressions. This
reduces some code duplication.

Additionally, add traits to make these operations fully generic. This
will make it easier to support `f16` and `f128`.
2025-03-02 09:35:42 +00:00
Ralf Jung
b7eeaf1c6d Merge pull request #4216 from rust-lang/rustup-2025-03-02
Automatic Rustup
2025-03-02 09:25:42 +00:00
bors
4b696e6bf7 Auto merge of #136864 - Kobzol:citool, r=marcoieni
Rewrite the `ci.py` script in Rust

It would seem that I would learn by now that any script written in Python will become unmaintainable sooner or later, but alas..

r? `@marcoieni`

try-job: aarch64-gnu
try-job: dist-x86_64-linux-alt
try-job: x86_64-msvc-ext2

Fixes: https://github.com/rust-lang/rust/issues/137013
2025-03-02 09:18:02 +00:00
NotLebedev
141d2f3f02 Replace usages of Context.def_name
Use `DefId.name` and `DefId.trimmed_name` instead
2025-03-02 12:11:18 +03:00
NotLebedev
298fb8af65 Add name and trimmed_name methods to DefId 2025-03-02 12:11:14 +03:00
Jana Dönszelmann
4d0a1af920 edit mailmap 2025-03-02 10:03:01 +01:00
Ralf Jung
c40d30eb6e clippy 2025-03-02 10:01:38 +01:00
onur-ozkan
ef028d79d6 do not build additional stage on compiler paths
When calling `x build compiler (or rustc) --stage N` bootstrap builds stage N+1 compiler,
which is clearly not what we requested. This doesn't happen when running `x build --stage N`
without explicitly targeting the compiler.

The changes applied fix this issue.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-02 08:27:40 +00:00
Lukas Wirth
43c5e95af9 Normalize some assist names 2025-03-02 09:09:12 +01:00
Lukas Wirth
768749f41d Merge pull request #19259 from Veykril/push-skmvrmtorqso
Add flip or-pattern assist
2025-03-02 07:41:42 +00:00
Lukas Wirth
7d8e95806c Merge pull request #19253 from ShoyuVanilla/migrate-convert-bool-then
internal: Migrate `convert_bool_then` to `SyntaxEditor`
2025-03-02 07:21:04 +00:00
Trevor Gross
6c34daff57 dec2flt: Rename fields to be consistent with documented notation 2025-03-02 07:08:01 +00:00
Trevor Gross
626d2c5eed dec2flt: Rename Number to Decimal
The previous commit renamed `Decimal` to `DecimalSeq`. Now, rename the
type that represents a decimal floating point number to be `Decimal`.

Additionally, add some tests for internal behavior.
2025-03-02 07:08:01 +00:00
Trevor Gross
49a2d4c757 dec2flt: Rename Decimal to DecimalSeq
This module currently contains two decimal types, `Decimal` and
`Number`. These names don't provide a whole lot of insight into what
exactly they are, and `Number` is actually the one that is more like an
expected `Decimal` type.

In accordance with this, rename the existing `Decimal` to `DecimalSeq`.
This highlights that it contains a sequence of decimal digits, rather
than representing a base-10 floating point (decimal) number.

Additionally, add some tests to validate internal behavior.
2025-03-02 07:08:00 +00:00
Trevor Gross
5a2da96a44 dec2flt: Update documentation of existing methods
Fix or elaborate existing float parsing documentation. This includes
introducing a convention that should make naming more consistent.
2025-03-02 07:08:00 +00:00
Trevor Gross
a0ed304c21 float: Update some constants to pub(crate)
These constants can be useful outside of their current module. Make them
`pub(crate)` to allow for this.
2025-03-02 07:08:00 +00:00
Lukas Wirth
1b85befbd9 Add flip or-pattern assist 2025-03-02 08:04:27 +01:00
Trevor Gross
7603e0104a Simplify parallelization in test-float-parse
Currently, test case generators are launched in parallel and their test
cases also run in parallel, all within the same pool. I originally
implemented this with the assumption that there would be an advantage in
parallelizing the generators themselves, but this turns out to not
really have any benefit.

Simplify things by running generators in series while keeping their test
cases parallelized. This makes the code easier to follow, and there is
no longer a need for MPSC or multiprogress bars. Additionally, the UI
output can be made cleaner.
2025-03-02 06:13:25 +00:00
The Miri Cronjob Bot
2cf69dae73 Merge from rustc 2025-03-02 05:10:56 +00:00
The Miri Cronjob Bot
33b78f2be1 Preparing for merge from rustc 2025-03-02 05:03:55 +00:00
Zalathar
60798272d6 Adjust triagebot.toml entries for rustc_mir_build/src/builder/ 2025-03-02 14:27:53 +11:00
bors
1c3b035542 Auto merge of #137855 - matthiaskrgr:rollup-uh7f3fi, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #137804 (rename BackendRepr::Vector → SimdVector)
 - #137807 (Fully qualify `Result` in generated doctest code)
 - #137809 (Use correct error message casing for `io::const_error`s)
 - #137818 (tests: adapt for LLVM 21 changes)
 - #137822 (Update query normalizer docs to not position it as the greatest pioneer in the space of normalization)
 - #137824 (Tweak invalid RTN errors)
 - #137828 (Fix inaccurate `std::intrinsics::simd` documentation)
 - #137830 (Fix link failure on AVR (incompatible ISA error))
 - #137837 (Update `const_conditions` and `explicit_implied_const_bounds` docs)
 - #137840 (triagebot: only ping me for constck)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-02 01:39:49 +00:00
Trevor Gross
c51b229140 Disable f16 on Aarch64 without neon
LLVM has crashes at some `half` operations when built with assertions
enabled if fp-armv8 is not available [1]. Things seem to usually work,
but we are reaching LLVM undefined behavior so this needs to be
disabled.

[1]: https://github.com/llvm/llvm-project/issues/129394
2025-03-01 23:10:21 +00:00
bors
351686bcfd Auto merge of #137752 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

? `@Manishearth`

Cargo.lock change because of Clippy version bump and rustc_tool_utils new release.

Fixes #137640

Would be nice, if we could this merged before nightly is being build, so that this ICE is fixed tomorrow.
2025-03-01 22:22:06 +00:00
Karol Zwolak
4e703f5825 docs(std): mention LazyLock in const/static HashMap construction 2025-03-01 23:06:33 +01:00
许杰友 Jieyou Xu (Joe)
95b030f671 triagebot: stop backlinking to the test porting tracking issue
No longer needed.
2025-03-02 05:56:56 +08:00
许杰友 Jieyou Xu (Joe)
b0d6a8426c rustc-dev-guide: remove mentions of legacy Makefile run-make infra
And remove outdated requirements to run `run-make` tests on Windows.
2025-03-02 05:56:56 +08:00
许杰友 Jieyou Xu (Joe)
efec638308 tidy: remove legacy Makefile checks 2025-03-02 05:56:56 +08:00