Commit Graph

269222 Commits

Author SHA1 Message Date
bors
20864efcdf Auto merge of #18361 - Veykril:veykril/push-uzsokssoyznx, r=Veykril
fix: Fix token downmapping failing for include! inputs

Supercedes https://github.com/rust-lang/rust-analyzer/pull/18325

Fixes https://github.com/rust-lang/rust-analyzer/pull/18325
Fixes https://github.com/rust-lang/rust-analyzer/issues/18313
Fixes https://github.com/rust-lang/rust-analyzer/issues/18314
2024-10-21 15:27:42 +00:00
Ralf Jung
75cadc09f2 update ABI compatibility docs for new option-like rules 2024-10-21 16:25:32 +01:00
Lukas Wirth
ea03a06411 fix: Fix token downmapping failing for include! inputs 2024-10-21 17:22:18 +02:00
bors
edbd9398dc Auto merge of #130987 - thejpster:revise-arm-platform-notes-soft-float, r=ehuss
Revise arm platform notes regarding soft float

This PR updates the Arm microcontroller platform docs to recommend `-fpregs` instead of `+soft-float` as [discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60-Ctarget-feature.3D.2Bsoft-float.60.20considered.20harmful)
2024-10-21 14:31:44 +00:00
lcnr
b64b25b99e normalizes-to disable infer var check 2024-10-21 16:25:42 +02:00
roife
ba3b7c7961 feat: better completions for extern blcoks 2024-10-21 22:23:16 +08:00
roife
e2dd95feb5 refactor add_keywords in ide-completions for clarity 2024-10-21 22:23:01 +08:00
Ralf Jung
56ee492a6e move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
bors
87f4dad8dc Auto merge of #18359 - Daanoz:support-initializeStopped, r=Veykril
feat: support initializeStopped setting

See #18356

Add option to start rust-analyzer in "stopped" state when the extension activates.
2024-10-21 14:11:33 +00:00
Ralf Jung
c3e928d8dd stabilize Strict Provenance and Exposed Provenance
This comes with a big docs rewrite.
2024-10-21 15:05:35 +01:00
bors
0d6202dd45 Auto merge of #18294 - Giga-Bowser:master, r=Veykril
Add wrap/unwrap return type in Option

I pretty much just copied over the code and tests for wrapping/unwrapping return types in `Result` and then did a bunch of find and replace changes.

I handled unwrapping statements returning `None` by just replacing `None` with the unit type, but I'm open to suggestions for more intuitive behavior here.
2024-10-21 13:56:01 +00:00
bors
a41e3155dd Auto merge of #18337 - dqkqd:issue-18287, r=Veykril
fix: private items are shown in completions for modules in fn body

Close: #18287
2024-10-21 13:41:27 +00:00
许杰友 Jieyou Xu (Joe)
70ce711098 unit_bindings: improve test coverage 2024-10-21 21:33:33 +08:00
Lukas Wirth
c7e6f1c330 Make rustc_abi compile on stable again 2024-10-21 15:11:20 +02:00
Lukas Wirth
7244af6ca3 Add rustc_abi and rustc_parse_format to rustc-crates-on-stable test 2024-10-21 14:57:41 +02:00
Khanh Duong Quoc
8b4a94f261
fix: private items are shown in completions for modules in fn body 2024-10-21 21:42:46 +09:00
bors
3ec4308f6c Auto merge of #131972 - klensy:FindFirstFileExW, r=ChrisDenton
speedup directory traversal on windows

Optimizes walking over dirs on windows by replacing `FindFirstFileW` with `FindFirstFileExW` with `FindExInfoBasic` option, that allows skipping filling unused struct field which should be faster.

Also adds the same change for fallback call of `FindFirstFileExW` in metadata call.

Locally shows small speedup, but bench results from other users are welcome.
2024-10-21 11:10:24 +00:00
bors
941c443d5a Auto merge of #17954 - Noratrieb:rustc-blazing-hash, r=Veykril
Update rustc-hash to version 2

This brings in the new optimized algorithm that was shown to have small performance benefits for rustc. I haven't run the rust-analyzer benchmarks.

See https://github.com/rust-lang/rustc-hash/pull/37.
2024-10-21 09:56:11 +00:00
Lukas Wirth
2adc6c33c9 fix: FIx mbe bench tests being iteration order dependent 2024-10-21 11:54:49 +02:00
Lukas Wirth
e9da1dce05 Update ide tests 2024-10-21 11:28:19 +02:00
Lukas Wirth
bbaeeb8262 Fix recursive_adt fixture 2024-10-21 11:28:18 +02:00
Noratrieb
657a925710 Update rustc-hash to version 2
This brings in the new optimized algorithm that was shown to have small performance benefits for
rustc.
2024-10-21 11:28:18 +02:00
Daan Sieben
4dd2af5113
feat: support initializeStopped setting 2024-10-21 10:58:54 +02:00
Jan Cibulka
d5cfcc71e8
test: Add test for trait in FQS cast, issue #98565 2024-10-21 11:45:19 +03:00
bors
3e33bda032 Auto merge of #130628 - workingjubilee:clean-up-result-ffi-guarantees, r=RalfJung
Finish stabilization of `result_ffi_guarantees`

