33775 Commits

Author SHA1 Message Date
Lukas Wirth
0f4e6104e0 Normalize some assist names 2025-03-02 09:09:12 +01:00
Lukas Wirth
7273d714af
Merge pull request #19259 from Veykril/push-skmvrmtorqso
Add flip or-pattern assist
2025-03-02 07:41:42 +00:00
Lukas Wirth
1ce1f087da
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
Lukas Wirth
f7569a4426 Add flip or-pattern assist 2025-03-02 08:04:27 +01:00
bors
6dd58511f2 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
Lukas Wirth
76567ee28d
Merge pull request #19251 from Veykril/push-tkmpqtzxynxk
Remove syntax editing from parenthesis computation
2025-03-01 17:46:07 +00:00
Lukas Wirth
2fabcf01ad
Merge pull request #19257 from Veykril/push-myvwxskworsn
internal: Cleanup some syntax highlighting things
2025-03-01 17:43:31 +00:00
Lukas Wirth
570c6adcd3 Remove syntax editing from parenthesis computation 2025-03-01 18:32:04 +01:00
Lukas Wirth
716e9fdb8d Fix test_keyword_highlighting test 2025-03-01 18:29:47 +01:00
Lukas Wirth
8f319240b4 Cleanup string handling in syntax highlighting 2025-03-01 17:44:29 +01:00
Lukas Wirth
9200f77068 More precise macro modifiers for syntax highlighting 2025-03-01 17:23:51 +01:00
Lukas Wirth
487d682204 Cleanup highlighting macro-def handling 2025-03-01 16:54:40 +01:00
Matthias Krüger
9e8150a589
Rollup merge of #137840 - fee1-dead-contrib:push-uwkzouvnrnvs, r=oli-obk
triagebot: only ping me for constck

Per the [Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/rustbot.20pings).

cc `@rust-lang/wg-const-eval.`
2025-03-01 16:03:21 +01:00
Matthias Krüger
63b86d2880
Rollup merge of #137837 - fee1-dead-contrib:push-pvqvwuvrnwsy, r=compiler-errors
Update `const_conditions` and `explicit_implied_const_bounds` docs

Move documentation to query definitions, and add docs to `explicit_implied_const_bounds`.

r? project-const-traits
2025-03-01 16:03:20 +01:00
Matthias Krüger
b491f07633
Rollup merge of #137830 - LuigiPiucco:incompatible-isa-fix, r=workingjubilee
Fix link failure on AVR (incompatible ISA error)

Fixes #137739. A reproducer of the issue is present there. I believe the root cause was introducing the avr-none target (which has no CPU by default) while also trying to get the ISA revision from the target spec. This commit uses the `target-cpu` option instead, which is already required to be present for the target.

r? compiler
cc ``@Patryk27``
2025-03-01 16:03:20 +01:00
Matthias Krüger
099d4220e3
Rollup merge of #137828 - folkertdev:simd-intrinsic-doc-fixes, r=workingjubilee
Fix inaccurate `std::intrinsics::simd` documentation

This addresses two issues:

- the docs on comparison operators (`simd_gt` etc.) said they only work for floating-point vectors, but they work for integer vectors too.
- the docs on various functions that use a mask did not document that the mask must be a signed integer vector. Unsigned integer vectors would cause invalid behavior when the mask vector is widened (unsigned integers would use zero extension, producing incorrect results).

r? ``@workingjubilee``
2025-03-01 16:03:19 +01:00
Matthias Krüger
16f403517b
Rollup merge of #137824 - estebank:rtn-sugg, r=compiler-errors
Tweak invalid RTN errors

Make suggestions verbose.

When encountering `method(type)` bound, suggest `method(..)` instead of `method()`.

```
error: argument types not allowed with return type notation
  --> $DIR/bad-inputs-and-output.rs:9:23
   |
LL | fn foo<T: Trait<method(i32): Send>>() {}
   |                       ^^^^^
   |
help: remove the input types
   |
LL - fn foo<T: Trait<method(i32): Send>>() {}
LL + fn foo<T: Trait<method(..): Send>>() {}
   |
```

When encountering both return type and arg list that isn't `..`, suggest replacing both.

```
error: return type not allowed with return type notation
  --> $DIR/bad-inputs-and-output.rs:12:25
   |
LL | fn bar<T: Trait<method() -> (): Send>>() {}
   |                         ^^^^^^
   |
help: use the right argument notation and remove the return type
   |
LL - fn bar<T: Trait<method() -> (): Send>>() {}
LL + fn bar<T: Trait<method(..): Send>>() {}
   |
```

When encountering a return type, suggest removing it including the leading whitespace.

```
error: return type not allowed with return type notation
  --> $DIR/bad-inputs-and-output.rs:24:45
   |
LL | fn bay_path<T: Trait>() where T::method(..) -> (): Send {}
   |                                             ^^^^^
   |
help: remove the return type
   |
LL - fn bay_path<T: Trait>() where T::method(..) -> (): Send {}
LL + fn bay_path<T: Trait>() where T::method(..): Send {}
   |
```

r? ``@compiler-errors``
2025-03-01 16:03:18 +01:00
Matthias Krüger
d4a28e1bea
Rollup merge of #137822 - BoxyUwU:query_normalizer_docs, r=compiler-errors
Update query normalizer docs to not position it as the greatest pioneer in the space of normalization

I don't think its true that we intend to replace all normalization with the query normalizer- its more likely that once the new solver is stable we can replace the query normalizer with normal normalization calls as the new solver caches much more than the old solver

r? ``@compiler-errors``
2025-03-01 16:03:17 +01:00
Matthias Krüger
d42345ea2a
Rollup merge of #137818 - durin42:llvm-21-remove-readonly, r=jieyouxu
tests: adapt for LLVM 21 changes

