Commit Graph

153475 Commits

Author SHA1 Message Date
Adrian Taylor
2eb7e0d370 CI: rfl: use rust-next temporary commit
Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next
contains some changes required to be compatible with upcoming arbitraty
self types work. Roll RFL CI forward to the latest rust-next to include
that work.

Related:
https://github.com/rust-lang/rust/pull/130225
https://github.com/rust-lang/rust/issues/44874
2024-10-23 09:31:43 +00:00
guliwa
1b5921641a
Refactor change detection for rustdoc and download-rustc 2024-10-23 09:30:00 +00:00
Ralf Jung
ad3991d303 nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
Graydon Hoare
b0f02823fa
More review comments on wasm32v1-none target 2024-10-22 23:04:45 -07:00
Graydon Hoare
212d516ab0
Address review comments on wasm32v1-none target 2024-10-22 23:04:44 -07:00
onur-ozkan
47d6667454 do not remove .cargo directroy
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-23 08:56:54 +03:00
Michael Goulet
febb3f7c88 Represent TraitBoundModifiers as distinct parts in HIR 2024-10-22 19:48:44 +00:00
Orion Gonzalez
c8de61b50d s/display-diff-tool/compiletest-diff-tool/ 2024-10-22 19:11:44 +02:00
Orion Gonzalez
37ffb94093 update CONFIG_CHANGE_HISTORY 2024-10-22 19:11:05 +02:00
Orion Gonzalez
ef4325eb85 implemented custom differ 2024-10-22 19:10:35 +02:00
Orion Gonzalez
73238301f4 add an option for a custom differ 2024-10-22 19:08:55 +02:00
bors
86d69c705a Auto merge of #132035 - matthiaskrgr:rollup-ty1e4q0, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #125205 (Fixup Windows verbatim paths when used with the `include!` macro)
 - #131049 (Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection`)
 - #131549 (Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function)
 - #131731 (add `TestFloatParse` to `tools.rs` for bootstrap)
 - #131732 (Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES)
 - #132006 (don't stage-off to previous compiler when CI rustc is available)
 - #132022 (Move `cmp_in_dominator_order` out of graph dominator computation)
 - #132033 (compiletest: Make `line_directive` return a `DirectiveLine`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-22 14:16:37 +00:00
Matthias Krüger
6db5f332af
Rollup merge of #132033 - Zalathar:directive-line, r=jieyouxu
compiletest: Make `line_directive` return a `DirectiveLine`

This reduces the need to juggle raw tuples, and opens up the possibility of moving more parts of directive parsing into `line_directive`.

In order to make the main change possible, this PR also (partly) separates the debugger-command parsing from the main directive parser. That cleanup removes support for `[rev]` in debugger commands, which is not used by any tests.
2024-10-22 15:28:52 +02:00
Matthias Krüger
56eae720bd
Rollup merge of #132006 - onur-ozkan:131947, r=jieyouxu
don't stage-off to previous compiler when CI rustc is available

Resolves the 4th item in [Tracking Issue for download-rustc improvements](https://github.com/rust-lang/rust/issues/131744).
2024-10-22 15:28:47 +02:00
Matthias Krüger
83085b99c2
Rollup merge of #131732 - m4tx:fix-82824, r=davidtwco
Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES

This fixes #82824.
2024-10-22 15:28:45 +02:00
Matthias Krüger
cbb85f1bd5
Rollup merge of #131731 - lucarlig:master, r=onur-ozkan
add `TestFloatParse` to `tools.rs` for bootstrap

add TestFloatParse to tools for bootstrap, I am not sure this is what the issue https://github.com/rust-lang/rust/issues/128012 discussion wants.

try-job: aarch64-apple
2024-10-22 15:28:43 +02:00
许杰友 Jieyou Xu (Joe)
03c7f992cd ci: switch x86_64-gnu-debug to use a large disk runner
Full stage 2 build + run-make with full debug info seems to overwhelm
the standard 4c runner's storage capacity.
2024-10-22 19:44:30 +08:00
许杰友 Jieyou Xu (Joe)
0ccc62a5dc ci: run the full run-make test suite
Instead of filtering `run-make` tests whose test names contain the
`clang` substring.
2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
e641b6c2bd tests/run-make: port issue-84395-lto-embed-bitcode to rmake.rs
Co-authored-by: Oneirical <manchot@videotron.ca>
2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
ef743af119 run-make-support: add llvm-dis and llvm-objcopy 2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
921e2f8f66 run_make_support: allow obtaining raw stdout/stderr
And match `stdout/stderr` lossy UTF-8 helpers.
2024-10-22 19:43:22 +08:00
bors
bca5fdebe0 Auto merge of #131321 - RalfJung:feature-activation, r=nnethercote
terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it)

