1
Fork 0
Commit graph

283108 commits

Author SHA1 Message Date
bors
2f581937e1 Auto merge of #137753 - ChrisDenton:remove-sdk, r=Kobzol
Remove latest Windows SDK from 32-bit CI

This is an alternative to #137766, in case that doesn't work. It is in some ways simpler but is less principled and may be more flaky (as it involves deleting stuff).

try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: dist-i686-msvc
2025-02-28 10:12:31 +00:00
Lukas Wirth
ff7de58156 Have inline_local_variable use precedence calculation for parentheses 2025-02-28 11:03:33 +01:00
Pietro Albini
1ccff0e01a
support rust.channel = "auto-detect" 2025-02-28 11:02:22 +01:00
Samuel Tardieu
786fc1b0a7 Fix typo in query expansion documentation 2025-02-28 10:33:56 +01:00
Lukas Wirth
fd1f2e3528
Merge pull request #19249 from Veykril/push-noosrywrsuvn
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28 09:33:36 +00:00
Lukas Wirth
637dbe56fa Fix prefix adjustment hints unnecessarily introducing parens 2025-02-28 10:18:10 +01:00
Chris Denton
25617c7e69
Remove Win SDK 10.0.26100.0 from CI 2025-02-28 09:13:00 +00:00
Manuel Drehwald
90390a1642 update enzyme to handle range metadata 2025-02-28 03:53:22 -05:00
Lukas Wirth
bd8b58d7ec
Merge pull request #19246 from ncrothers/add-anchor-for-associated-items
Add anchor for intra-doc links to associated items
2025-02-28 06:32:53 +00:00
Nicholas Nethercote
b0530c9361 Remove allow(dead_code) attributes.
By either removing the function, or change the attribute to something
more precise.
2025-02-28 17:31:31 +11:00
Nicholas Nethercote
785e21d382 Remove allow(unused_variables) for rustc_transmute.
This was hiding some genuine sins, including unused arguments in
numerous functions/methods (incl. trait methods), and some unnecessary
computation.
2025-02-28 17:31:31 +11:00
Nicholas Nethercote
dfb2222952 Remove unused feature from rustc_transmute. 2025-02-28 17:31:31 +11:00
Nicholas Nethercote
1970311146 Remove unnecessary allow(unused) attribute. 2025-02-28 17:31:31 +11:00
Nicholas Nethercote
43e017fd01 Remove rustc_transmute's dependence on rustc_macros. 2025-02-28 17:31:18 +11:00
Nicholas Nethercote
5f58985f5d Remove rustc_transmute's dependence on rustc_infer.
`TransmuteTypeEnv` only needs a `TyCtxt`, not an `InferCtxt`.
2025-02-28 16:34:41 +11:00
bit-aloo
2071cc27f2
add test 2025-02-28 10:03:03 +05:30
bit-aloo
73488449c5
Avoid suggesting redundant borrowing in completion results 2025-02-28 10:02:55 +05:30
bors
cb08599451 Auto merge of #137710 - matthiaskrgr:rollup-3vmxxu9, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #136542 ([`compiletest`-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing)
 - #136579 (Fix UB in ThinVec::flat_map_in_place)
 - #136688 (require trait impls to have matching const stabilities as the traits)
 - #136846 (Make `AssocOp` more like `ExprKind`)
 - #137304 (add `IntoBounds::intersect` and `RangeBounds::is_empty`)
 - #137455 (Reuse machinery from `tail_expr_drop_order` for `if_let_rescope`)
 - #137480 (Return unexpected termination error instead of panicing in `Thread::join`)
 - #137694 (Spruce up `AttributeKind` docs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-28 03:52:52 +00:00
Esteban Küber
86945c0a54 Tweak incorrect ABI suggestion
Provide a better suggestion message, and make the suggestion verbose.

```
error[E0703]: invalid ABI: found `riscv-interrupt`
  --> $DIR/riscv-discoverability-guidance.rs:17:8
   |
LL | extern "riscv-interrupt" fn isr() {}
   |        ^^^^^^^^^^^^^^^^^ invalid ABI
   |
   = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions
help: there's a similarly named valid ABI `"riscv-interrupt-m"`
   |
LL | extern "riscv-interrupt-m" fn isr() {}
   |                        ++
```
2025-02-28 03:35:13 +00:00
Michael Goulet
b67b6c0503 Fix sized constraint for unsafe binder 2025-02-28 03:17:36 +00:00
Michael Goulet
5bf22375cf Do not yeet unsafe<> from type 2025-02-28 02:59:40 +00:00
11happy
dbf8fe068a fix: fix overflowing hex wrong suggestion
Signed-off-by: 11happy <soni5happy@gmail.com>

rebase

Signed-off-by: 11happy <soni5happy@gmail.com>

fix: rebless

Signed-off-by: 11happy <soni5happy@gmail.com>
2025-02-28 07:25:52 +05:30
Michael Goulet
371c073ecf Use mk_ty_from_kind a bit less, clean up lifetime handling in borrowck 2025-02-28 01:27:08 +00:00
Chris Denton
f3399516fa
Revert "Fix 32-bit MSVC CI"
This reverts commit 6ea4823733.
2025-02-28 00:47:45 +00:00
bors
e6059f5222 Auto merge of #137669 - DianQK:fn-atts-virtual, r=saethlin
Don't infer attributes of virtual calls based on the function body

Fixes (after backport) #137646.
Since we don't know the exact implementation of the virtual call, it might write to parameters, we can't infer the readonly attribute.
2025-02-28 00:31:26 +00:00
Samuel Tardieu
059c0abeee Fix method name in TyCtxt::hir_crate() documentation 2025-02-27 23:47:37 +01:00
Nicholas Crothers
af0c8b7f25 Add anchor for intra-doc links to associated items 2025-02-27 16:39:07 -06:00
DaniPopes
775cb23dbc
doc: update Wasmtime flags
Wasmtime's `--wasm-features` and `--wasi-modules` flags have been renamed
since these docs were initially written.

Additionally, from my testing I don't believe `--wasm threads` is needed if
`--wasi threads` is passed already.
2025-02-27 23:10:54 +01:00
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