Per discussion in #137799 we don't really need this readonly attribute, so let's just drop it so the test passes on LLVM 21.

Fixes #137799.
2025-03-01 16:03:15 +01:00
Matthias Krüger
81666f7509
Rollup merge of #137809 - Noratrieb:io-error-casing, r=thomcc
Use correct error message casing for `io::const_error`s

Error messages are supposed to start with lowercase letters, but a lot of `io::const_error` messages did not. This fixes them to start with a lowercase letter.
I did consider adding a const check for this to the macro, but some of them start with proper nouns that make sense to uppercase them.

See https://doc.rust-lang.org/1.85.0/std/error/trait.Error.html
2025-03-01 16:03:13 +01:00
Matthias Krüger
08dbe05aa5
Rollup merge of #137807 - GuillaumeGomez:doctest-qualify-result, r=notriddle
Fully qualify `Result` in generated doctest code

As discussed in https://lore.kernel.org/rust-for-linux/20250228132553.880126-1-guillaume1.gomez@gmail.com/T/#u, it would require less code for RfL to be able to reach the same result (pun unintended).

cc ``@ojeda``

r? ``@notriddle``
2025-03-01 16:03:12 +01:00
Matthias Krüger
3b112a9156
Rollup merge of #137804 - RalfJung:backend-repr-simd-vector, r=workingjubilee
rename BackendRepr::Vector → SimdVector

For many Rustaceans, "vector" does not imply "SIMD", so let's be more clear in this type that is used pervasively in the compiler.

r? `@workingjubilee`
2025-03-01 16:03:10 +01:00
bors
aedb9f2fe3 Auto merge of #133250 - DianQK:embed-bitcode-pgo, r=nikic
The embedded bitcode should always be prepared for LTO/ThinLTO

Fixes #115344. Fixes #117220.

There are currently two methods for generating bitcode that used for LTO. One method involves using `-C linker-plugin-lto` to emit object files as bitcode, which is the typical setting used by cargo. The other method is through `-C embed-bitcode=yes`.

When using with `-C embed-bitcode=yes -C lto=no`, we run a complete non-LTO LLVM pipeline to obtain bitcode, then the bitcode is used for LTO. We run the Call Graph Profile Pass twice on the same module.

This PR is doing something similar to LLVM's `buildFatLTODefaultPipeline`, obtaining the bitcode for embedding after running `buildThinLTOPreLinkDefaultPipeline`.

r? nikic
2025-03-01 08:22:18 +00:00
Shoyu Vanilla
37822d5917 Migrate convert_bool_then to SyntaxEditor
Update assist docs
2025-03-01 13:12:15 +09:00
Ralf Jung
5377cfb472 rename BackendRepr::Vector → SimdVector 2025-02-28 17:17:45 +01:00
Lukas Wirth
fe84446166
Merge pull request #19250 from Veykril/push-tmrnrlotwtmr
Have inline_local_variable use precedence calculation for parentheses
2025-02-28 10:18:50 +00:00
Lukas Wirth
e92dc3fd80 Have inline_local_variable use precedence calculation for parentheses 2025-02-28 11:03:33 +01:00
Lukas Wirth
2c4ef382d6
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
f655062cb0 Fix prefix adjustment hints unnecessarily introducing parens 2025-02-28 10:18:10 +01:00
Lukas Wirth
2cc3682e00
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
bit-aloo
dcb25b1a8c
add test 2025-02-28 10:03:03 +05:30
bit-aloo
09315ef319
Avoid suggesting redundant borrowing in completion results 2025-02-28 10:02:55 +05:30
Nicholas Crothers
15207a0474 Add anchor for intra-doc links to associated items 2025-02-27 16:39:07 -06:00
Laurențiu Nicola
fe3eda77d3
Merge pull request #19194 from BenjaminBrienen/node
Update Node.js and vscode
2025-02-27 21:24:48 +00:00
BenjaminBrienen
00726cf697 Update Node.js, vscode, and ts deps 2025-02-27 20:53:48 +01:00
Lukas Wirth
7ab7633e91 Warn when the used toolchain looks too old for rust-analyzer 2025-02-27 17:59:39 +01:00
Laurențiu Nicola
2fa819c9d3
Merge pull request #19237 from BenjaminBrienen/doc-tests
Doc tests
2025-02-27 16:53:59 +00:00
Lukas Wirth
5e18ad0770 Allow unsetting default cfgs 2025-02-27 17:34:29 +01:00
BenjaminBrienen
07bf55f017 ignore another test that fails on windows 2025-02-27 16:09:00 +01:00
BenjaminBrienen
5741189750 ignore doc test that only fails on windows 2025-02-27 15:57:08 +01:00
BenjaminBrienen
b19ef6b046 fix doc tests 2025-02-27 14:58:46 +01:00
BenjaminBrienen
bd7375a58f enable doctest 2025-02-27 14:58:46 +01:00
Lukas Wirth
63138a9618
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
d81341372b Fix sysroot crate-graph construction not mapping crate-ids for proc-macros 2025-02-27 13:20:19 +01:00
Laurențiu Nicola
505b52da5f
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
Lukas Wirth
e50bc18182
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
Alice Ryhl
4d0c1ee1bd Delete tuple unsizing 2025-02-27 10:26:33 +00:00
Laurențiu Nicola
d69e2e7297
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
LuuuXXX
6d24962cb8 Cofigurate out ohos target to avoid compilation crashes 2025-02-27 11:43:03 +08:00
bors
3ffaee7520 Auto merge of #132295 - the8472:remove-randomize-exclusion1, r=onur-ozkan
fixed wast version was released, remove randomization exemption
2025-02-27 01:37:30 +00:00