Mostly, we currently call a feature that has a corresponding `#[feature(name)]` attribute in the current crate a "declared" feature. I think that is confusing as it does not align with what "declaring" usually means. Furthermore, we *also* refer to `#[stable]`/`#[unstable]` as *declaring* a feature (e.g. in [these diagnostics](f25e5abea2/compiler/rustc_passes/messages.ftl (L297-L301))), which aligns better with what "declaring" usually means. To make things worse, the functions  `tcx.features().active(...)` and  `tcx.features().declared(...)` both exist and they are doing almost the same thing (testing whether a corresponding `#[feature(name)]`  exists) except that `active` would ICE if the feature is not an unstable lang feature. On top of this, the callback when a feature is activated/declared is called `set_enabled`, and many comments also talk about "enabling" a feature.

So really, our terminology is just a mess.

I would suggest we use "declaring a feature" for saying that something is/was guarded by a feature (e.g. `#[stable]`/`#[unstable]`), and "enabling a feature" for  `#[feature(name)]`. This PR implements that.
2024-10-22 11:02:35 +00:00
Zalathar
997b7a6ed0 Make line_directive return a DirectiveLine
This reduces the need to juggle raw tuples, and opens up the possibility of
moving more parts of directive parsing into `line_directive`.
2024-10-22 21:47:51 +11:00
Zalathar
c4016ea455 Rename some fields of DirectiveLine 2024-10-22 21:47:51 +11:00
Zalathar
1467deea64 Stop using line_directive in runtest::debugger
This also removes unused support for `[rev]` in debugger commands, and makes
breakpoint detection slightly more sensible.
2024-10-22 21:29:08 +11:00
bors
916e9ced40 Auto merge of #132030 - matthiaskrgr:rollup-1g6quh0, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #131918 (coverage: Make counter creation handle node/edge counters more uniformly)
 - #132021 (nuttx.md: typo)
 - #132029 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-22 08:34:18 +00:00
Matthias Krüger
6e7fcb2a60
Rollup merge of #132029 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-10-22 10:08:47 +02:00
Matthias Krüger
31a9d741ec
Rollup merge of #132021 - tshepang:patch-2, r=workingjubilee
nuttx.md: typo
2024-10-22 10:08:46 +02:00
Laurențiu Nicola
efc2ba2d90 Replace some LayoutError variants with the rustc_abi errors 2024-10-22 10:19:25 +03:00
Laurențiu Nicola
420b665c60 Bump rustc crates 2024-10-22 10:12:46 +03:00
Laurențiu Nicola
5d540f4cc9 Merge from rust-lang/rust 2024-10-22 10:12:22 +03:00
Laurențiu Nicola
5038ee7282 Preparing for merge from rust-lang/rust 2024-10-22 10:12:20 +03:00
Ralf Jung
46ce5cbf33 terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it) 2024-10-22 07:37:54 +01:00
bors
f225713007 Auto merge of #132020 - workingjubilee:rollup-a8iehqg, r=workingjubilee
Rollup of 6 pull requests

Successful merges:

 - #130432 (rust_for_linux: -Zregparm=<N> commandline flag for X86 (#116972))
 - #131697 (`rt::Argument`: elide lifetimes)
 - #131807 (Always specify `llvm_abiname` for RISC-V targets)
 - #131954 (shave 150ms off bootstrap)
 - #132015 (Move const trait tests from `ui/rfcs/rfc-2632-const-trait-impl` to `ui/traits/const-traits`)
 - #132017 (Update triagebot.toml)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-22 05:49:18 +00:00
Tshepang Mbambo
3952d493a7
nuttx.md: typo 2024-10-22 05:36:39 +02:00
Jubilee
1ea4eabb81
Rollup merge of #132015 - compiler-errors:move-const-trait-tests, r=fee1-dead
Move const trait tests from `ui/rfcs/rfc-2632-const-trait-impl` to `ui/traits/const-traits`

I found the old test directory to be somewhat long to name, and I don't think it's necessary to put an experimental implementation's tests under an rfc which is closed.

