Commit Graph

255554 Commits

Author SHA1 Message Date
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
Adam Szkoda
9099862687
Correct Neovim 0.10 inlay hints config example 2024-05-17 12:42:17 +02:00
Dion Dokter
5c301429bd Only test std, alloc and core 2024-05-17 12:03:02 +02:00
Dion Dokter
b964b00668 Run tests with the flag enabled 2024-05-17 11:48:50 +02: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
bors
fffc8e9b43 Auto merge of #3526 - Strophox:miri-memory, r=RalfJung
Adjust Allocation Bytes used by Miri to custom MiriAllocBytes

Previously, the `MiriMachine` used `type Bytes = Box<[u8]>` for its allocations.
This PR swaps this out for a custom `MiriAllocBytes` type implemented in `alloc_bytes.rs`.
This is in anticipation of an extension to Miri's FFI, which will require its allocations to take care of alignment (the methods in `impl AllocBytes for Box<[u8]>` ignore this `_align: Align` argument).

Needs https://github.com/rust-lang/rust/pull/124492
2024-05-17 06:19:50 +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
Zachary S
c895f6e958 Access alloc field directly in Arc/Rc::into_raw_with_allocator.
... since fn allocator doesn't exist yet.
2024-05-16 21:09:05 -05: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
680256f3ce Auto merge of #12813 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: None
2024-05-16 21:28:33 +00:00
Philipp Krones
9f6280b1e7
Bump nightly version -> 2024-05-16 2024-05-16 14:21:11 -07:00
Philipp Krones
c200dad300
Merge remote-tracking branch 'upstream/master' into rustup 2024-05-16 14:20:56 -07: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
bors
5459429f92 Auto merge of #12803 - wutchzone:panic-in-tests, r=y21
Add configuration option for ignoring `panic!()` in tests

```
changelog: [`panic`]: Now can be disabled in tests with the `allow-panic-in-tests` option
```

I often find myself using `panic!(…)` in tests a lot, where I often do something like:

```rust
match enam {
  Enam::A => …,
  Enam::B => …,
  _ => panic!("This should not happen at all."),
}
```
I think this patch should go nicely with already existing `allow-unwrap-in-tests` and `allow-expect-in-tests`.
2024-05-16 21:13:34 +00:00
bors
6c8ff3f894 Auto merge of #12812 - Alexendoo:driver-integration, r=flip1995
Manually set library paths in .github/driver.sh

Fixes https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Windows.20CI.20failing

Rustup 1.27.1 no longer adds `[SYSROOT]/bin` to `PATH` by default - https://github.com/rust-lang/rustup/issues/3825. This is fine for the packaged binaries since windows loads `dll`s from the folder the executable is in, but our built one is in a different folder

There's an environment variable to get the old behaviour back, but as it's deprecated and not much code I think returning to setting it manually is fine

changelog: none
2024-05-16 20:54:33 +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
Alex Macleod
821dc871af Manually set library paths in .github/driver.sh 2024-05-16 21:11:58 +01:00
Urgau
05f77d1b79 Update unexpected_cfgs lint for Cargo new check-cfg config 2024-05-16 20:58:22 +02: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
Scott McMurray
f60f2e8cb0 Fix ICE in non-operand aggregate_raw_ptr instrinsic codegen 2024-05-16 09:43:42 -07: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