Commit Graph

254970 Commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
d7498c2dbf
Rollup merge of #125215 - Oneirical:easy-test-the-second, r=jieyouxu
Migrate `run-make/issue64319` to `rmake` and rename

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

~~I noticed that the Makefile was not listed in `allowed-run-makefiles` in Tidy. Does this mean the test was being ignored?~~ EDIT: No, it was there, just not in its expected alphabetical order.

EDIT2: Perhaps it could be interesting to clean this test visually by looping over the `rustc` calls, like in #125227.
2024-05-18 00:49:17 +01:00
许杰友 Jieyou Xu (Joe)
cb90c0a1d3
Rollup merge of #125213 - Oneirical:easy-test, r=jieyouxu
Migrate `run-make/static-unwinding` to `rmake`

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

An easy one after the last one, though the explanatory comment could use some clarification.
2024-05-18 00:49:17 +01:00
bors
1a73979886 Auto merge of #125153 - compiler-errors:opt-poly, r=lcnr
`to_opt_poly_X_pred` -> `as_X_clause`

r? lcnr
2024-05-17 18:23:47 +00:00
Michael Goulet
2025e44ef8 to_opt_poly_X_pred -> as_X_clause 2024-05-17 12:58:33 -04:00
bors
c7716d5431 Auto merge of #125216 - BoxyUwU:boxy_compiler_rereviews, r=joboet
add boxy to compiler reviews
2024-05-17 16:14:41 +00:00
Julien
184be49a1e
Update allowed_run_make_makefiles.txt 2024-05-17 12:07:55 -04:00
Boxy
cf3414a5c1 add boxy to compiler reviews 2024-05-17 17:06:03 +01:00
Oneirical
14a031fdf6 rewrite issue64319 and rename 2024-05-17 11:49:20 -04:00
Oneirical
760b505c9a Rewrite static-unwinding as rmake.rs 2024-05-17 11:06:21 -04:00
bors
550d1b4fb6 Auto merge of #125207 - GuillaumeGomez:migrate-rustdoc-scrape-examples-ordering, r=jieyouxu
Migrate `run-make/rustdoc-scrape-examples-remap` to `rmake.rs`

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

r? `@jieyouxu`
2024-05-17 14:06:26 +00:00
Guillaume Gomez
272fc89a1c Use common scrape.rs file 2024-05-17 14:04:22 +02:00
Guillaume Gomez
e509c24fbf Migrate run-make/rustdoc-scrape-examples-remap to rmake.rs 2024-05-17 14:04:22 +02:00
bors
ddba1dc97e Auto merge of #125188 - tgross35:f16-f128-powi, r=Nilstrieb
Add `powi` fo `f16` and `f128`

