Commit Graph

253170 Commits

Author SHA1 Message Date
Ralf Jung
b9ed4cd70a share code between win-to-unix and unix-to-win path conversion 2024-04-19 09:17:37 +02:00
bors
9b4fb7ce91 Auto merge of #17105 - kpreid:nocapture, r=Veykril
Make test harness arguments configurable and not `--nocapture`.

* Added config `runnables.extraTestBinaryArgs` to control the args.
* The default is `--show-output` rather than `--nocapture` to prevent unreadable output when 2 or more tests fail or print output at once.
* Renamed variables in `CargoTargetSpec::runnable_args()` for clarity.

Fixes #12737.

Suggested changelog info:

> New Features
>
> * add `rust-analyzer.runnables.extraTestBinaryArgs` to configure test harness options when running tests; replaces a previously hard-coded `--nocapture` option.

I'm not sure I made the right choices in vocabulary, between “binary”, “executable”, and “runnable”, and “launch” vs. “execute”, so let me know if I missed something to be consistent with in the naming and documentation.
2024-04-19 07:02:15 +00:00
roife
a543516ea4 fix: handle escaped chars in doc comments 2024-04-19 14:57:37 +08: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
Michael Howell
2e7d9e9acb rustdoc-search: fix description on aliases in results
This needs to start downloading the descriptions after aliases
have been added to the result set.
2024-04-18 22:21:29 -07:00
The Miri Cronjob Bot
d0783e8836 Merge from rustc 2024-04-19 05:13:02 +00:00
The Miri Cronjob Bot
c1cf0a3e38 Preparing for merge from rustc 2024-04-19 05:05:48 +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
zhuyunxing
68f86381ee coverage. Add coverage-options=mcdc as gate for MC/DC instrument 2024-04-19 10:43:53 +08:00
Kevin Reid
db292bd89e Make test harness arguments configurable and not --nocapture.
* Added config `runnables.extraTestBinaryArgs` to control the args.
* The default is `--show-output` rather than `--nocapture` to prevent
  unreadable output when 2 or more tests fail or print output at once.
* Renamed variables in `CargoTargetSpec::runnable_args()` for clarity.

Fixes <https://github.com/rust-lang/rust-analyzer/issues/12737>.
2024-04-18 18:37:09 -07:00
Scott McMurray
986d9f104b Make checked ops emit *unchecked* LLVM operations where feasible
For things with easily pre-checked overflow conditions -- shifts and unsigned subtraction -- write then checked methods in such a way that we stop emitting wrapping versions of them.

For example, today <https://rust.godbolt.org/z/qM9YK8Txb> neither
```rust
a.checked_sub(b).unwrap()
```
nor
```rust
a.checked_sub(b).unwrap_unchecked()
```
actually optimizes to `sub nuw`.  After this PR they do.
2024-04-18 18:11:21 -07: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
Ralf Jung
9b419a1b83 when reusing an address, most of the time only reuse from the current thread 2024-04-18 23:02:21 +02:00
bors
39f0c4f884 Auto merge of #3488 - RalfJung:os_str_comment, r=RalfJung
os_str: comment clarification and typo fix
2024-04-18 20:28:23 +00:00
Ralf Jung
5067dd21b6 comment clarification and typo fix 2024-04-18 22:27:07 +02:00
Ralf Jung
61def018c1 llvm RustWrapper: explain OpBundlesIndirect argument type 2024-04-18 21:43:52 +02: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
Ralf Jung
5e6184cdb7 interpret/binary_int_op: avoid dropping to raw ints until we determined the sign 2024-04-18 14:25:06 +02: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
bors
af1fd88c4d Auto merge of #16257 - lnicola:rustc-check-cfg, r=Veykril
internal: Teach cargo about `cfg(rust_analyzer)`

r? `@Urgau` is this a good idea?, CC `@Veykril`
2024-04-18 12:13:06 +00:00
Ralf Jung
d7916fc8cd do not reuse stack addresses; make reuse rate configurable 2024-04-18 13:20:01 +02:00
daxpedda
6a52feeac6
Stabilize Wasm phase 4 & 5 proposals 2024-04-18 12:51:02 +02:00
Ralf Jung
48fd549cd3 when an address gets reused, establish a happens-before link in the data race model 2024-04-18 12:37:03 +02:00
bors
1ce64e717f Auto merge of #3484 - RalfJung:realloc, r=RalfJung
make realloc with a size of zero fail

Fixes https://github.com/rust-lang/miri/issues/2774
2024-04-18 10:27:42 +00:00
Ralf Jung
5ff9b2b865 move allocator shim logic into its own file 2024-04-18 12:07:09 +02:00
Ralf Jung
73e333ac44 make realloc with a size of zero fail 2024-04-18 12:06:29 +02: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
5c9924a599 Auto merge of #3486 - RalfJung:mir-validate, r=RalfJung
add test checking that we do run MIR validation

Fixes https://github.com/rust-lang/miri/issues/2840
2024-04-18 09:55:39 +00:00
Ralf Jung
5ef38aca35 add test checking that we do run MIR validation 2024-04-18 11:49:56 +02:00