Commit graph

253226 commits

Author SHA1 Message Date
Ralf Jung 8d5c47f17f miri libstd tests: test windows-msvc instead of windows-gnu 2024-04-22 19:50:09 +02:00
bors 7f2fc33da6 Auto merge of #115120 - icedrocket:ignore-strip-on-msvc, r=michaelwoerister
Ignore `-C strip` on MSVC

tl;dr - Define `-Cstrip` to only ever affect the binary; no other build artifacts.

This is necessary to improve cross-platform behavior consistency: if someone wanted debug information to be contained only in separate files on all platforms, they would set `-Cstrip=symbols` and `-Csplit-debuginfo=packed`, but this would result in no PDB files on MSVC.

Resolves #114215
2024-04-22 12:05:39 +00:00
bors 290d792411 Auto merge of #124250 - matthiaskrgr:rollup-b8tqsup, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #124240 (add a couple tests for fixed ICEs.)
 - #124245 (bootstrap: Promote some build_steps comments to docs)
 - #124246 (Add comma at one place in `abs()` documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-22 10:01:27 +00:00
Matthias Krüger c597ccf3f1
Rollup merge of #124246 - gurry:add-comma-in-abs-doc, r=jhpratt
Add comma at one place in `abs()` documentation

As suggested  by ``@RalfJung`` here: https://github.com/rust-lang/rust/pull/124184#discussion_r1573670533
2024-04-22 10:02:56 +02:00
Matthias Krüger e4e660ef5d
Rollup merge of #124245 - workingjubilee:bootstrap-some-doc-comments, r=onur-ozkan
bootstrap: Promote some build_steps comments to docs

No new content, just makes some comments readable when viewing the docs with `--document-private-items`.
2024-04-22 10:02:55 +02:00
Matthias Krüger 3cd56f3bda
Rollup merge of #124240 - matthiaskrgr:tests_sunday, r=compiler-errors
add a couple tests for fixed ICEs.

Fixes https://github.com/rust-lang/rust/issues/121413
Fixes https://github.com/rust-lang/rust/issues/121463
Fixes https://github.com/rust-lang/rust/issues/114463
2024-04-22 10:02:55 +02:00
bors b3e117044c Auto merge of #124236 - matthiaskrgr:n-ice, r=jieyouxu
crashes: add a couple more ICE tests
2024-04-22 07:57:04 +00:00
bors 32885838c0 Auto merge of #124112 - beetrees:incremental-os-str, r=Nadrieril
Fix ICE when there is a non-Unicode entry in the incremental crate directory

Fix the ICE that occurs when there is a non-Unicode entry in the incremental crate directory by replacing uses of `to_string_lossy` + `assert_no_characters_lost` with `to_str`. The added test would cause the compiler to ICE before this PR.
2024-04-22 04:00:58 +00:00
Gurinder Singh f31e4aef0b Add comma at one place in abs() documentation 2024-04-22 08:16:47 +05:30
bors eb70af2e03 Auto merge of #124244 - saethlin:stdarch, r=workingjubilee
Update stdarch submodule

Most importantly, this pulls in https://github.com/rust-lang/stdarch/pull/1567 which is part of https://github.com/rust-lang/rust/pull/124050
2024-04-22 01:56:40 +00:00
Jubilee Young 9470e05550 bootstrap: Promote some build_steps comments to docs 2024-04-21 18:55:53 -07:00
Ben Kimock 9989d009c4 Update stdarch submodule 2024-04-21 21:35:17 -04:00
bors fb898629a2 Auto merge of #124241 - matthiaskrgr:rollup-xhu90xr, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #123840 (Add an intrinsic for `ptr::from_raw_parts(_mut)`)
 - #124224 (cleanup: unnecessary clone during lower generics args)
 - #124229 (Add gnullvm targets to manifest)
 - #124231 (remove from reviewers)
 - #124235 (Move some tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-21 21:08:03 +00:00
Matthias Krüger a42adf2f95 add test for ICE caused by using feature(generic_const_exprs) #114463
Fixes #114463
2024-04-21 22:00:38 +02:00
Matthias Krüger 751f662b70 add test for ice #121463
Fixes #121463
2024-04-21 22:00:38 +02:00
Matthias Krüger 28f60ff9a4 add test for #121413
Fixes #121413
2024-04-21 22:00:38 +02:00
Matthias Krüger 3315bf961d
Rollup merge of #124235 - c410-f3r:tests98765, r=jieyouxu
Move some tests

r? `@petrochenkov`
2024-04-21 21:56:34 +02:00
Matthias Krüger f277f3d653
Rollup merge of #124231 - BoxyUwU:dereview, r=Mark-Simulacrum
remove from reviewers

