Commit Graph

255337 Commits

Author SHA1 Message Date
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
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
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
Strophox
983fb093ff start implementing MiriAllocBytes
attempt changing Bytes in MiriMachine to MiriAllocBytes

rename miri_alloc_bytes to alloc_bytes

generalize impl VisitProvenance for Allocation for any Bytes: AllocBytes

mend MiriAllocBytes -> Self::Bytes

fix Invariant documentation and bugs (drop), impl Clone

Update MiriAllocBytes description

Co-authored-by: Ralf Jung <post@ralfj.de>

Rephrase MiriAllocBytes ptr invariant

Co-authored-by: Ralf Jung <post@ralfj.de>

Update MiriAllocBytes ptr documentation

Co-authored-by: Ralf Jung <post@ralfj.de>

fix safety comment in MiriAllocBytes::clone

fix safety comment in MiriAllocBytes::from_bytes

try implementing clone without unsafe

remove derive(PartialEq,Eq,Hash), fix fmt

move ptr.is_null() check inside only necessary branch

use std::ptr::without_provenance_mut, requiring feature(strict_provenance)

align.bytes_usize() instead of align.bytes().try_into().unwrap()

Update src/provenance_gc.rs

Co-authored-by: Ralf Jung <post@ralfj.de>

fix clippy error on deref
2024-05-16 16:04:20 +02:00
Michael Goulet
d3e510eb9d Don't ICE because recomputing overflow goals during find_best_leaf_obligation causes inference side-effects 2024-05-16 10:00:11 -04:00
Michael Goulet
312ba4da3c Uplift FnSig 2024-05-16 09:52:01 -04:00
cardigan1008
c811acb1f3 feat: add unit test 2024-05-16 21:10:07 +08:00
Alona Enraght-Moony
504bca9ee6 rustdoc-json-types: Document Id 2024-05-16 12:52:46 +00:00
bors
4a78c00e22 Auto merge of #124959 - prorealize:update-result-documentation, r=joboet
Refactor examples and enhance documentation in result.rs

- Replaced `map` with `map_err` in the error handling example for correctness
- Reordered example code to improve readability and logical flow
- Added assertions to examples to demonstrate expected outcomes
2024-05-16 12:21:12 +00:00
bors
bf8801d36d Auto merge of #123337 - workingjubilee:debug-compiler-profile-expectations, r=fmease
Include line tables in compiler profile

This profile has only undergone minimal tweaks since it was originally drafted. I asked a number of compiler contributors and they said they set rust.debug explicitly. This was even true for one contributor that set `rust.debug = false`! Almost everyone seems slightly surprised that `rust.debug = true` is not the default.

However, adding full debuginfo at this level costs multiple gigabytes! We can still get much better profiling and such by setting `rust.debuginfo-level = "line-tables-only"` at the cost of only 150~200 MB on the weight of a fresh build dir from `./x.py check`.
2024-05-16 10:14:49 +00:00
bors
7e5b9e215d Auto merge of #3606 - RalfJung:rustup, r=RalfJung
Rustup, aligned heap-allocations on wasm

Pulls in https://github.com/rust-lang/rust/pull/125003 so allocation tests should now work on wasm.
2024-05-16 09:27:33 +00:00
Ralf Jung
6d314f3b11 alloc now works on wasi (and some formatting) 2024-05-16 11:25:44 +02:00
Trevor Gross
488ddd3bbc 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 04:07:02 -05:00
Ralf Jung
0334bf8520 Merge from rustc 2024-05-16 10:40:15 +02:00
Ralf Jung
b1b278b17b Preparing for merge from rustc 2024-05-16 10:40:05 +02:00
Scott McMurray
facc0bb78e Rename flatten(_mut)as_flattened(_mut) 2024-05-15 23:39:33 -07:00
bors
57062170c5 Auto merge of #17243 - Veykril:static-lt-hir, r=Veykril
internal: Add StaticLifetime to hir API
2024-05-16 06:04:52 +00:00
Lukas Wirth
b7e194ed82 internal: Add StaticLifetime to hir API 2024-05-16 08:02:51 +02:00
Jubilee Young
887151ad93 Set debuginfo-level = "line-tables-only" for compiler profile
This profile has only undergone minimal tweaks since it was originally
drafted. I asked a number of compiler contributors and they said they
set rust.debug explicitly. This was even true for one contributor that
set `rust.debug` = false! Almost everyone seems slightly surprised that
`rust.debug = true` is not the default.

However, adding full debuginfo at this level costs multiple gigabytes!
We can still get much better debuginfo by setting "line-tables-only"
at the cost of only 150~200 MB.
2024-05-15 17:38:22 -07:00
bors
b71e8cbaf2 Auto merge of #124987 - workingjubilee:macro-metavar-expr-with-a-shorter-len, r=c410-f3r,joshtriplett,joshtriplett
Rename `${length()}` to `${len()}`

Implements the rename suggested in https://github.com/rust-lang/rust/pull/122808#issuecomment-2047722187
> I brought this up in the doc PR but it belongs here – `length` should probably be renamed `len` before stabilization. The latter is de facto standard in the standard library, whereas the former is only used in a single unstable API. These metafunctions aren’t library items of course, but should presumably still be consistent with established names.

r? `@c410-f3r`
2024-05-16 00:26:20 +00:00
bors
1871252fc8 Auto merge of #125164 - fmease:rollup-s5vwzlg, r=fmease
Rollup of 5 pull requests

Successful merges:

 - #125003 (avoid using aligned_alloc; posix_memalign is better-behaved)
 - #125142 (Migrate `run-make/rustdoc-themes` to new rmake.rs)
 - #125146 (Migrate `run-make/panic-impl-transitive` to `rmake`)
 - #125154 (Small improvements to the documentaion of FnAbi )
 - #125159 (Meta: Allow unauthenticated users to modify `L-*`, `PG-*` and `-Z*` labels)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-15 21:46:12 +00:00
León Orell Valerian Liehr
734a109998
Rollup merge of #125159 - fmease:allow-unauth-labels-l-pg-z, r=jieyouxu
Meta: Allow unauthenticated users to modify `L-*`, `PG-*` and `-Z*` labels

Complements: rust-lang/rust-forge#744.

1. `L-*`: Issues and PRs concerning specific lints
2. `PG-*`: Issues and PRs concerning specific project groups
3. `-Z*`: Issues and PRs concerning specific unstable `-Z` compiler options

These are safe to expose. Allows unauthenticated users greater leeway in triaging issues.
We have a lot of such people <3 and I want to support them as much as possible.

r? jieyouxu (you get assigned a lot these days :P) or compiler
2024-05-15 22:01:20 +02:00
León Orell Valerian Liehr
601e5d199f
Rollup merge of #125154 - FractalFir:fnabi_doc, r=compiler-errors
Small improvements to the documentaion of FnAbi

I have updated the documentation of  `FnAbi`.

The `arg` and `ret` fields are no longer LLVM types, but Rust types(`ArgAbi` contains a `TyAndLayout` and a `PassMode`), so I changed the documentation to reflect that.

Besides that, I also added documentation to other fields, and added a clarification about the differences between `FnAbi` and `FnSig`, since this is not something that is immediately obvious.
2024-05-15 22:01:20 +02:00