1
Fork 0
Commit graph

283180 commits

Author SHA1 Message Date
Nicholas Nethercote
50076cdeb9 Remove NtPath. 2025-02-28 08:42:14 +11:00
Nicholas Nethercote
7ea59e053b Remove NtMeta.
Note: there was an existing code path involving `Interpolated` in
`MetaItem::from_tokens` that was dead. This commit transfers that to the
new form, but puts an `unreachable!` call inside it.
2025-02-28 08:42:06 +11:00
Nicholas Nethercote
ef1114a964 Remove NtPat.
The one notable test change is `tests/ui/macros/trace_faulty_macros.rs`.
This commit removes the complicated `Interpolated` handling in
`expected_expression_found` that results in a longer error message. But
I think the new, shorter message is actually an improvement.

The original complaint was in #71039, when the error message started
with "error: expected expression, found `1 + 1`". That was confusing
because `1 + 1` is an expression. Other than that, the reporter said
"the whole error message is not too bad if you ignore the first line".

Subsequently, extra complexity and wording was added to the error
message. But I don't think the extra wording actually helps all that
much. In particular, it still says of the `1+1` that "this is expected
to be expression". This repeats the problem from the original complaint!

This commit removes the extra complexity, reverting to a simpler error
message. This is primarily because the traversal is a pain without
`Interpolated` tokens. Nonetheless, I think the error message is
*improved*. It now starts with "expected expression, found `pat`
metavariable", which is much clearer and the real problem. It also
doesn't say anything specific about `1+1`, which is good, because the
`1+1` isn't really relevant to the error -- it's the `$e:pat` that's
important.
2025-02-28 08:36:12 +11:00
Laurențiu Nicola
13eb83413a
Merge pull request #19194 from BenjaminBrienen/node
Update Node.js and vscode
2025-02-27 21:24:48 +00:00
Samuel Tardieu
baadee8fd3 New lint: manual_midpoint 2025-02-27 22:12:16 +01:00
Samuel Tardieu
06175f43b3 Add is_float_literal utility 2025-02-27 22:10:57 +01:00
Philipp Krones
715d3f9224
Rustup (#14300)
Out of cycle sync, as it is complicated and confusing to resolve merge
conflicts on the Rust side. This needs review for
eda3e649a41e0e73cb2e3ee6b98cbf8d7c12acae and
4d8766caaf11a14194406b8997243bb626000aae as well as the comment I'll
leave below.

changelog: none
2025-02-27 21:02:32 +00:00
Philipp Krones
b3d35b1af6 Bump nightly version -> 2025-02-27 2025-02-27 21:51:42 +01:00
Philipp Krones
28555d1231 Split must_use_unit test into an unfixable part
With the attribute refactor in rustc, making this case machine applicable is not
easily possible anymore. This splits up the tests properly.
2025-02-27 21:51:42 +01:00
Philipp Krones
53a1ff70e8 Check os_str_display MSRV instead of feature
This feature was stabilized, so the FormatArgs lints should check if the MSRV of
the stabilization is met, rather than checking if the feature is enabled.
2025-02-27 21:51:42 +01:00
Philipp Krones
02e812af4d Merge remote-tracking branch 'upstream/master' into rustup 2025-02-27 21:51:42 +01:00
bors
f45d4acf1b Auto merge of #137749 - Kobzol:fix-ci-2, r=Kobzol
Fix 32-bit MSVC CI

By throwing more hardware at it. The large runners should still use the old image. This could buy us a couple of... hours? Days? Who knows.

See https://github.com/rust-lang/rust/issues/137733 for context.

r? `@ghost`

try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: dist-i686-msvc
2025-02-27 20:40:04 +00:00
Jakub Beránek
6ea4823733 Fix 32-bit MSVC CI
By throwing more hardware at it.
2025-02-27 21:36:28 +01:00
Boxy
6c3243f008 Bless 2025-02-27 20:02:25 +00:00
Boxy
dc6db192c4 Defer repeat expr Copy check 2025-02-27 20:02:25 +00:00
Boxy
cdd8895d72 Add inference constraining Copy impl test 2025-02-27 20:02:25 +00:00
BenjaminBrienen
d6f5377826 Update Node.js, vscode, and ts deps 2025-02-27 20:53:48 +01:00
Catherine Flores
15180d4eb9
macro_use_import: Don't check is attribute comes from expansion (#14317)
It is not possible to write a declarative macro, that produces an
attribute w/o
an item attached to it. This means that the `check_item` will already
insert the
span in the map, if it came from an expansion. So additionally checking
if the
macro came from an expansion doesn't add anything here. So the
`check_attribute` function, and with that the problematic `attr.span()`
call can
be completely removed.

Fixes https://github.com/rust-lang/rust-clippy/issues/14303

r? @y21

cc @jdonszelmann

changelog: Fix ICE in [`macro_use_import`] lint
2025-02-27 19:51:57 +00:00
Philipp Krones
063d6aef0e
macro_use_import: Don't check is attribute comes from expansion
It is not possible to write a declarative macro, that produces an attribute w/o
an item attached to it. This means that the `check_item` will already insert the
span in the map, if it came from an expansion. So additionally checking if the
macro came from an expansion doesn't add anything here. So the
`check_attribute` function, and with that the problematic `attr.span()` call can
be completely removed.

Fixes #14303
2025-02-27 20:42:56 +01:00
Mu001999
d504f70ec9 Unconditionally lower match arm even if it's unneeded for never pattern in match 2025-02-28 01:29:58 +08:00
Josh Stone
396c2a8659 Stop using hash_raw_entry in CodegenCx::const_str
That unstable feature completed fcp-close, so the compiler needs to be
migrated away to allow its removal. In this case, `cg_llvm` and `cg_gcc`
were using raw entries to optimize their `const_str_cache` lookup and
insertion. We can change that to separate `get` and (on miss) `insert`
calls, so we still have the fast path avoiding string allocation when
the cache hits.
2025-02-27 09:09:52 -08:00
Laurențiu Nicola
239a6864c7
Merge pull request #19237 from BenjaminBrienen/doc-tests
Doc tests
2025-02-27 16:53:59 +00:00
Eric Huss
6cc6b86e40 Update E0133 docs for 2024 edition 2025-02-27 08:33:44 -08:00
BenjaminBrienen
1b6c4b7770 ignore another test that fails on windows 2025-02-27 16:09:00 +01:00
BenjaminBrienen
0404156654 ignore doc test that only fails on windows 2025-02-27 15:57:08 +01:00
Alex Macleod
4a9b8c6415
fix: map_entry FP inside closure (#14307)
Closes #11976

changelog: [`map_entry`]: fix FP inside closure
2025-02-27 14:42:00 +00:00
Ralf Jung
31388f5280 checked_ilog tests: deal with a bit of float imprecision 2025-02-27 15:38:22 +01:00
Vayun Biyani
c85f038307 switch #[cfg(not(llvm_enzyme))] to cfg!(llvm_enzyme) 2025-02-27 19:32:30 +05:30
BenjaminBrienen
df903a55dd fix doc tests 2025-02-27 14:58:46 +01:00
BenjaminBrienen
8c16ded966 enable doctest 2025-02-27 14:58:46 +01:00
yanglsh
329acde93e fix: map_entry FP inside closure 2025-02-27 21:28:00 +08:00
Yotam Ofek
0881dba5d3 Move "unused_exter_crate" test from rustdoc-ui to rustdoc 2025-02-27 13:22:46 +00:00
Yotam Ofek
660241d1d4 Fix test directives that were accidentally ignored 2025-02-27 13:22:16 +00:00
Lukas Wirth
494192b12e
Merge pull request #19241 from Veykril/push-lqumoruvuyvo
Fix sysroot crate-graph construction not mapping crate-ids for proc-macros
2025-02-27 12:34:03 +00:00
Lukas Wirth
cabb08ded5 Fix sysroot crate-graph construction not mapping crate-ids for proc-macros 2025-02-27 13:20:19 +01:00
Laurențiu Nicola
d4b92f4b68
Merge pull request #19230 from lnicola/zig
internal: set up Zig on CI and start using it in rust-analyzer
2025-02-27 11:34:41 +00:00
Folkert de Vries
038f4e2ff6
use the right feature in codegen tests 2025-02-27 12:23:00 +01:00
Folkert de Vries
4e961dc015
make simd_insert and simd_extract const fns 2025-02-27 12:23:00 +01:00
Folkert de Vries
a837e9966b
simplify some imports with simd::* 2025-02-27 12:22:59 +01:00
Folkert de Vries
d8a067b931
remove most simd_ intrinsic declaration in tests
instead, we can just import the intrinsics from core
2025-02-27 12:22:59 +01:00
Lukas Wirth
e162475e7c
Merge pull request #19096 from darichey/rust-project-sysroot
Allow rust-project.json to specify sysroot workspace
2025-02-27 11:22:41 +00:00
Guillaume Gomez
4747bb6017 Add missing case explanation for doc inlined re-export of doc hidden item 2025-02-27 11:53:30 +01:00
Jakub Beránek
f20dd49b74 Use original command for showing sccache stats 2025-02-27 11:45:37 +01:00
dswij
527ab050fa
fix: Avoid ICE in doc_nested_refdefs check by checking range (#14308)
The `looks_like_refdef` function was assuming the range was valid, this
just adds a check to ensure that is the case. It also works around a
subtraction underflow due to the same invalid range.

changelog: [`doc_nested_refdefs`]: Fix #14287 by avoiding invalid ranges
2025-02-27 10:45:31 +00:00
Laurențiu Nicola
230ce20d56
Merge pull request #19239 from LuuuXXX/add-support-for-ohos
Cofigurate out ohos target to avoid compilation crashes
2025-02-27 10:19:23 +00:00
Fridtjof Stoldt
f50266a423
Split needless_lifetime '_ suggestions into elidable_lifetime_names (#13960)
Fixes https://github.com/rust-lang/rust-clippy/issues/13514

changelog: Added [`elidable_lifetime_names`] to `pedantic` (Split off
from [`needless_lifetime`] for suggestions with `'_`)
[#13960](https://github.com/rust-lang/rust-clippy/pull/13960)

changelog: Enhancement: [`needless_lifetime`] No longer lints for
elidable lifetimes `'_`, use [`elidable_lifetime_names`] to lint these.
[#13960](https://github.com/rust-lang/rust-clippy/pull/13960)
2025-02-27 09:21:50 +00:00
Maja Kądziołka
5765005a7f
Clean up TypeckResults::extract_binding_mode
- Remove the `Option` from the result type, as `None` is never returned.
- Document the difference from the `BindingMode` in `PatKind::Binding`.
2025-02-27 10:19:12 +01:00
Jake Shadle
e399e152e8 Fix ICE 2025-02-27 10:18:44 +01:00
Nikita Popov
3a715798bc Update to LLVM 20 rc 3 2025-02-27 09:34:19 +01:00
Matthias Krüger
89a202d179
Rollup merge of #137694 - aDotInTheVoid:aDotInTheVoid-patch-1, r=jdonszelmann
Spruce up `AttributeKind` docs

- Remove dead link to `rustc_attr` crate.
- Add link to `rustc_attr_parsing` crate.
- Split up first paragraph so it looks better at crate-level summary

r? `@jdonszelmann`
2025-02-27 08:56:40 +01:00