not gonna be around for a few weeks
2024-04-21 21:56:33 +02:00
Matthias Krüger e96ed6d35d
Rollup merge of #124229 - mati865:add-gnullvm-targets-to-manifest, r=Mark-Simulacrum
Add gnullvm targets to manifest

Fixes an oversight from https://github.com/rust-lang/rust/pull/121712
2024-04-21 21:56:33 +02:00
Matthias Krüger cd92422180
Rollup merge of #124224 - bvanjoi:cleanup, r=fmease
cleanup: unnecessary clone during lower generics args
2024-04-21 21:56:32 +02:00
Matthias Krüger 67872e740e
Rollup merge of #123840 - scottmcm:aggregate-kind-rawptr, r=cjgillot
Add an intrinsic for `ptr::from_raw_parts(_mut)`

Fixes #123174
cc `@CAD97` `@saethlin`
r? `@cjgillot`

As suggested in https://github.com/rust-lang/rust/pull/123190#issuecomment-2028717967, this adds a new `AggregateKind::RawPtr` for creating a pointer from its data pointer and its metadata.

That means that `slice::from_raw_parts` and friends no longer need to hard-code pointer layout into `libcore`, and because it no longer does union hacks the MIR is shorter and more amenable to optimizations.
2024-04-21 21:56:32 +02:00
bors 1b3fba066c Auto merge of #124203 - lukas-code:delete-deleting-caches, r=compiler-errors
fix normalizing in different `ParamEnv`s with the same `InferCtxt`

This PR changes the key of the projection cache from just `AliasTy` to `(AliasTy, ParamEnv)` to allow normalizing in different `ParamEnv`s without resetting caches. Previously, normalizing the same alias in different param envs would always reuse the cached result from the first normalization, which is incorrect if the projection clauses in the param env have changed.

Fixing this bug allows us to get rid of `InferCtxt::clear_caches`, which was only used by the `AutoTraitFinder`, because it requires normalizing in different param envs.

r? `@fmease`
2024-04-21 19:05:08 +00:00
Matthias Krüger 6774801563 crashes: add a couple more ICE tests 2024-04-21 21:04:32 +02:00
Caio 3aaa3941fd Move some tests 2024-04-21 15:43:43 -03:00
Scott McMurray 5e785b1420 Update tests after 123949 2024-04-21 11:24:54 -07:00
Scott McMurray 1398fe7a5e Address more PR feedback 2024-04-21 11:08:38 -07:00
Scott McMurray bb8d6f790b Address PR feedback 2024-04-21 11:08:37 -07:00
Scott McMurray 5e1d16ca55 Also handle AggregateKind::RawPtr in cg_cranelift 2024-04-21 11:08:37 -07:00
Scott McMurray 9520cebfc5 InstSimplify from_raw_parts(p, ())p as _ 2024-04-21 11:08:37 -07:00
Scott McMurray de64ff76f8 Use it in the library, and InstSimplify it away in the easy places 2024-04-21 11:08:37 -07:00
Scott McMurray 4f4442655e Add an intrinsic that lowers to AggregateKind::RawPtr 2024-04-21 11:08:37 -07:00
Scott McMurray e6b2b764ec Add AggregateKind::RawPtr and enough support to compile 2024-04-21 11:08:37 -07:00
Scott McMurray 70df9d9a13 Add a mir-opt test for byte_add on pointers 2024-04-21 11:08:36 -07:00
Scott McMurray b76faff1b2 Add a MIR pre-codegen test for Vec::deref 2024-04-21 11:08:36 -07:00
Scott McMurray 5800dc1faa New slice indexing pre-codegen MIR test 2024-04-21 11:08:36 -07:00
Boxy e1d12ffb6c removal 2024-04-21 18:41:32 +01:00
bors f22a0c2d9f Auto merge of #123594 - Urgau:fix-non_local_def-lint-overflow, r=lcnr
Fix trait solver overflow with `non_local_definitions` lint

This PR fixes the trait solver overflow with the `non_local_definitions` lint reported in https://github.com/rust-lang/rust/issues/123573 using the suggestion from `@lcnr:` https://github.com/rust-lang/rust/issues/123573#issuecomment-2041348320 to use the next trait solver.

~~I have not (yet) tried to create a minimized repro~~ ``@compiler-errors`` did the minimization (thanks you) but I have manually tested on the `starlark-rust` project that it fixes the issue.

Fixes #123573
r? `@lcnr`
2024-04-21 17:02:03 +00:00
Lukas Markeffsky 5a2b335e49 also remap RPITITs nested in other types back to their opaques 2024-04-21 18:04:50 +02:00
Mateusz Mikuła 6ae761cd40 Add gnullvm targets to manifest 2024-04-21 17:41:42 +02:00
bors aa31bad26b Auto merge of #124222 - GuillaumeGomez:rollup-ws1zju7, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #124069 (enable clippy for bootstrap on CI PRs (in `mingw-check` image))
 - #124089 (Fix watchOS and visionOS for pread64 and pwrite64 calls)
 - #124184 (Suggest using `unsigned_abs` in `abs` documentation)
 - #124198 (Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-21 13:05:45 +00:00
