Commit Graph

252850 Commits

Author SHA1 Message Date
Maybe Waffle
0bbe362901 Correctly change type when adding adjustments on top of NeverToAny 2024-04-19 11:05:02 +00:00
Maybe Waffle
4d749cad25 Add a test for a == b where a: !, b: !
(this currently produces malformed mir: we call `eq` with first argument not
being a reference)
2024-04-19 11:05:02 +00:00
Maybe Waffle
662d276573 Add regression test for issue 120600 2024-04-19 11:05:02 +00:00
bors
c4f112af6e Auto merge of #124123 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-04-19 07:39:44 +00:00
bors
0ed85d0c8d Auto merge of #124147 - workingjubilee:rollup-7pjnzr6, r=workingjubilee
Rollup of 7 pull requests

Successful merges:

 - #123406 (Force exhaustion in iter::ArrayChunks::into_remainder)
 - #123752 (Properly handle emojis as literal prefix in macros)
 - #123935 (Don't inline integer literals when they overflow - new attempt)
 - #123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc)
 - #124019 (Use raw-dylib for Windows synchronization functions)
 - #124110 (Fix negating `f16` and `f128` constants)
 - #124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-19 05:38:13 +00:00
Jubilee
c8d58faba2
Rollup merge of #124116 - RalfJung:miri-rust-backtrace, r=Nilstrieb
when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation

Fixes https://github.com/rust-lang/miri/issues/2855
2024-04-18 21:38:57 -07:00
Jubilee
f36ca7a75f
Rollup merge of #124110 - beetrees:neg-f16-f128, r=compiler-errors
Fix negating `f16` and `f128` constants

Make `f16` and `f128` constants respect `neg` in `parse_float_into_scalar`.

Tracking issue: #116909

```@rustbot``` label +F-f16_and_f128
2024-04-18 21:38:57 -07:00
Jubilee
55c35dd22e
Rollup merge of #124019 - ChrisDenton:futex-raw-dylib, r=joboet
Use raw-dylib for Windows synchronization functions

Fixes #123999 by using the raw-dylib feature to specify the DLL to load the Windows futex functions from (e.g. [`WaitOnAddress`](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress)). This avoids reliance on the import library causing that issue.

With apologies to ``@bjorn3,`` as it's currently necessary to revert this for cranelift.
2024-04-18 21:38:56 -07:00
Jubilee
2b94e02737
Rollup merge of #123980 - WaffleLapkin:graph-average-refactor, r=wesleywiser
Add an opt-in to store incoming edges in `VecGraph` + misc

r? ```@fmease```

needed for #123939
2024-04-18 21:38:56 -07:00
Jubilee
f174c310ae
Rollup merge of #123935 - tstsrt:fix-115423, r=oli-obk
Don't inline integer literals when they overflow - new attempt

Basically #116633 but I implemented the suggested changes.
Fixes #115423. Fixes #116631.

This is my first contribution to this repo so please let me know if I'm supposed to change something :)
2024-04-18 21:38:55 -07:00
Jubilee
0a0a5a956c
Rollup merge of #123752 - estebank:emoji-prefix, r=wesleywiser
Properly handle emojis as literal prefix in macros

Do not accept the following

```rust
macro_rules! lexes {($($_:tt)*) => {}}
lexes!(🐛"foo");
```

Before, invalid emoji identifiers were gated during parsing instead of lexing in all cases, but this didn't account for macro pre-expansion of literal prefixes.

Fix #123696.
2024-04-18 21:38:55 -07:00
Jubilee
3831cbb28f
Rollup merge of #123406 - krtab:fix_remainder_iterchunk, r=scottmcm
Force exhaustion in iter::ArrayChunks::into_remainder

Closes: #123333
2024-04-18 21:38:54 -07:00
bors
13e63f7490 Auto merge of #117919 - daxpedda:wasm-c-abi, r=wesleywiser
Introduce perma-unstable `wasm-c-abi` flag

Now that `wasm-bindgen` v0.2.88 supports the spec-compliant C ABI, the idea is to switch to that in a future version of Rust. In the meantime it would be good to let people test and play around with it.