This will unblock adding support to compiler_builtins (<https://github.com/rust-lang/compiler-builtins/pull/614>), which will then unblock adding tests for these new functions.
2024-05-17 11:24:07 +00:00
bors
a5c37eea5a Auto merge of #125178 - GuillaumeGomez:migrate-rustdoc-with-out-dir, r=jieyouxu
Migrate `run-make/rustdoc-with-out-dir-option` to new `rmake.rs`

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

r? `@jieyouxu`
2024-05-17 08:51:06 +00:00
bors
1189851eeb Auto merge of #125203 - matthiaskrgr:rollup-5pv7drz, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #123694 (expand: fix minor diagnostics bug)
 - #125171 (Rename `flatten(_mut)` → `as_flattened(_mut)`)
 - #125181 (set `rust.channel` properly in source tarballs)
 - #125186 (Remove duplicate word from addr docs)
 - #125191 (Report better WF obligation leaf obligations in new solver)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-17 06:40:23 +00:00
Matthias Krüger
3695449a89
Rollup merge of #125191 - compiler-errors:wf, r=lcnr
Report better WF obligation leaf obligations in new solver

r? lcnr
2024-05-17 07:20:59 +02:00
Matthias Krüger
a6862f8612
Rollup merge of #125186 - Colepng:master, r=lqd
Remove duplicate word from addr docs

This PR simply removes a duplicate word from the addr docs for *mut T.
2024-05-17 07:20:58 +02:00
Matthias Krüger
52de70933a
Rollup merge of #125181 - onur-ozkan:set-rust-channel-properly, r=clubby789
set `rust.channel` properly in source tarballs

This change sets the appropriate channel by default when using nightly, beta or stable source tarballs.

Fixes #124618
2024-05-17 07:20:58 +02:00
Matthias Krüger
7a8d222d6b
Rollup merge of #125171 - scottmcm:rename-flatten, r=jhpratt
Rename `flatten(_mut)` → `as_flattened(_mut)`

As requested by libs-api in https://github.com/rust-lang/rust/issues/95629#issuecomment-2113081194

(This is just the rename, not the stabilization, so can land without waiting on the FCP in that other issue.)
2024-05-17 07:20:57 +02:00
Matthias Krüger
e62688eb96
Rollup merge of #123694 - Xiretza:expand-diagnostics, r=compiler-errors
expand: fix minor diagnostics bug

The error mentions `///`, when it's actually `//!`:

```
error[E0658]: attributes on expressions are experimental
 --> test.rs:4:9
  |
4 |         //! wah
  |         ^^^^^^^
  |
  = note: see issue https://github.com/rust-lang/rust/issues/15701 <https://github.com/rust-lang/rust/issues/15701> for more information
  = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
  = help: `///` is for documentation comments. For a plain comment, use `//`.
```
2024-05-17 07:20:56 +02:00
bors
8af67ba01a Auto merge of #124129 - lqd:enable-lld, r=Mark-Simulacrum
Enable `rust-lld` on nightly `x86_64-unknown-linux-gnu`

We believe we have done virtually all the internal work and tests we could to prepare for using `lld` as the default linker (at least on Linux). We're IMHO at a point where we'd need to expand testing and coverage in order to make progress on this effort.

Therefore, for further testing and gathering real-world feedback, unexpected issues and use-cases, this PR enables `rust-lld` as the default linker:
- on nightly only (and dev channel)
- on `x86_64-unknown-linux-gnu` only
- when not using an external LLVM (except `download-ci-llvm`), so that distros are not impacted

as described in more detail in this [zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Enabling.20.60rust-lld.60.20on.20nightly.20.60x86_64-unknown-linux-gnu.60/near/433709343).

In case any issues happen to users, as e.g. lld is not bug-for-bug compatible with GNU ld, it's easy to disable with `-Zlinker-features=-lld` to revert to using the system's default linker.

---

I don't know who should review this kind of things, as it's somewhat of a crosscutting effort. Compiler contributor, compiler performance WG and infra member sounds perfect, so r? `@Mark-Simulacrum.`

The last crater run encountered a low number (44) of mainly avoidable issues, like small incompatibilities, user errors, and a difference between the two linkers about which default to use with `--gc-sections`. [Here's the triage report](https://hackmd.io/OAJxlxc6Te6YUot9ftYSKQ?view), categorizing the issues, with some analyses and workarounds. I'd appreciate another set of eyes looking at these results.

The changes in this PR have been test-driven for CI changes, try builds with tests enabled, rustc-perf with bootstrapping, in PR #113382.

For infra, about the CI change: this PR forces `rust.lld` to false on vanilla LLVM builders, just to make sure we have coverage without `rust-lld`. Though to be clear, just using an external LLVM is already enough to keep `rust.lld` to false, in turn reverting everything to using the system's default linker.

cc `@rust-lang/bootstrap` for the bootstrap and config change
cc `@petrochenkov` for the small compiler change
cc `@rust-lang/wg-compiler-performance`

The blog post announcing the change, that we expect to merge around the same time as we merge this PR, is open [on the blog repo](https://github.com/rust-lang/blog.rust-lang.org/pull/1319).

Bootstrap change history: this PR changes the default of a config option on `x86_64-unknown-linux-gnu`. It's, however, not expected to cause issues, or require any changes to existing configurations. It's a big enough change that people should at least know about it, in case it causes unexpected problems. If that happens, set `rust.lld = false` in your `config.toml` (and open an issue).
2024-05-17 02:12:10 +00:00
Michael Goulet
119c7bbef7 Report better WF obligation leaf obligations in new solver 2024-05-16 21:08:42 -04:00
bors
fa37db51ac Auto merge of #125150 - compiler-errors:uplift-goal, r=lcnr
Uplift `Goal` to `rustc_type_ir`

r? lcnr

This also renames `ToPredicate` to `Uplift`, which is conceptually a helper trait for `Into`-like operations for things that need a `TyCtxt`. This name is based off of the same named trait from a-mir-formality.
2024-05-17 00:04:38 +00:00
Guillaume Gomez
61d4f5c53b Fix htmldocck function 2024-05-17 00:50:11 +02:00
Guillaume Gomez
d594c9ceea Add missing assert! calls 2024-05-17 00:47:18 +02:00
Guillaume Gomez
8124a5e74d Migrate run-make/rustdoc-with-out-dir-option to new rmake.rs 2024-05-17 00:46:21 +02:00
bors
8c127df75f Auto merge of #125163 - ssukanmi:stdarch_arm_crc32, r=Amanieu
feat: update stdarch submodule for intrinsics on ARM

Submodule update for stdarch library
10 commits in c0257c1660e78c80ad1b9136fcc5555b14da5b4c..df3618d9f35165f4bc548114e511c49c29e1fd9b
2024-04-22 01:24:03 +0200 to 2024-05-14 15:52:07 +0200
- feat: stabilization for stdarch_aarch64_crc32
- Add vec_insert and vec_extract
- Remove libc dependency on Windows by using Win32 to get env vars
- Add vec_orc
- Simplify vec_andc implementation
- Silence unexpected-cfgs
- Add vec_mul
- Remove `#![feature(inline_const)]`
- Add `#[cfg_attr(miri, ignore)]` to tests of intrinsics that cannot be supported by Miri
- Implement ARM `__ssat` and `__usat` functions

r? Amanieu
2024-05-16 21:17:35 +00:00
Trevor Gross
7685734384 Add powi to f16 and f128
This will unblock adding support to compiler_builtins
(<https://github.com/rust-lang/compiler-builtins/pull/614>), which will
then unblock adding tests for these new functions.
2024-05-16 15:41:06 -05:00
Trevor Gross
a7ca099e03 Add doctests for f16 and f128 library functions where possible 2024-05-16 15:16:42 -05:00
Cole Kauder-McMurrich
d8b9717038
Remove duplicate word from addr docs 2024-05-16 16:16:38 -04:00
Michael Goulet
7b3d6dad20 Remove trivial Binder::dummy calls 2024-05-16 14:24:23 -04:00
Michael Goulet
6d817365e5 Fix tools 2024-05-16 14:24:23 -04:00
Michael Goulet
138881b315 Uplift Goal to rustc_type_ir 2024-05-16 14:24:22 -04:00
Michael Goulet
2684655602 Make impls UpcastFrom, implement Upcast for UpcastFrom 2024-05-16 14:23:47 -04:00
Michael Goulet
412dc28d6a Make P parameter explicit 2024-05-16 14:23:47 -04:00
Michael Goulet
11ec3eca74 Rename ToPredicate for Upcast 2024-05-16 14:23:47 -04:00
bors
2d89cee625 Auto merge of #124728 - beetrees:from-f16-for-f64, r=BurntSushi
Re-add `From<f16> for f64`

This impl was originally added in #122470 before being removed in #123830 due to #123831. However, the issue only affects `f32` (which currently only has one `From<{float}>` impl, `From<f32>`) as `f64` already has two `From<{float}>` impls (`From<f32>` and `From<f64>`) and is also the float literal fallback type anyway. Therefore it is safe to re-add `From<f16> for f64`.

This PR also updates the FIXME link to point to the open issue #123831 rather than the closed issue #123824.

Tracking issue: #116909

`@rustbot` label +F-f16_and_f128 +T-libs-api
2024-05-16 16:48:58 +00:00
Rémy Rakic
3a90967425 add bootstrap config change info about rust.lld
the default value changes on `x86_64-unknown-linux-gnu`, and semantics kinda
as it will impact the target's default linker
2024-05-16 16:09:17 +00:00
Rémy Rakic
4d280de47c test rust-lld is on by default on the x64 linux target 2024-05-16 16:08:07 +00:00
Rémy Rakic
514765b405 describe new default value for rust.lld in config template 2024-05-16 16:08:06 +00:00
Rémy Rakic
7695e5aeb4 enable rust-lld on x86_64-unknown-linux-gnu when requested
the `rust.lld` config enables rustc's `CFG_USE_SELF_CONTAINED_LINKER` env var, and we:
- set the linker-flavor to use lld
- enable the self-contained linker

this makes the target use the rust-lld linker by default
2024-05-16 16:08:06 +00:00
Rémy Rakic
5f04f6d7e1 bootstrap: enable rust-lld when necessary for x86_64-unknown-linux-gnu
`x86_64-unknown-linux-gnu` has switched to using the self-contained linker
by default (unless asked not to), so we have to build rust-lld:
- when we build our own llvm
- when we use download-ci-llvm
- otherwise, when using an external llvm we can't enable it
2024-05-16 16:08:06 +00:00
Rémy Rakic
28ce76eba4 bootstrap: introduce rust-lld env var for rustc
This is used to notify we want to use rust-lld as the default linker in
a target.
2024-05-16 16:08:06 +00:00
onur-ozkan
e9c827379d set rust.channel properly in source tarballs
This change sets the appropriate channel by default when using nightly,
beta or stable source tarballs.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-05-16 18:38:49 +03:00
bors
97bf25c8cf Auto merge of #125179 - matthiaskrgr:rollup-wkdwoaj, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #124871 (Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects)
 - #125018 (Update linker-plugin-lto.md to include LLVM 18)
 - #125130 (rustdoc-json-types: Document `Id`)
 - #125170 (Uplift `FnSig` into `rustc_type_ir` (redux))
 - #125172 (Fix assertion when attempting to convert `f16` and `f128` with `as`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-16 14:32:49 +00:00
Matthias Krüger
e3864db418
Rollup merge of #125172 - tgross35:f16-f128-as-casting, r=compiler-errors
Fix assertion when attempting to convert `f16` and `f128` with `as`

These types are currently rejected for `as` casts by the compiler. Remove this incorrect check and add codegen tests for all conversions involving these types.
2024-05-16 16:22:46 +02:00
Matthias Krüger
a8a3117041
Rollup merge of #125170 - compiler-errors:uplift-fn-sig-2, r=lcnr
Uplift `FnSig` into `rustc_type_ir` (redux)

Since the last one got so messed up with `try` build.

https://github.com/rust-lang/rust/pull/125157#issuecomment-2113158408

r? lcnr
2024-05-16 16:22:46 +02:00
Matthias Krüger
1f055cdb6e
Rollup merge of #125130 - aDotInTheVoid:id-docs, r=GuillaumeGomez
rustdoc-json-types: Document `Id`

Inspired by finding [someone looking into the internals of an id](https://github.com/rust-lang/rust/issues/91609#issuecomment-2110994540), I realized we only document the fact that these are opaque on [the rfc](https://rust-lang.github.io/rfcs/2963-rustdoc-json.html#id).

r? `@GuillaumeGomez`
2024-05-16 16:22:45 +02:00
Matthias Krüger
48f1019d26
Rollup merge of #125018 - sagudev:patch-2, r=Amanieu
Update linker-plugin-lto.md to include LLVM 18

I did this manually not via provided script.
2024-05-16 16:22:45 +02:00
Matthias Krüger
71ae7db509
Rollup merge of #124871 - compiler-errors:overflowo, r=lcnr
Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects

See the comments for more info. Reprocessing overflowed obligations may cause *other* goals to go from ambig -> pass/fail, causing an ICE. This suppresses that error, but makes all the overflow obligations messages back to their root obl. That kinda sucks, but 🤷

Fixes #124834
Fixes #124845

r? lcnr
2024-05-16 16:22:44 +02:00