bohan 2d5a226f8f cleanup: unnecessary clone during lower generics args 2024-04-21 20:40:44 +08:00
Guillaume Gomez 43d5e00bac
Rollup merge of #124198 - compiler-errors:improve-ty-ct-param-span, r=Nadrieril
Flip spans for precise capturing syntax not capturing a ty/const param, and for implicit captures of lifetime params

Make the primary span point to the opaque, rather than the param which might be very far away (e.g. in an impl header hundreds of lines above).
2024-04-21 13:30:26 +02:00
Guillaume Gomez 24b8c54f6d
Rollup merge of #124184 - gurry:124152-suggest-unsigned-abs-in-abs-doc, r=jhpratt
Suggest using `unsigned_abs` in `abs` documentation

Fixes #124152
2024-04-21 13:30:26 +02:00
Guillaume Gomez 9efd1477ac
Rollup merge of #124089 - simlay:fix-preadv64-and-pwritev64-link-for-watchos-and-visionos, r=workingjubilee
Fix watchOS and visionOS for pread64 and pwrite64 calls

In #122880, links to `preadv64` and `pwritev64` were added for `watchOS` however the underlying [`weak!` macro did not include `target_os = "watchos"`](c45dee5efd/library/std/src/sys/pal/unix/weak.rs (L30-L74)).

This resulted in an `xcodebuild` error when targeting `watchOS`:
```
Undefined symbols for architecture arm64:
  "_preadv64", referenced from:
      __rust_extern_with_linkage_preadv64 in libliveview_native_core.a[274](std-324fdd8d31e8eaa2.std.e18cf7e8d0336778-cgu.08.rcgu.o)
  "_pwritev64", referenced from:
      __rust_extern_with_linkage_pwritev64 in libliveview_native_core.a[274](std-324fdd8d31e8eaa2.std.e18cf7e8d0336778-cgu.08.rcgu.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

So I added them. I also went ahead and added the same for visionOS because it's bound to create the same issue.
2024-04-21 13:30:25 +02:00
Guillaume Gomez f122a5129c
Rollup merge of #124069 - onur-ozkan:run-clippy-on-bootstrap, r=albertlarsan68
enable clippy for bootstrap on CI PRs (in `mingw-check` image)

Let's keep the bootstrap codebase cleaner.
2024-04-21 13:30:24 +02:00
bors fecb7b4309 Auto merge of #124193 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2024-04-21 11:01:46 +00:00
Ralf Jung ae37b6ec58 the mir-validation ICE test behaves strangely on Windows hosts
let's just disable it there, this code is not platform-dependent anyway
2024-04-21 12:36:16 +02:00
beetrees 71f751d139
Fix ICE when there is a non-Unicode entry in the incremental crate directory 2024-04-21 11:24:55 +01:00
bors b9be3c47e5 Auto merge of #117457 - daxpedda:wasm-nontrapping-fptoint, r=wesleywiser
Stabilize Wasm target features that are in phase 4 and 5

This stabilizes the Wasm target features that are known to be working and in [phase 4 and 5](04fa8c810e).

Feature stabilized:
- [Non-trapping float-to-int conversions](https://github.com/WebAssembly/nontrapping-float-to-int-conversions)
- [Import/Export of Mutable Globals](https://github.com/WebAssembly/mutable-global)
- [Sign-extension operators](https://github.com/WebAssembly/sign-extension-ops)
- [Bulk memory operations](https://github.com/WebAssembly/bulk-memory-operations)
- [Extended Constant Expressions](https://github.com/WebAssembly/extended-const)

Features not stabilized:
- [Multi-value](https://github.com/WebAssembly/multi-value): requires rebuilding `std` #73755.
- [Reference Types](https://github.com/WebAssembly/reference-types): no point stabilizing without #103516.
- [Threads](https://github.com/webassembly/threads): requires rebuilding `std` #77839.
- [Relaxed SIMD](https://github.com/WebAssembly/relaxed-simd): separate PR #117468.
- [Multi Memory](https://github.com/WebAssembly/multi-memory): not implemented.

See https://github.com/rust-lang/rust/pull/117457#issuecomment-1787648070 for more context.

Documentation: https://github.com/rust-lang/reference/pull/1420
Tracking issue: https://github.com/rust-lang/rust/issues/44839
2024-04-21 06:32:10 +00:00
Sebastian Imlay fa53b9f39c Fix watchOS and visionOS for pread64 and pwrite64 calls
* Refactor apple OSs  to use pwritev and preadv rather pwritev64 and preadv64
* Updated the comments for preadv and pwritev
2024-04-21 00:36:07 -04:00