The internal linting has been changed, so all that is left is making sure we stabilize what we want to stabilize.
2024-10-21 08:38:45 +00:00
Jubilee Young
7baf06680c lang: Strengthen RFC 3391 guarantees to match T-lang consensus 2024-10-21 00:43:36 -07:00
bors
93742bd782 Auto merge of #131988 - matthiaskrgr:rollup-tx173wn, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #126588 (Added more scenarios where comma to be removed in the function arg)
 - #131728 (bootstrap: extract builder cargo to its own module)
 - #131968 (Rip out old effects var handling code from traits)
 - #131981 (Remove the `BoundConstness::NotConst` variant)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-21 06:13:34 +00:00
Matthias Krüger
62b7293a90
Rollup merge of #131981 - compiler-errors:bound-constness, r=cjgillot
Remove the `BoundConstness::NotConst` variant

I find it easier to represent `BoundConstness::NotConst` as just `None` for some refactorings I'm doing.
2024-10-21 07:01:37 +02:00
Matthias Krüger
4f6750b86c
Rollup merge of #131968 - compiler-errors:old-effect-handling, r=fee1-dead
Rip out old effects var handling code from traits

Traits no longer have an effect parameter, so this removes logic associated with it. It also removes logic surrounding confirming `~const Destruct` bounds, which I added a looooong time ago, and which I don't feel like we need anymore -- if it needs to be added back, it should be rewritten :D

cc `@fee1-dead`
2024-10-21 07:01:37 +02:00
Matthias Krüger
09a22b8672
Rollup merge of #131728 - jieyouxu:boopstrap, r=onur-ozkan
bootstrap: extract builder cargo to its own module

I was looking at our cargo rustflags/rustdocflags usages, and I found `builder.rs` to be a large
file which made it hard to digest. This PR tries to break out the cargo command wrapper parts to
its own submodule to make it easier to identify builder cargo-specific logic.

This PR:

- Extracts the cargo command wrapper to its own module and also move `Builder::{bare_,}cargo` impl
  to the submodule.
- Reorganizes some imports in `lib.rs` (no functional changes).
- Slightly adjusts some docs in `builder.rs`.

This PR is basically just moving code around, and should not contain any functional changes.

Before this PR, `builder.rs` was 2743 lines. After this PR, `builder.rs` is down to a more
manageable 1386 lines and `cargo.rs` is 1085 lines.
2024-10-21 07:01:36 +02:00
Matthias Krüger
9ff4dab396
Rollup merge of #126588 - linyihai:trim-extra-comma, r=petrochenkov
Added more scenarios where comma to be removed in the function arg

This is an attempt to address the problem methion in https://github.com/rust-lang/rust/issues/106304#issuecomment-1837273666.

Copy the annotation to explain the fix

If the next Error::Extra ("next") doesn't next to current ("current")

```
fn foo(_: (), _: u32) {}
- foo("current", (), 1u32, "next")
+ foo((), 1u32)
```

If the previous error is not a `Error::Extra`, then do not trim the next comma

```
- foo((), "current", 42u32, "next")
+ foo((), 42u32)
```

Frankly, this is a fix from a test case and may not cover all scenarios
2024-10-21 07:01:36 +02:00
bors
f2ba41113d Auto merge of #130950 - compiler-errors:yeet-eval, r=BoxyUwU
Continue to get rid of `ty::Const::{try_}eval*`

This PR mostly does:

* Removes all of the `try_eval_*` and `eval_*` helpers from `ty::Const`, and replace their usages with `try_to_*`.
* Remove `ty::Const::eval`.
* Rename `ty::Const::normalize` to `ty::Const::normalize_internal`. This function is still used in the normalization code itself.
* Fix some weirdness around the `TransmuteFrom` goal.

I'm happy to split it out further; for example, I could probably land the first part which removes the helpers, or the changes to codegen which are more obvious than the changes to tools.

r? BoxyUwU

Part of https://github.com/rust-lang/rust/issues/130704
2024-10-21 03:46:28 +00:00
许杰友 Jieyou Xu (Joe)
2b4bf2dbb0 bootstrap: move builder.rs under builder/ directory 2024-10-21 10:34:31 +08:00
许杰友 Jieyou Xu (Joe)
1d77715f83 bootstrap: minor docs cleanup 2024-10-21 10:34:31 +08:00
许杰友 Jieyou Xu (Joe)
4b28e52f32 bootstrap: extract builder cargo to its own module
I found builder.rs to be a massive file which made it hard to digest. To
make `RUSTFLAGS` usage hardening easier later, I extracted the cargo
part in `builder.rs` into its own module.
2024-10-21 10:34:30 +08:00
bors
fb32dd41ed Auto merge of #120869 - devnexen:update_fbsd_ci, r=Mark-Simulacrum
ci update freebsd version proposal, freebsd 12 being eol

