Commit Graph

154065 Commits

Author SHA1 Message Date
bors
a1f2999536 Auto merge of #133251 - matthiaskrgr:rollup-gjeis3q, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #131904 (Stabilize const_pin_2)
 - #133239 (Fix LLVM target triple for `x86_64-win7-windows-msvc`)
 - #133241 (interpret: make typing_env field private)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-20 15:49:54 +00:00
Matthias Krüger
b1413e0583
Rollup merge of #133241 - RalfJung:typing-env, r=lcnr
interpret: make typing_env field private

This was made public in https://github.com/rust-lang/rust/pull/133212 but IMO it should remain private. (Specifically, this prevents it from being mutated.)

r? `@lcnr`
2024-11-20 15:48:29 +01:00
bors
bfe809d93c Auto merge of #133227 - weihanglo:update-cargo, r=weihanglo
Update cargo

5 commits in 69e595908e2c420e7f0d1be34e6c5b984c8cfb84..66221abdeca2002d318fde6efff516aab091df0e
2024-11-16 01:26:11 +0000 to 2024-11-19 21:30:02 +0000
- Docs for optional registry JSON fields (rust-lang/cargo#14839)
- Allow registries to omit empty/default fields in JSON (rust-lang/cargo#14838)
- docs(unstable): Link to -Zwarnings issue, tracking issue (rust-lang/cargo#14836)
- fix(): error context for git_fetch refspec not found (rust-lang/cargo#14806)
- you we distinction (rust-lang/cargo#14829)
2024-11-20 12:32:55 +00:00
Ralf Jung
d04088fa36 interpret: make typing_env field private 2024-11-20 11:05:53 +01:00
bors
fda6892747 Auto merge of #133234 - jhpratt:rollup-42dmg4p, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 - #132732 (Use attributes for `dangling_pointers_from_temporaries` lint)
 - #133108 (lints_that_dont_need_to_run: never skip future-compat-reported lints)
 - #133190 (CI: use free runner in dist-aarch64-msvc)
 - #133196 (Make rustc --explain compatible with BusyBox less)
 - #133216 (Implement `~const Fn` trait goal in the new solver)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-20 09:27:56 +00:00
Jacob Pratt
c364ff7058
Rollup merge of #133190 - MarcoIeni:dist-aarch64-msvc-free, r=Kobzol
CI: use free runner in dist-aarch64-msvc

try-job: dist-aarch64-msvc
2024-11-20 01:54:26 -05:00
bors
70e814bd9e Auto merge of #133212 - lcnr:questionable-uwu, r=compiler-errors
continue `ParamEnv` to `TypingEnv` transition

cc #132279

r? `@compiler-errors`
2024-11-20 06:22:01 +00:00
Weihang Lo
00903cf9c9
Update cargo 2024-11-19 21:41:31 -05:00
Matthias Krüger
2467654917
Rollup merge of #133213 - alexcrichton:fix-tier-listing, r=jieyouxu
Correct the tier listing of `wasm32-wasip2`

This target is tier 2, not tier 3, and I forgot to update this.

Closes #133206
2024-11-19 22:24:48 +01:00
Matthias Krüger
49aec06ab0
Rollup merge of #133207 - jieyouxu:macos-objcopy, r=Kobzol,bjorn3
Default-enable `llvm_tools_enabled` when no `config.toml` is present

Fixes #133195. cc `@wesleywiser` could you double check if with this patch and no `config.toml` that you can run `./x test tests/ui --stage 1`?

`llvm-objcopy` is usually required by cg_ssa on macOS to workaround bad `strip`s.

cc `@bjorn3` I hope this doesn't break cg_clif...

r? bootstrap
2024-11-19 22:24:47 +01:00
Matthias Krüger
841243f319
Rollup merge of #133201 - nnethercote:rm-TokenKind-InvalidPrefix, r=compiler-errors
Remove `TokenKind::InvalidPrefix`

It's not needed. Best reviewed one commit at a time.

r? `@estebank`
2024-11-19 22:24:47 +01:00
Matthias Krüger
c74e5a89c5
Rollup merge of #133175 - MarcoIeni:dist-i686-msvc-free, r=Kobzol
ci: use free runner in dist-i686-msvc

try-job: dist-i686-msvc
2024-11-19 22:24:45 +01:00
lcnr
7a90e84f4d InterpCx store TypingEnv instead of a ParamEnv 2024-11-19 21:36:23 +01:00
lcnr
d667dd5677 remove TypingMode::from_param_env in clippy 2024-11-19 19:31:02 +01:00
lcnr
4813fda2e6 rustdoc: yeet TypingEnv::from_param_env 2024-11-19 18:35:41 +01:00
lcnr
948cec0fad move fn is_item_raw to TypingEnv 2024-11-19 18:06:20 +01:00
bors
78993684f2 Auto merge of #133205 - matthiaskrgr:rollup-xhhhp5u, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #131081 (Use `ConstArgKind::Path` for all single-segment paths, not just params under `min_generic_const_args`)
 - #132577 (Report the `unexpected_cfgs` lint in external macros)
 - #133023 (Merge `-Zhir-stats` into `-Zinput-stats`)
 - #133200 (ignore an occasionally-failing test in Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-19 16:31:58 +00:00
Alex Crichton
616013fc49 Correct the tier listing of wasm32-wasip2
This target is tier 2, not tier 3, and I forgot to update this.

Closes #133206
2024-11-19 07:56:34 -08:00
Jieyou Xu
fcfb782a75 Register change info 2024-11-19 20:01:13 +08:00
Jieyou Xu
38f0c099b2 Default-enable llvm_tools_enabled when no config.toml is present 2024-11-19 18:48:02 +08:00
Matthias Krüger
47200547f3
Rollup merge of #132577 - Urgau:check-cfg-report-extern-macro, r=petrochenkov
Report the `unexpected_cfgs` lint in external macros

This PR marks the `unexpected_cfgs` lint as being reportable in external macros, as it's probably not the intention of the macro author to leave ineffective cfgs in the users code.

Fixes #132572

try-job: aarch64-gnu-debug
2024-11-19 09:19:19 +01:00
Nicholas Nethercote
e9a0c3c98c Remove TokenKind::InvalidPrefix.
It was added in #123752 to handle some cases involving emoji, but it
isn't necessary because it's always treated the same as
`TokenKind::InvalidIdent`. This commit removes it, which makes things a
little simpler.
2024-11-19 18:06:22 +11:00
Noah Lev
59e339f766 Introduce min_generic_const_args and directly represent paths
Co-authored-by: Boxy UwU <rust@boxyuwu.dev>
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2024-11-19 05:07:43 +00:00
León Orell Valerian Liehr
27acd5e5ec
Rollup merge of #133191 - aDotInTheVoid:whoops-thats-not-stable-and-might-never-be, r=fmease
rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section.

Tracking issue: https://github.com/rust-lang/rust/issues/102981

These have always been unstable, but were documented in the stable section in #114651
2024-11-19 04:01:33 +01:00
León Orell Valerian Liehr
49ca6c6b3e
Rollup merge of #133186 - uweigand:s390x-maintainer, r=wesleywiser
Document s390x-unknown-linux targets

This adds documentation for the following existing targets:
  s390x-unknown-linux-gnu (Tier 2 with host tools)
  s390x-unknown-linux-musl (Tier 3)

I volunteer as maintainer for these targets going forward.
2024-11-19 04:01:32 +01:00
León Orell Valerian Liehr
5f537c410e
Rollup merge of #133185 - notriddle:notriddle/roaringbitmap, r=notriddle
rustdoc-search: use smart binary search in bitmaps

Addresses a comment from [jsha's benchmarking], where the `contains` function showed up in the profiler. This commit pulls it from about 5% of the runtime to about 0.5%.

Before: https://share.firefox.dev/3ANVjon

After: https://share.firefox.dev/3OeM3gk

[jsha's benchmarking]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/search.20profiling/near/481868761
2024-11-19 04:01:31 +01:00
León Orell Valerian Liehr
09838ae70d
Rollup merge of #133181 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/edition-guide

2 commits in 2d482e203eb6d6e353814cf1415c5f94e590b9e0..915f9b319c2823f310430ecdecd86264a7870d7e
2024-11-06 07:23:07 UTC to 2024-11-05 09:03:41 UTC

- 2021: Update for raw lifetimes (rust-lang/edition-guide#330)
- CI: Switch to merge queue (rust-lang/edition-guide#333)

## rust-lang/nomicon

1 commits in 456b904f791751892b01282fd2757904993c4c26..eac89a3cbe6c4714e5029ae8b5a1c556fd4e8c42
2024-11-16 14:05:28 UTC to 2024-11-16 14:05:28 UTC

- Fix typo in what-unsafe-does (rust-lang/nomicon#469)

## rust-lang/reference

10 commits in da0f6dad767670da0e8cd5af8a7090db3272f626..41ccb0e6478305401dad92e8fd3d04a4304edb4c
2024-11-15 21:45:16 UTC to 2024-11-05 21:46:30 UTC

- Add identifiers to attributes.md and its subchapters (rust-lang/reference#1560)
- Fix 2 typos (rust-lang/reference#1674)
- Add examples to clarify the casting rules (rust-lang/reference#686)
- Explaining how to link mixed C/Rust binaries. (rust-lang/reference#838)
- Add Arm64EC to inline-assembly documentation (rust-lang/reference#1653)
- Add three more WebAssembly features to the list of accepted ones (rust-lang/reference#1638)
- Add s390x to inline-assembly documentation (rust-lang/reference#1643)
- trait object constraint correction (rust-lang/reference#1670)
- Update some "default" representation references (rust-lang/reference#1667)
- Update lifetimes for pre-expansion validation (rust-lang/reference#1668)

## rust-lang/rustc-dev-guide

12 commits in 6a5accdaf10255882b1e6c59dfe5f1c79ac95484..b679e71c2d66c6fe13e06b99ac61773b866213f0
2024-11-18 08:18:15 UTC to 2024-11-05 07:22:17 UTC

- Mention `RUSTC_BOOTSTRAP` for misc testing (rust-lang/rustc-dev-guide#2136)
- Document how to acquire `cdb.exe` (rust-lang/rustc-dev-guide#2137)
- Document `max-llvm-major-version` directive (rust-lang/rustc-dev-guide#2129)
- Document `exact-llvm-major-version` directive (rust-lang/rustc-dev-guide#2135)
- Note Rustfmt for separate rust-analyzer directory (rust-lang/rustc-dev-guide#2134)
- still accurate (rust-lang/rustc-dev-guide#2133)
- typo (rust-lang/rustc-dev-guide#2132)
- add valid date-check marker (rust-lang/rustc-dev-guide#2131)
- Update parallel-rustc.md (rust-lang/rustc-dev-guide#1926)
- Rename `{ignore,only}-debug` -> `{ignore,needs}-{rustc,std}-debug-assertions` (rust-lang/rustc-dev-guide#2101)
- update const stability docs (rust-lang/rustc-dev-guide#2111)
- Ask folks to use the Oxford comma in diagnostics (rust-lang/rustc-dev-guide#2093)
2024-11-19 04:01:30 +01:00
León Orell Valerian Liehr
f66e1749c0
Rollup merge of #133180 - GuillaumeGomez:jump-to-def-links-generics, r=notriddle
[rustdoc] Fix items with generics not having their jump to def link generated

Because the span originally included the generics, during the highlighting, it was not retrieved and therefore its jump to def link was not generated.

r? ``@notriddle``
2024-11-19 04:01:29 +01:00
Alona Enraght-Moony
ed465f2090 rustdoc book: Move --test-builder(--wrapper)? docs to unstable section. 2024-11-18 23:20:41 +00:00
MarcoIeni
0270580bc5
CI: use free runner in dist-aarch64-msvc 2024-11-18 22:09:13 +01:00
bors
b71fb5edc0 Auto merge of #132460 - lcnr:questionable-uwu, r=compiler-errors
Use `TypingMode` throughout the compiler instead of `ParamEnv`

Hopefully the biggest single PR as part of https://github.com/rust-lang/types-team/issues/128.

## `infcx.typing_env` while defining opaque types

I don't know how'll be able to correctly handle opaque types when using something taking a `TypingEnv` while defining opaque types. To correctly handle the opaques we need to be able to pass in the current `opaque_type_storage` and return constraints, i.e. we need to use a proper canonical query. We should migrate all the queries used during HIR typeck and borrowck where this matters to proper canonical queries. This is

## `layout_of` and `Reveal::All`

We convert the `ParamEnv` to `Reveal::All` right at the start of the `layout_of` query, so I've changed callers of `layout_of` to already use a post analysis `TypingEnv` when encountering it.

ca87b535a0/compiler/rustc_ty_utils/src/layout.rs (L51)

## `Ty::is_[unpin|sized|whatever]`

I haven't migrated `fn is_item_raw` to use `TypingEnv`, will do so in a followup PR, this should significantly reduce the amount of `typing_env.param_env`. At some point there will probably be zero such uses as using the type system while ignoring the `typing_mode` is incorrect.

## `MirPhase` and phase-transitions

When inside of a MIR-body, we can mostly use its `MirPhase` to figure out the right `typing_mode`. This does not work during phase transitions, most notably when transitioning from `Analysis` to `Runtime`:

dae7ac133b/compiler/rustc_mir_transform/src/lib.rs (L606-L625)

All these passes still run with `MirPhase::Analysis`, but we should only use `Reveal::All` once we're run the `RevealAll` pass. This required me to manually construct the right `TypingEnv` in all these passes. Given that it feels somewhat easy to accidentally miss this going forward, I would maybe like to change `Body::phase` to an `Option` and replace it at the start of phase transitions. This then makes it clear that the MIR is currently in a weird state.

r? `@ghost`
2024-11-18 21:07:05 +00:00
Michael Howell
826d023561 rustdoc-search: add descriptive comments to bitmap class 2024-11-18 13:37:53 -07:00
Ulrich Weigand
3ae8036f66
Update src/doc/rustc/src/platform-support/s390x-unknown-linux-gnu.md
Co-authored-by: Josh Stone <cuviper@gmail.com>
2024-11-18 21:31:39 +01:00
rustbot
3adbc16385 Update books 2024-11-18 10:47:40 -08:00
Ulrich Weigand
8f95079cfc Document s390x-unknown-linux targets
This adds documentation for the following existing targets:
  s390x-unknown-linux-gnu (Tier 2 with host tools)
  s390x-unknown-linux-musl (Tier 3)

I volunteer as maintainer for these targets going forward.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2024-11-18 19:44:25 +01:00
Michael Howell
3fbcc1f4b9 rustdoc-search: use smart binary search in bitmaps
Addresses a comment from [jsha's benchmarking], where the `contains`
function showed up in the profiler. This commit pulls it from about
5% of the runtime to about 0.5%.

[jsha's benchmarking]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/search.20profiling/near/481868761
2024-11-18 11:38:25 -07:00
Urgau
79c8e64162 Update xshell and xshell-macros to v0.2.7 2024-11-18 18:52:27 +01:00
Guillaume Gomez
786b7477f6 Fix items with generics not having their jump to def link generated 2024-11-18 17:58:57 +01:00
Guillaume Gomez
8ea02578cd Fix typo 2024-11-18 17:00:44 +01:00
MarcoIeni
37ea2028be
ci: use free runner in dist-i686-msvc 2024-11-18 16:12:40 +01:00
lcnr
9cba14b95b use TypingEnv when no infcx is available
the behavior of the type system not only depends on the current
assumptions, but also the currentnphase of the compiler. This is
mostly necessary as we need to decide whether and how to reveal
opaque types. We track this via the `TypingMode`.
2024-11-18 10:38:56 +01:00
Jacob Pratt
194c76ef0a
Rollup merge of #133158 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-11-18 02:24:36 -05:00
bors
3fb7e441ae Auto merge of #120370 - x17jiri:likely_unlikely_fix, r=saethlin
Likely unlikely fix

RFC 1131 ( https://github.com/rust-lang/rust/issues/26179 ) added likely/unlikely intrinsics, but they have been broken for a while: https://github.com/rust-lang/rust/issues/96276 , https://github.com/rust-lang/rust/issues/96275 , https://github.com/rust-lang/rust/issues/88767 . This PR tries to fix them.

Changes:
- added a new `cold_path()` intrinsic
- `likely()` and `unlikely()` changed to regular functions implemented using `cold_path()`
2024-11-17 23:57:53 +00:00
bors
5ec7d6eee7 Auto merge of #132646 - jieyouxu:liberate-aarch64-gnu-debug, r=Kobzol
Liberate `aarch64-gnu-debug` from the shackles of `--test-args=clang`

### Changes

- Drop `--test-args=clang` from `aarch64-gnu-debug` so run-make tests that are `//@ needs-force-clang-based-tests` no longer only run if their test name contains `clang` (which is a very cool footgun).
- Reorganize run-make-suport library slightly to accommodate a raw gcc invocation.
- Fix `tests/run-make/mte-ffi/rmake.rs` to use `gcc` instead of *a* c compiler.

try-job: aarch64-gnu
try-job: aarch64-gnu-debug
2024-11-17 20:51:52 +00:00
Jiri Bobek
777003ae9f Likely unlikely fix 2024-11-17 21:49:10 +01:00
bors
23e7ecb349 Auto merge of #125949 - erikdesjardins:nocomponent, r=jieyouxu
Revert "tidy: validate LLVM component names in tests"

This reverts #125472.

This has already caused a [bit](https://github.com/rust-lang/rust/pull/125702) of [trouble](https://github.com/rust-lang/rust/pull/125710), and I was mistaken about the original motivation--incorrect component names [_will_](https://github.com/rust-lang/rust/pull/125702#issuecomment-2137030731) be detected by a full CI run.

I no longer think it pulls its weight.

r? `@workingjubilee`
2024-11-17 13:19:56 +00:00
bors
1e0df74445 Auto merge of #133120 - matthiaskrgr:rollup-4actosy, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #131717 (Stabilize `const_atomic_from_ptr`)
 - #132134 (Remove `ResultsVisitable`)
 - #132449 (mark is_val_statically_known intrinsic as stably const-callable)
 - #132569 (rustdoc search: allow queries to end in an empty path segment)
 - #132787 (Unify FnKind between AST visitors and make WalkItemKind more straight forward)
 - #132832 (Deny capturing late-bound ty/const params in nested opaques)
 - #133097 (Opt out TaKO8Ki from review rotation for now)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-17 09:45:48 +00:00
Matthias Krüger
6b47c6d786
Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov
Unify FnKind between AST visitors and make WalkItemKind more straight forward

Unifying `FnKind` requires a bunch of changes to `WalkItemKind::walk` signature so I'll change them in one go

related to #128974

r? `@petrochenkov`
2024-11-16 21:05:46 +01:00
Chayim Refael Friedman
744e8e870c Fix related documents diagnostics
They were converted to LSP position using the current file's line index, which is obviously wrong.
2024-11-16 21:17:15 +02:00
Laurențiu Nicola
9f4f903bcf Bump xshell 2024-11-16 18:02:44 +02:00