r? fee1-dead

Breaking this out of #131985 so that PR doesn't touch 300 files.
2024-10-21 20:32:02 -07:00
Jubilee
aba227b3a9
Rollup merge of #131954 - the8472:bootstrap-parallel-git, r=Kobzol
shave 150ms off bootstrap

This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification.

```
OLD
Benchmark #1: ./x check core
  Time (mean ± σ):     608.7 ms ±   4.4 ms    [User: 368.3 ms, System: 455.1 ms]
  Range (min … max):   602.3 ms … 618.8 ms    10 runs

NEW
Benchmark #1: ./x check core
  Time (mean ± σ):     462.8 ms ±   2.6 ms    [User: 350.2 ms, System: 485.1 ms]
  Range (min … max):   457.5 ms … 465.6 ms    10 runs
```

This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
2024-10-21 20:32:02 -07:00
Jubilee
fe2cbbd2d5
Rollup merge of #130432 - azhogin:azhogin/regparm, r=workingjubilee,pnkfelix
rust_for_linux: -Zregparm=<N> commandline flag for X86 (#116972)

Command line flag `-Zregparm=<N>` for X86 (32-bit) for rust-for-linux: https://github.com/rust-lang/rust/issues/116972
Implemented in the similar way as fastcall/vectorcall support (args are marked InReg if fit).
2024-10-21 20:32:00 -07:00
bors
1de57a5ce9 Auto merge of #129935 - RalfJung:unsupported_calling_conventions, r=compiler-errors
make unsupported_calling_conventions a hard error

This has been a future-compat lint (not shown in dependencies) since Rust 1.55, released 3 years ago. Hopefully that was enough time so this can be made a hard error now. Given that long timeframe, I think it's justified to skip the "show in dependencies" stage. There were [not many crates hitting this](https://github.com/rust-lang/rust/pull/86231#issuecomment-866300943) even when the lint was originally added.

This should get cratered, and I assume then it needs a t-compiler FCP. (t-compiler because this looks entirely like an implementation oversight -- for the vast majority of ABIs, we already have a hard error, but some were initially missed, and we are finally fixing that.)

Fixes https://github.com/rust-lang/rust/pull/87678
2024-10-22 03:24:40 +00:00
Michael Goulet
e91267f3f0 Move tests 2024-10-22 00:03:09 +00:00
bors
4392847410 Auto merge of #131570 - ehuss:update-xcode, r=Mark-Simulacrum
(ci) Update macOS Xcode to 15

This updates the macOS builders to Xcode 15. The aarch64 images will be removing Xcode 14 and 16 very soon (https://github.com/actions/runner-images/issues/10703), so we will need to make the switch to continue operating. The linked issue also documents GitHub's new policy for how they will be updating Xcode in the future. Also worth being aware of is the future plans for x86 runners documented in https://github.com/actions/runner-images/issues/9255 and https://github.com/actions/runner-images/issues/10686, which will impact our future upgrade behaviors.

I decided to also update the Xcode in the x86_64 runners, even though they are not being removed. It felt better to me to have all macOS runners on the same (major) version of Xcode. However, note that the x86_64 runners do not have the latest version of 15 (15.4), so I left them at 15.2 (which is currently the default Xcode of the runner).

Xcode 15 was previously causing problems (see #121058) which seem to be resolved now. `@bjorn3` fixed the `invalid r_symbolnum` issue with cranelift. The issue with clang failing to link seems to be fixed, possibly by the update of the pre-built LLVM from 14 to llvm 15 in https://github.com/rust-lang/rust/pull/124850, or an update in our source version of LLVM. I have run some try builds and at least LLVM seems to build (I did not run any tests).

Closes #121058
2024-10-21 20:19:06 +00:00
bors
fa815a1cbb Auto merge of #18360 - roife:safe-kw-3, r=Veykril
feat: better completions for extern blcoks

This PR refactors `add_keywords` (making it much clearer!) and enhances completion for `extern` blocks.

It is recommended to reviewing the changes in order of the commits:

- The first commit (f3c4dde0a4917a2bac98605cc045eecfb4d69872) doesn’t change any logic but refactors parts of the `add_keywords` function and adds detailed comments.
- The second commit (5dcc1ab649bf8a49cadf006d620871b12f093a2f) improves completion for `extern` kw and extern blocks.
2024-10-21 17:59:05 +00:00
bors
31e102c509 Auto merge of #132005 - matthiaskrgr:rollup-ced4upi, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #130350 (stabilize Strict Provenance and Exposed Provenance APIs)
 - #131737 (linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks)
 - #131991 (test: Add test for trait in FQS cast, issue #98565)
 - #131997 (Make `rustc_abi` compile on stable again)
 - #131999 (Improve test coverage for `unit_bindings` lint)
 - #132001 (fix coherence error for very large tuples™)
 - #132003 (update ABI compatibility docs for new option-like rules)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-21 17:33:42 +00:00
roife
ad27b8225f minor: refactor completions in item_list 2024-10-22 01:31:57 +08:00
onur-ozkan
774201e3b6 don't stage-off to previous compiler when CI rustc is available
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-21 19:34:41 +03:00
Matthias Krüger
1cc8c8de95
Rollup merge of #131737 - jieyouxu:note-summary, r=ehuss
linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks

I spent an embarrassingly long amount of time trying to figure out why CI was failing for a PR adding new platform support docs. In turns out it's because the PR author didn't register the new page in `SUMMARY.md`. I completely forgot about it too, and was reading linkchecker source because I thought it was a bug in linkchecker.

So this PR adds a note to modify `SUMMARY.md` when adding new pages in a mdBook.

E.g.

```
# Adding a new `meow` target but forgor to register the page in `SUMMARY.md`
rustc\platform-support.html:183: broken link - `rustc\platform-support\meow.html`
rustc\print.html:9730: broken link - `rustc\platform-support\meow.html`
checked links in: 19.1s
number of HTML files scanned: 43588
number of HTML redirects found: 13735
number of links checked: 3145951
number of links ignored due to external: 156244
number of links ignored due to exceptions: 9
number of intra doc links ignored: 8
errors found: 2
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
found some broken links
```
2024-10-21 18:11:20 +02:00
Matthias Krüger
20b1dadf92
Rollup merge of #130350 - RalfJung:strict-provenance, r=dtolnay
stabilize Strict Provenance and Exposed Provenance APIs

Given that [RFC 3559](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html) has been accepted, t-lang has approved the concept of provenance to exist in the language. So I think it's time that we stabilize the strict provenance and exposed provenance APIs, and discuss provenance explicitly in the docs:
```rust
// core::ptr
pub const fn without_provenance<T>(addr: usize) -> *const T;
pub const fn dangling<T>() -> *const T;
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T;
pub const fn dangling_mut<T>() -> *mut T;
pub fn with_exposed_provenance<T>(addr: usize) -> *const T;
pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T;

impl<T: ?Sized> *const T {
    pub fn addr(self) -> usize;
    pub fn expose_provenance(self) -> usize;
    pub fn with_addr(self, addr: usize) -> Self;
    pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self;
}

impl<T: ?Sized> *mut T {
    pub fn addr(self) -> usize;
    pub fn expose_provenance(self) -> usize;
    pub fn with_addr(self, addr: usize) -> Self;
    pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self;
}

impl<T: ?Sized> NonNull<T> {
    pub fn addr(self) -> NonZero<usize>;
    pub fn with_addr(self, addr: NonZero<usize>) -> Self;
    pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self;
}
```

I also did a pass over the docs to adjust them, because this is no longer an "experiment". The `ptr` docs now discuss the concept of provenance in general, and then they go into the two families of APIs for dealing with provenance: Strict Provenance and Exposed Provenance. I removed the discussion of how pointers also have an associated "address space" -- that is not actually tracked in the pointer value, it is tracked in the type, so IMO it just distracts from the core point of provenance. I also adjusted the docs for `with_exposed_provenance` to make it clear that we cannot guarantee much about this function, it's all best-effort.

There are two unstable lints associated with the strict_provenance feature gate; I moved them to a new [strict_provenance_lints](https://github.com/rust-lang/rust/issues/130351) feature since I didn't want this PR to have an even bigger FCP. ;)

`@rust-lang/opsem` Would be great to get some feedback on the docs here. :)
Nominating for `@rust-lang/libs-api.`

Part of https://github.com/rust-lang/rust/issues/95228.

[FCP comment](https://github.com/rust-lang/rust/pull/130350#issuecomment-2395114536)
2024-10-21 18:11:19 +02:00
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
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
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
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
Khanh Duong Quoc
8b4a94f261
fix: private items are shown in completions for modules in fn body 2024-10-21 21:42:46 +09: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
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
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
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
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
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
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
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
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
Jalil David Salamé Messina
880d565df1
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
2024-10-20 18:31:29 +02:00
Chayim Refael Friedman
3bbf1b257f Update Cargo.lock 2024-10-20 18:50:05 +03:00
Matthias Krüger
0d4cf0521e
Rollup merge of #131961 - jieyouxu:dirty, r=Zalathar
compiletest: tidy up how `tidy` and `tidy` (html version) are disambiguated

Rename `has_tidy` -> `has_html_tidy` (`tidy` is also a bootstrap tool, but rustdoc uses a html tidy that has the same binary name). Follow-up to #131941.

Also apparently `runtest.rs` is short enough now, we can delete the `tidy` (bootstrap version) ignore for file length.
2024-10-20 16:54:11 +02:00
Matthias Krüger
2f77343eec
Rollup merge of #131926 - clubby789:configure-enable, r=Kobzol
Align boolean option descriptions in `configure.py`

Boolean options are currently printed as
```
Options
        --enable-debug  OR  --disable-debug enables debugging environment; does not affect optimization of bootstrapped code
        --enable-docs  OR  --disable-docs build standard library documentation
        --enable-compiler-docs  OR  --disable-compiler-docs build compiler documentation
        --enable-optimize-tests  OR  --disable-optimize-tests build tests with optimizations
        --enable-verbose-tests  OR  --disable-verbose-tests enable verbose output when running tests
        --enable-ccache  OR  --disable-ccache invoke gcc/clang via ccache to reuse object files between builds
        --enable-sccache  OR  --disable-sccache invoke gcc/clang via sccache to reuse object files between builds
        --enable-local-rust  OR  --disable-local-rust use an installed rustc rather than downloading a snapshot
        --local-rust-root=VAL          set prefix for local rust binary
        --enable-local-rebuild  OR  --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version
```
as of #131117

imo, this is a little difficult to skim. This PR changes this to align the `OR`s and push the description onto a newline:

```
Options
        --enable-debug                     OR --disable-debug
                enables debugging environment; does not affect optimization of bootstrapped code
        --enable-docs                      OR --disable-docs
                build standard library documentation
        --enable-compiler-docs             OR --disable-compiler-docs
                build compiler documentation
        --enable-optimize-tests            OR --disable-optimize-tests
                build tests with optimizations
        --enable-verbose-tests             OR --disable-verbose-tests
                enable verbose output when running tests
        --enable-ccache                    OR --disable-ccache
                invoke gcc/clang via ccache to reuse object files between builds
        --enable-sccache                   OR --disable-sccache
                invoke gcc/clang via sccache to reuse object files between builds
        --enable-local-rust                OR --disable-local-rust
                use an installed rustc rather than downloading a snapshot
        --local-rust-root=VAL          set prefix for local rust binary
        --enable-local-rebuild             OR --disable-local-rebuild
                assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version
    ```
2024-10-20 16:54:10 +02:00
Matthias Krüger
fb42a4581b
Rollup merge of #131647 - jieyouxu:unicode-table-generator, r=Mark-Simulacrum
Register `src/tools/unicode-table-generator` as a runnable tool

It seems like `src/tools/unicode-table-generator` is not currently managed by bootstrap. This PR wires it up with bootstrap as a runnable tool.

This tool seems to take two possible args:

1. (Mandatory) path to `library/core/src/unicode/unicode_data.rs`, and
2. (Optional) path to generate a test file.

I only passed the mandatory path to `unicode_data.rs` in bootstrap and didn't do anything about (2). I'm not sure about how this tool is supposed to be run.

`Cargo.lock` is modified because I renamed `unicode-table-generator`'s bin name to match the tool name, as bootstrap's tool running logic expects the bin name to be derived from the tool name.

I also added a triagebot message to remind to not manually edit the library source file and edit the tool then regenerate instead, but this should probably be a tidy check (if that's desirable then that can be in a follow-up PR, though may be overkill).

Helps with #131640 but does not close it because still no docs.

r? `@Mark-Simulacrum` (since I think you authored this tool?)
2024-10-20 16:54:09 +02:00
Matthias Krüger
17ac4c8fb5
Rollup merge of #131365 - heiseish:fix-issue-101993, r=Mark-Simulacrum
Fix missing rustfmt in msi installer #101993

# Context
- Fixed missing `rustfmt`, `clippy`, `miri` and `rust-analyzer` in msi installer
- Fixed missing `rustfmt` for apple darwin installer
- Closes #101993

r​? `@jyn514`
- Please let me know if I should request from someone else instead. I divided the changes into 3 separate commits for the ease of review. The refactoring commit `fbdfd5c03c3c979bcf105ccdd05ff4ab9f37a763` is a bit more involved, but I think it helps in the long term for readability and to avoid bugs.
- I changed `build-manifest` to `build_manifest` in order to invoke it as a library. Not sure if this is gonna break any upstream processes. I checked `generate-manifest-list` and `generate-release` but didn't find any obvious reference
- Will push fixes for linting later
2024-10-20 16:54:09 +02:00
Matthias Krüger
7b714d4735
Rollup merge of #121560 - Noratrieb:stop-lint-macro-nonsense, r=jieyouxu
Allow `#[deny]` inside `#[forbid]` as a no-op

Forbid cannot be overriden. When someome tries to do this anyways, it results in a hard error. That makes sense.

Except it doesn't, because macros. Macros may reasonably use `#[deny]` (or `#[warn]` for an allow-by-default lint) in their expansion to assert that their expanded code follows the lint. This is doesn't work when the output gets expanded into a `forbid()` context. This is pretty silly, since both the macros and the code agree on the lint!

By making it a warning instead, we remove the problem with the macro, which is now nothing as warnings are suppressed in macro expanded code, while still telling users that something is up.

fixes #121483
2024-10-20 16:54:08 +02:00
Michael Goulet
6f6f91ab82 Rip out old effects var handling code from traits 2024-10-20 13:40:22 +00:00
Ralf Jung
de3cbf3c56 make unsupported_calling_conventions a hard error 2024-10-20 15:22:21 +02:00
roife
1b90ae4892 fix: do not emit unsafe diagnositcs for safe statics in extern blocks 2024-10-20 19:49:57 +08:00
lucarlig
bc9fc714fb add TestFloatParse to tools for bootstrap 2024-10-20 12:39:24 +01:00
The 8472
a269e4da72 run git commands in bootstrap in parallel
this saves about 150ms on many ./x invocations
2024-10-20 13:36:21 +02:00
Andrew Zhogin
37dc4ec8d6
Limited -Zregparm support (no Rust calling conv) descriptions
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-10-20 18:18:01 +07:00
roife
ccfc8e2063 feat: initial support for safe_kw in extern blocks 2024-10-20 17:12:52 +08:00
Noratrieb
4348383a0f Update rustc-hash to version 2
This brings in the new algorithm.
2024-10-20 00:12:49 -07:00
许杰友 Jieyou Xu (Joe)
e32a5be3b0 compiletest: disambiguate between tidy and tidy (html version) 2024-10-20 14:30:52 +08:00
bors
bfab34af4c Auto merge of #131957 - GuillaumeGomez:rm-unused, r=notriddle
Remove unused `recoverable` argument in collect_intra_doc_links

r? `@notriddle`
2024-10-20 05:58:20 +00:00
Stuart Cook
456821be88
Rollup merge of #131945 - aDotInTheVoid:footnote-time, r=notriddle
rustdoc: Clean up footnote handling

Best reviewed commit by commit.

Extracts footnote handling logic into it's own file (first commit) and then makes that file slightly nicer to read/understand.

No functional changes, but lays the groundwork for making more changes to footnotes (eg #131901, #131946)
2024-10-20 14:06:05 +11:00
Stuart Cook
63fccf0c2f
Rollup merge of #131942 - workingjubilee:reduce-haruspicy, r=lukas-code,lnicola
compiler: Adopt rust-analyzer impls for `LayoutCalculatorError`

We're about to massively churn the internals of `rustc_abi`. To minimize the immediate and future impact on rust-analyzer, as a subtree that depends on this crate, grow some API on `LayoutCalculatorError` that reflects their uses of it. This way we can nest the type in theirs, and they can just call functions on it without having to inspect and flatten-out its innards.
2024-10-20 14:06:04 +11:00
Stuart Cook
28a5ef9175
Rollup merge of #131941 - lolbinarycat:compiletest-need-html-tidy, r=clubby789
compiletest: disambiguate html-tidy from rust tidy tool

when i first saw this error message i was very confused, i thought it was talking about `src/tools/tidy`.  now it should be much more clear what tool should be installed.
2024-10-20 14:06:03 +11:00