This PR introduces a new perma-unstable `-Zwasm-c-abi` compiler flag, which switches to the new spec-compliant C ABI when targeting `wasm32-unknown-unknown`.

Alternatively, we could also stabilize this and then deprecate it when we switch. I will leave this to the Rust maintainers to decide.

This is a companion PR to #117918, but they could be merged independently.
MCP: https://github.com/rust-lang/compiler-team/issues/703
Tracking issue: https://github.com/rust-lang/rust/issues/122532
2024-04-19 03:35:10 +00:00
bors
fa0068b541 Auto merge of #124038 - matthiaskrgr:one_or_two_more_tests, r=jieyouxu
crashes: add a couple more ice tests
2024-04-19 01:02:44 +00:00
bors
e3181b091e Auto merge of #119912 - notriddle:notriddle/reexport-dedup, r=GuillaumeGomez
rustdoc-search: single result for items with multiple paths

Part of #15723

Preview: https://notriddle.com/rustdoc-html-demo-9/reexport-dup/std/index.html?search=hashmap

This change uses the same "exact" paths as trait implementors and type alias inlining to track items with multiple reachable paths. This way, if you search for `vec`, you get only the `std` exports of it, and not the one from `alloc`.

It still includes all the items in the search index so that you can search for them by all available paths. For example, try `core::option` and `std::option`, and notice that the results page doesn't show duplicates, but still shows all the items in their respective crates.
2024-04-18 21:23:15 +00:00
bors
3412f01749 Auto merge of #123949 - scottmcm:debug-no-means-no-debug-info-when-inlined, r=oli-obk,onur-ozkan
At debuginfo=0, don't inline debuginfo when inlining

See https://github.com/rust-lang/rust/pull/123949#issuecomment-2060493285 for info.
2024-04-18 19:12:28 +00:00
Maybe Waffle
523fe2b67b Add tests for predecessor-aware VecGraph mode 2024-04-18 17:32:42 +00:00
Matthias Krüger
1d45b7adaf crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
Scott McMurray
20cf59549f The ICE in 121127 needs debuginfo 2024-04-18 09:42:26 -07:00
scottmcm
b8ac5c0f91 Update src/bootstrap/src/core/builder.rs
Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>
2024-04-18 09:35:36 -07:00
Scott McMurray
90b4c86335 Ensure [rust] debuginfo-level-std doesn't change core's MIR 2024-04-18 09:35:36 -07:00
Scott McMurray
6094063c35 Update checked_ops so 32- and 64-bit gets the same checks 2024-04-18 09:35:36 -07:00
Scott McMurray
d05545c05d At debuginfo=0, don't inline debuginfo when inlining 2024-04-18 09:35:35 -07:00
Philipp Krones
9028e00dfa
Merge commit 'ca3b393750ee8d870bf3215dcf6509cafa5c0445' into clippy-subtree-update 2024-04-18 17:48:52 +02:00
bors
ca3b393750 Auto merge of #12690 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2024-04-18 15:42:41 +00:00
Philipp Krones
fca4e16ffb
Bump nightly version -> 2024-04-18 2024-04-18 17:30:05 +02:00
Philipp Krones
846f6e7e00
Merge remote-tracking branch 'upstream/master' into rustup 2024-04-18 17:29:59 +02:00
bors
0e15f5ee8f Auto merge of #124072 - saethlin:less-sysroot-libc-misc, r=jieyouxu
Remove libc from more tests

The goal here is to trim down the number of tests that depend on libc from the sysroot to make https://github.com/rust-lang/rust/pull/123938 more plausible.

This PR is a few simple cases that I missed in https://github.com/rust-lang/rust/pull/123943.
2024-04-18 14:59:36 +00:00
Ben Kimock
8047fadbf3 Add an exception for windows-msvc 2024-04-18 09:52:00 -04:00
bors
c5de414865 Auto merge of #123144 - dpaoliello:arm64eclib, r=GuillaumeGomez,ChrisDenton,wesleywiser
Add support for Arm64EC to the Standard Library

