Commit Graph

254991 Commits

Author SHA1 Message Date
Ralf Jung
dde1134c6d android: use posix_memalign for aligned allocations 2024-05-18 12:49:01 +02:00
bors
36c0a6d40f Auto merge of #125105 - nnethercote:rustc_resolve-cleanups, r=estebank
`rustc_resolve` cleanups

Some improvements I found while looking through this code.

r? `@estebank`
2024-05-18 06:36:44 +00:00
bors
7b06810691 Auto merge of #125237 - weihanglo:update-cargo, r=weihanglo
Update cargo

6 commits in 4de0094ac78743d2c8ff682489e35c8a7cafe8e4..0de7f2ec6c39d68022e6b97a39559d2f4dbf3930
2024-05-09 16:09:22 +0000 to 2024-05-17 16:54:54 +0000
- Add special `check-cfg` lint config for the `unexpected_cfgs` lint (rust-lang/cargo#13913)
- refactor: more comments and variable rename (rust-lang/cargo#13924)
- test: set safe.directory for git repo in apache container (rust-lang/cargo#13920)
- refactor: misc refactors for `ops::resolve` (rust-lang/cargo#13917)
- Preserve file permissions on unix during `write_atomic` (rust-lang/cargo#13898)
- Update benchmark formatting for new nightly (rust-lang/cargo#13901)

r? ghost
2024-05-18 04:25:19 +00:00
Weihang Lo
ad115a5397
Update cargo 2024-05-17 23:56:00 -04:00
bors
94be5ab448 Auto merge of #125232 - coolreader18:inline-duration-new, r=jhpratt
Inline Duration construction into `Duration::from_{secs,millis,micros,nanos}`

The millis/micros/nanos cases I don't feel as strongly about, but I see no reason why `Duration::from_secs` should call into `Duration::new` - that's just creating unnecessary work for the inlining and DCE passes.
2024-05-18 02:13:28 +00:00
bors
8e78d16804 Auto merge of #125233 - jieyouxu:rollup-76hk8qu, r=jieyouxu
Rollup of 3 pull requests

Successful merges:

 - #125213 (Migrate `run-make/static-unwinding` to `rmake`)
 - #125215 (Migrate `run-make/issue64319` to `rmake` and rename)
 - #125221 (Migrate `run-make/issue-28766` to `rmake`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-18 00:04:01 +00:00
许杰友 Jieyou Xu (Joe)
650bbb5a77
Rollup merge of #125221 - Oneirical:fourth, r=jieyouxu
Migrate `run-make/issue-28766` 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).
2024-05-18 00:49:18 +01:00
许杰友 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
Noa
53b317710d
Inline Duration construction into Duration::from_{millis,micros,nanos} 2024-05-17 18:37:59 -05:00
bors
9b75a43881 Auto merge of #123865 - eholk:expr_2021, r=fmease
Update `expr` matcher for Edition 2024 and add `expr_2021` nonterminal

This commit adds a new nonterminal `expr_2021` in macro patterns, and `expr_fragment_specifier_2024` feature flag.

This change also updates `expr` so that on Edition 2024 it will also match `const { ... }` blocks, while `expr_2021` preserves the current behavior of `expr`, matching expressions without `const` blocks.

Joint work with `@vincenzopalazzo.`

Issue #123742
2024-05-17 21:54:14 +00:00
Noa
35522a9e09
Don't call Duration::new unnecessarily in Duration::from_secs 2024-05-17 14:26:50 -05:00
Eric Holk
3986ea0ea5
Update compiler/rustc_parse/src/parser/nonterminal.rs
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2024-05-17 11:55:38 -07:00
Oneirical
e9edced096 rewrite and rename issue-28766 2024-05-17 14:44:21 -04: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