raising to the lowest still active supported freebsd version.
From 13.1 (already eol too), freebsd introduces a cpu affinity layer
with linux. It also introduces a api compatible copy_file_range which
can be used like its linux's counterpart.
The former is essential to build https://github.com/rust-lang/rust/pull/120589, therefore breaks the backward
compatibility with the previous FreeBSD releases.

Blocked on https://github.com/rust-lang/rust/issues/130465
2024-10-21 00:13:09 +00:00
bors
7ed1a51b25 Auto merge of #131980 - matthiaskrgr:rollup-iy5nw71, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #131814 (`optimize` attribute applied to things other than methods/functions/c…)
 - #131927 (Check for filecheck directives in files marked `skip-filecheck`)
 - #131967 (Remove `lower_mono_bounds`)
 - #131973 (fix(rustdoc-json-types): document rustc-hash feature)
 - #131976 (feat(rustdoc-json-types): mark simple enums as copy)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-20 21:40:21 +00:00
Michael Goulet
73a37a165e tweak hybrid preds 2024-10-20 21:03:42 +00:00
bors
f21a01f5ef Auto merge of #18354 - roife:safe-kw-2, r=lnicola
fix: classify `safe` as a contextual kw

fix #18352
2024-10-20 20:01:48 +00:00
Matthias Krüger
4b658657da
Rollup merge of #131976 - jalil-salame:rustdoc-types-copy-enums, r=aDotInTheVoid
feat(rustdoc-json-types): mark simple enums as copy

Fixes rust-lang/rustdoc-types#26 and some typos in the documentation

r? `@aDotInTheVoid`

I have been assigning these PRs to you `@aDotInTheVoid,` is that okay? I think I'm out of PRs for now, but for future reference c:
2024-10-20 21:04:15 +02:00
Matthias Krüger
c2ed685238
Rollup merge of #131973 - jalil-salame:rustdoc-types-document-feature, r=aDotInTheVoid
fix(rustdoc-json-types): document rustc-hash feature

The `rustc-hash` feature is publicly exposed by the `rustdoc-types`. It is already documented in that crate's README and Cargo.toml, but we might as well add some information to the crate docs themselves c:

Follow up to:
- #131936
- [rust-lang/rustdoc-types#42][1]

[1]: https://github.com/rust-lang/rustdoc-types/pull/42

r? `@aDotInTheVoid`
2024-10-20 21:04:14 +02:00
Matthias Krüger
2cded97c96
Rollup merge of #131967 - compiler-errors:lower-mono, r=fmease
Remove `lower_mono_bounds`

I'm not convinced about the usefulness of `lower_mono_bounds`, especially since we have *so* many lower-bound-like fns in HIR lowering, so I've just inlined it into its callers.
2024-10-20 21:04:14 +02:00
Matthias Krüger
7fbed7b07e
Rollup merge of #131927 - clubby789:skip-filecheck-directives, r=Mark-Simulacrum
Check for filecheck directives in files marked `skip-filecheck`

cc #116971
2024-10-20 21:04:13 +02:00
Matthias Krüger
2a9b6d9626
Rollup merge of #131814 - Borgerr:misapplied-optimize-attribute, r=jieyouxu
`optimize` attribute applied to things other than methods/functions/c…

…losures gives an error (#128488)

Duplicate of #128943, which I had accidentally closed when rebasing.

cc. `@jieyouxu` `@compiler-errors` `@nikomatsakis` `@traviscross` `@pnkfelix.`
2024-10-20 21:04:13 +02:00
bors
662180b34d Auto merge of #131949 - Noratrieb:fxhashup-thanks-alona, r=WaffleLapkin
Update rustc-hash to version 2 but again

it's like #129533 but not closed by bors and rebased

r? WaffleLapkin meow
2024-10-20 19:01:54 +00:00
roife
8183f6b473 fix: classify safe as a contextual kw 2024-10-21 02:56:21 +08:00
Michael Goulet
61ed4cb5b4 Remove the BoundConstness::NotConst variant 2024-10-20 18:33:59 +00:00
Jalil David Salamé Messina
afa75f0aa5
fix(rustdoc-json-types): typos
Typos found some typos in the file, so I fixed them c:
2024-10-20 19:01:36 +02:00
Jalil David Salamé Messina
f047591652
feat(rustdoc-json-types): mark simple enums as copy
Fixes [rust-lang/rustdoc-types#26](https://github.com/rust-lang/rustdoc-types/issues/26)
2024-10-20 19:01:36 +02:00
bors
de977a5acf Auto merge of #131970 - matthiaskrgr:rollup-nr32ksd, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #121560 (Allow `#[deny]` inside `#[forbid]` as a no-op)
 - #131365 (Fix missing rustfmt in msi installer #101993)
 - #131647 (Register `src/tools/unicode-table-generator` as a runnable tool)
 - #131843 (compiler: Error on layout of enums with invalid reprs)
 - #131926 (Align boolean option descriptions in `configure.py`)
 - #131961 (compiletest: tidy up how `tidy` and `tidy` (html version) are disambiguated)
 - #131962 (Make `llvm::set_section` take a `&CStr`)
 - #131964 (add latest crash tests)
 - #131965 (remove outdated comment)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-20 16:34:35 +00:00