Adds the final pieces so that the standard library can be built for arm64ec-pc-windows-msvc (initially added in #119199)

* Bumps `windows-sys` to 0.56.0, which adds support for Arm64EC.
* Correctly set the `isEC` parameter for LLVM's `writeArchive` function.
* Add `#![feature(asm_experimental_arch)]` to library crates where Arm64EC inline assembly is used, as it is currently unstable.
2024-04-18 12:22:52 +00:00
Ralf Jung
3e633981ef when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation 2024-04-18 12:05:08 +02:00
bors
c25473ff62 Auto merge of #124008 - nnethercote:simpler-static_assert_size, r=Nilstrieb
Simplify `static_assert_size`s.

We want to run them on all 64-bit platforms.

r? `@ghost`
2024-04-18 09:47:45 +00:00
bors
ecd45472f8 Auto merge of #124111 - matthiaskrgr:rollup-cmmkryf, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #124041 (Fix copy path button)
 - #124047 (Match ergonomics 2024: miscellaneous code cleanups)
 - #124064 (Move confusing comment about otherwise blocks in `lower_match_tree`)
 - #124090 (llvm: update riscv target feature to match LLVM 19)
 - #124100 (fix: make `str::from_raw_parts_mut` `mut`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-18 07:26:15 +00:00
Matthias Krüger
5543da9aec
Rollup merge of #124100 - dev-ardi:master, r=workingjubilee
fix: make `str::from_raw_parts_mut` `mut`

`str::from_raw_parts_mut` wasn't actually `mut`
#119206
2024-04-18 08:37:50 +02:00
Matthias Krüger
90013ff5ad
Rollup merge of #124090 - durin42:llvm-19-riscv-feature, r=cuviper
llvm: update riscv target feature to match LLVM 19

In llvm/llvm-project@9067070d91 they ended up largely reverting
llvm/llvm-project@e817966718. This means the change we did in
rust-lang/rust@b378059e6b is now only corrct for LLVM 18...so we have to adjust again.

``@rustbot`` label: +llvm-main
2024-04-18 08:37:49 +02:00
Matthias Krüger
2c7ef79065
Rollup merge of #124064 - Zalathar:otherwise-block, r=Nadrieril
Move confusing comment about otherwise blocks in `lower_match_tree`

This comment was historically inside a block guarded by `if let Some(otherwise_block) = otherwise`.

When #120978 made the “otherwise block” non-optional, it also flattened that region of code. Doing so left this comment awkwardly stranded above an unrelated line of code, without its original context.

We can restore that context by moving it above the declaration of `otherwise`.

r? ``@Nadrieril``
2024-04-18 08:37:49 +02:00
Matthias Krüger
7add0bdf7e
Rollup merge of #124047 - Jules-Bertholet:match-ergonomics-cleanups, r=Nadrieril
Match ergonomics 2024: miscellaneous code cleanups

- Store `ByRef` instead of `BindingAnnotation` in `PatInfo`
- Rename `BindingAnnotation` to `BindingMode`

r? ``@Nadrieril``

cc #123076

``@rustbot`` label A-patterns
2024-04-18 08:37:48 +02:00
Matthias Krüger
56f4ac308b
Rollup merge of #124041 - GuillaumeGomez:fix-copy-path-button, r=notriddle
Fix copy path button

Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in https://github.com/rust-lang/rust/pull/123706 forgot to update the JS (it contained an image before but not anymore).

I had to make some small changes in the CSS to fix the display when the button was clicked as well.

r? ``@notriddle``
2024-04-18 08:37:48 +02:00
beetrees
cc12a1b511
Fix negating f16 and f128 constants 2024-04-18 06:43:44 +01:00
Nicholas Nethercote
0d97669a17 Simplify static_assert_sizes.
We want to run them on all 64-bit platforms.
2024-04-18 15:36:25 +10:00
bors
b1248bc60d Auto merge of #124046 - matthiaskrgr:one_or_two_more_tests____some_on_top, r=jieyouxu
crashes: add even more tests?!?

adds more tests that were not already added with https://github.com/rust-lang/rust/pull/124038 from the past 10 months or so.
Need a couple more passes through the tracker to filter out more missing ice /fixed tests but we're slowly getting there.
2024-04-18 05:23:09 +00:00
Matthias Krüger
06335c6532 crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
bors
5260893724 Auto merge of #122684 - oli-obk:delay_interning_errors_to_after_validaiton, r=RalfJung
Delay interning errors to after validation

fixes https://github.com/rust-lang/rust/issues/122398
fixes #122548

This improves diagnostics since validation errors are usually more helpful compared with interning errors that just make broad statements about the entire constant

r? `@RalfJung`
2024-04-18 02:34:04 +00:00
bors
9f432d7b44 Auto merge of #124044 - DianQK:update-llvm-18, r=cuviper
Update LLVM to 1deeee3

Fixes #123772.

Diff: af8f9eb61a...5399a24c66
Diff (From 18.1.2): 0af6c732ec...5399a24c66

r? `@cuviper`
2024-04-18 00:04:09 +00:00
ardi
9cc9ba5cae fix: make str::from_raw_parts_mut mut 2024-04-18 01:46:49 +02:00
bors
becebb3158 Auto merge of #123978 - alexcrichton:update-wasi-toolchain, r=Mark-Simulacrum
Update how WASI toolchains are used in CI and bootstrap

This commit updates how the WASI targets are configured with their toolchain. Long ago a `config.toml` option of `wasi-root` was added to enable building with the WASI files produced by wasi-libc. Additionally for CI testing and release building the Rust toolchain has been using a hard-coded commit of wasi-libc which is bundled with the release of the `wasm32-wasip1` target, for example.

Nowadays though the wasi-sdk project, the C/C++ toolchain for WASI, is the go-to solution for compiling/linking WASI code and contains the more-or-less official releases of wasi-libc. This commit migrates CI to using wasi-sdk releases and additionally updates `bootstrap` to recognize when this is configured. This means that with `$WASI_SDK_PATH` configured there's no further configuration necessary to get a working build. Notably this also works better for the new targets of WASI as well, such as `wasm32-wasip2` and `wasm32-wasip1-threads` where the wasi-sdk release now has libraries for all targets bundled within it.
2024-04-17 21:05:48 +00:00
Augie Fackler
22b704bac4 llvm: update riscv target feature to match LLVM 19
In llvm/llvm-project@9067070d91 they ended
up largely reverting
llvm/llvm-project@e817966718. This means
the change we did in
rust-lang/rust@b378059e6b is now only
corrct for LLVM 18...so we have to adjust again.

@rustbot label: +llvm-main
2024-04-17 16:15:24 -04:00
bors
38104f3a88 Auto merge of #123936 - Mark-Simulacrum:zst-no-alloc, r=oli-obk
Codegen ZSTs without an allocation

This makes sure that &[] is equivalent to unsafe code (from_raw_parts(dangling, 0)). No new stable guarantee is intended about whether or not we do this, this is just an optimization.

This regressed in #67000 (no comments I can see about that regression in the PR, though it did change the test modified here). We had previously performed this optimization since #63635.
2024-04-17 18:31:10 +00:00
bors
c45dee5efd Auto merge of #124084 - matthiaskrgr:rollup-h42psbx, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #116957 (meta: notify #t-rustdoc Zulip stream on backport nominations)
 - #122201 (Document overrides of `clone_from()` in core/std)
 - #122723 (Use same file permissions for ar_archive_writer as the LLVM archive writer)
 - #124030 (interpret: pass MemoryKind to adjust_alloc_base_pointer)
 - #124037 (Don't ascend into parent bodies when collecting stmts for possible return suggestion)
 - #124049 (Stabilize `const_io_structs`)
 - #124062 (Add another expression to weird-exprs.rs)
 - #124066 (Don't error on subtyping of equal types)
 - #124073 (Remove libc from rust_get_test_int uses)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-17 16:27:58 +00:00
Matthias Krüger
abbe0d0e47
Rollup merge of #124073 - saethlin:rust-get-test-int, r=wesleywiser
Remove libc from rust_get_test_int uses

`rust_test_helpers.c` has a few unfortunate signatures which have made some of our UI tests _technically_ need the `libc` crate. This is my attempt to evict the need of `libc` for `rust_get_test_int`.

I've deleted `tests/ui/abi/foreign/foreign-no-abi.rs` because the test was originally written to check that `native mod` will compile without an ABI specifier. `native mod` was removed years before 1.0 and the test hasn't checked for anything for a long time.
2024-04-17 18:01:41 +02:00