Commit Graph

255615 Commits

Author SHA1 Message Date
Matthias Krüger
7a45322300
Rollup merge of #125286 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-05-19 22:50:56 +02:00
Matthias Krüger
131d48f5a1
Rollup merge of #125279 - WaffleLapkin:unpacktermindebug, r=aDotInTheVoid,Nilstrieb,BoxyUwU
make `Debug` impl for `Term` simpler

meow
2024-05-19 22:50:56 +02:00
Matthias Krüger
c5b8c7c3b0
Rollup merge of #124992 - foresterre:example/is-terminal, r=ChrisDenton
Add example to IsTerminal::is_terminal
2024-05-19 22:50:55 +02:00
Matthias Krüger
d5bef41ee5
Rollup merge of #124948 - blyxyas:remove-repeated-words, r=compiler-errors
chore: Remove repeated words (extension of #124924)

When I saw #124924 I thought "Hey, I'm sure that there are far more than just two typos of this nature in the codebase". So here's some more typo-fixing.

Some found with regex, some found with a spellchecker. Every single one manually reviewed by me (along with hundreds of false negatives by the tools)
2024-05-19 22:50:55 +02:00
bors
1d1283ed09 Auto merge of #125006 - spastorino:generics-is-empty, r=compiler-errors
Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes

r? `@compiler-errors`

Related to #123929
2024-05-19 19:22:57 +00:00
Ralf Jung
e93268eee2 update lockfile 2024-05-19 20:31:08 +02:00
Zachary S
3299823d62 Fix typo in assert message 2024-05-19 13:29:45 -05:00
Zachary S
58f8ed122a cfg-out unused code under no_global_oom_handling 2024-05-19 13:27:17 -05:00
Zachary S
6fae171e54 fmt 2024-05-19 13:21:53 -05:00
Urgau
bc8e034c39 Link to the check-cfg doc section in the unexpected_cfgs lint doc 2024-05-19 20:15:01 +02:00
Urgau
3b47f4c60c Refer to the Cargo specific doc in the check-cfg diagnostics 2024-05-19 20:12:41 +02:00
Urgau
b5ec9bb1b6 Add Cargo specific doc regarding his interaction with --check-cfg 2024-05-19 20:12:41 +02:00
Urgau
7cb84fbf14 Prefer suggesting string-literal for Cargo check-cfg lint config 2024-05-19 20:04:32 +02:00
Martijn
0b6baf6130 Add example to IsTerminal::is_terminal 2024-05-19 20:00:02 +02:00
bors
85ed056888 Auto merge of #3319 - bjorn3:some_more_shims, r=RalfJung
Directly implement native exception raise methods in miri

This implements the `_Unwind_RaiseException` function used on pretty much every unix system for starting unwinding. This allows removing the miri special case from libpanic_unwind for unix.

Windows still needs `miri_start_unwind` as SEH unwinding isn't supported by miri. Unlike DWARF unwinding, SEH preserves all stack frames until right after the do_catch function has executed. Because of this panic_unwind stack allocates the exception object. Miri can't currently model unwinding without destroying stack frames and as such will report a use-after-free of the exception object.
2024-05-19 17:35:20 +00:00
Ralf Jung
5e41ff516f various small nits
- share implementation with miri_starting_unwind
- make test use a custom unwinding class
- extend comments
- use NeedsUnwind more consistently
2024-05-19 19:31:52 +02:00
bors
959a67a7f2 Auto merge of #123786 - a1phyr:cursor_unsafe, r=joboet
Remove bound checks from `BorrowedBuf` and `BorrowedCursor` methods
2024-05-19 17:16:12 +00:00
Waffle Lapkin
434221ba45 bless tests 2024-05-19 19:10:04 +02:00
bjorn3
42cb1ffa36 Directly implement native exception raise methods in miri
Windows still needs the old custom ABI as SEH unwinding isn't supported
by miri. Unlike DWARF unwinding it preserves all stack frames until
right after the do_catch function has executed. Because of this
panic_unwind stack allocates the exception object. Miri can't currently
model unwinding without destroying stack frames and as such will report
a use-after-free of the exception object.
2024-05-19 19:06:31 +02:00
bors
a32423c28e Auto merge of #3621 - RalfJung:argparse, r=RalfJung
use a little arg-parsing helper for miri-script
2024-05-19 16:58:51 +00:00
Ralf Jung
9cba160d52 use a little arg-parsing helper for miri-script 2024-05-19 18:57:22 +02:00
Zachary S
2dacd70e1e Fix stacked borrows violation 2024-05-19 11:42:35 -05:00
Nikita Popov
e57f9ac3a0 Update to LLVM 18.1.6 2024-05-19 18:24:30 +02:00
Zachary S
e6396bca01 Use a single static for all default slice Arcs.
Also adds debug_asserts in Drop for Weak/Arc that the shared static is not being "dropped"/"deallocated".
2024-05-19 11:02:22 -05:00
bors
698293518d Auto merge of #125280 - compiler-errors:rollup-401itda, r=compiler-errors
Rollup of 7 pull requests

Successful merges:

 - #123709 (Update documentation related to the recent cmd.exe fix)
 - #124304 (revise the interpretation of ReadDir for HermitOS)
 - #124708 (Actually use the `#[do_not_recommend]` attribute if present)
 - #125252 (Add `#[inline]` to float `Debug` fallback used by `cfg(no_fp_fmt_parse)`)
 - #125261 (crashes: add more)
 - #125270 (Followup fixes from #123344)
 - #125275 (Migrate `run-make/rustdoc-scrape-examples-test` to new `rmake.rs`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-05-19 15:06:28 +00:00
Michael Goulet
e959fd6634
Rollup merge of #125275 - GuillaumeGomez:migrate-rustdoc-scrape-examples-test, r=jieyouxu
Migrate `run-make/rustdoc-scrape-examples-test` to new `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? ``@jieyouxu``
2024-05-19 11:04:10 -04:00
Michael Goulet
b65fcda4d5
Rollup merge of #125270 - pietroalbini:pa-no-sad-contributors, r=Nilstrieb
Followup fixes from #123344

``@Nilstrieb`` doesn't deserve [to be sad](https://github.com/rust-lang/rust/pull/123344#issuecomment-2100978863), so this PR addresses the two pieces of feedback from that PR.

r? ``@Nilstrieb``
2024-05-19 11:04:09 -04:00
Michael Goulet
0fd615f70e
Rollup merge of #125261 - matthiaskrgr:from_ashes_to_crashes, r=jieyouxu
crashes: add more

r? ``@jieyouxu``
2024-05-19 11:04:09 -04:00
Michael Goulet
edace328b8
Rollup merge of #125252 - beetrees:patch-1, r=joboet
Add `#[inline]` to float `Debug` fallback used by `cfg(no_fp_fmt_parse)`

Fixes #125229.
2024-05-19 11:04:08 -04:00
Michael Goulet
e940ca7d4f
Rollup merge of #124708 - weiznich:implement_do_not_recommend, r=compiler-errors,estebank
Actually use the `#[do_not_recommend]` attribute if present

This change tweaks the error message generation to actually use the `#[do_not_recommend]` attribute if present by just skipping the marked trait impl in favour of the parent impl. It also adds a compile test for this behaviour. Without this change the test would output the following error:

```
error[E0277]: the trait bound `&str: Expression` is not satisfied
  --> /home/weiznich/Documents/rust/rust/tests/ui/diagnostic_namespace/do_not_recommend.rs:53:15
   |
LL |     SelectInt.check("bar");
   |               ^^^^^ the trait `Expression` is not implemented for `&str`, which is required by `&str: AsExpression<Integer>`
   |
   = help: the following other types implement trait `Expression`:
             Bound<T>
             SelectInt
note: required for `&str` to implement `AsExpression<Integer>`
  --> /home/weiznich/Documents/rust/rust/tests/ui/diagnostic_namespace/do_not_recommend.rs:26:13
   |
LL | impl<T, ST> AsExpression<ST> for T
   |             ^^^^^^^^^^^^^^^^     ^
LL | where
LL |     T: Expression<SqlType = ST>,
   |        ------------------------ unsatisfied trait bound introduced here
```

Note how that mentions `&str: Expression` before and now mentions `&str: AsExpression<Integer>` instead which is much more helpful for users.

Open points for further changes before stabilization:

* We likely want to move the attribute to the `#[diagnostic]` namespace to relax the guarantees given?
* How does it interact with the new trait solver?

r? `@estebank`
2024-05-19 11:04:08 -04:00
Michael Goulet
f848505c40
Rollup merge of #124304 - hermit-os:fuse, r=joboet
revise the interpretation of ReadDir for HermitOS

HermitOS supports getdents64. As under Linux, the dirent64 entry `d_off` is not longer used, because its definition is not clear. Instead of `d_off` the entry `d_reclen` is used to determine the end of the dirent64 entry.

In addition, take up `@workingjubilee`  suggestion from the discussions in rust-lang/rust#115984 to increase the readability.

Hermit is a tier 3 platform and this PR changes only files, wich are related to the tier 3 platform.
2024-05-19 11:04:07 -04:00
Michael Goulet
0f923a48c5
Rollup merge of #123709 - tgross35:windows-cmd-docs-update, r=ChrisDenton
Update documentation related to the recent cmd.exe fix

Fix some grammar nits, change `bat` (extension) -> `batch` (file), and make line wrapping more consistent.
2024-05-19 11:04:07 -04:00
bors
f7520e40f7 Auto merge of #3620 - RalfJung:wasi, r=RalfJung
test wasm32-wasip2 instead of the deprecated wasm32-wasi target
2024-05-19 14:51:12 +00:00
Waffle Lapkin
006866f558 make Debug impl for Term simpler 2024-05-19 16:48:54 +02:00
Ralf Jung
b8a7c73792 test wasm32-wasip2 instead of the deprecated wasm32-wasi target 2024-05-19 16:48:48 +02:00
Santiago Pastorino
4501ae89f1
Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes 2024-05-19 11:10:56 -03:00
Guillaume Gomez
2f8b98c664 Migrate run-make/rustdoc-scrape-examples-test to new rmake.rs 2024-05-19 15:02:30 +02:00
bors
7d2a95b143 Auto merge of #125272 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-05-19 12:56:35 +00:00
bors
3c15681a48 Auto merge of #3619 - RalfJung:print-sysroot, r=RalfJung
properly print error in 'cargo miri setup --print-sysroot'

Based on rustc-build-sysroot now putting the stderr into the error message.
2024-05-19 12:04:28 +00:00
Ralf Jung
2b9c1caa18 properly print error in 'cargo miri setup --print-sysroot' 2024-05-19 14:01:52 +02:00
bors
84b9b6d16c Auto merge of #125145 - Kobzol:ci-toolstate, r=Mark-Simulacrum
CI: fix toolstate publishing

Toolstate publishing after something broke was not working (discovered [here](https://github.com/rust-lang/rust/pull/124050#issuecomment-2111292015)). The toolstate env. vars should only be needed for the publishing step, so I moved them there.

The toolstate script is also being checked in `mingw-check` on PR and auto CI, but it doesn't really seem to do anything, and it shouldn't require the token.
2024-05-19 10:49:24 +00:00
bors
0e41a801f3 Auto merge of #3616 - RalfJung:android, r=RalfJung
make basic things work on Android

Fixes https://github.com/rust-lang/miri/issues/3608
2024-05-19 10:14:36 +00:00
bors
3726afad7e Auto merge of #3585 - devnexen:aligned_alloc, r=RalfJung
support aligned_alloc for unixes.

Fixes https://github.com/rust-lang/miri/issues/3577
2024-05-19 09:50:25 +00:00
Ralf Jung
844de64396 make basic things work on Android 2024-05-19 11:50:12 +02:00
Ralf Jung
430298c3ad a bit of refactoring and tweak the aligned-allocation tests 2024-05-19 11:48:51 +02:00
Laurențiu Nicola
0f4d94a5b0 Add option-ext to RA license exception list 2024-05-19 11:53:08 +03:00
bors
8d7c8ac50a Auto merge of #3615 - RalfJung:rustup, r=RalfJung
Rustup
2024-05-19 08:42:59 +00:00
bors
7c735958b2 Auto merge of #124674 - onur-ozkan:followup-124461, r=pietroalbini
keep the `STAGE0_MISSING_TARGETS` list updated

Implements https://github.com/rust-lang/rust/pull/124461#issuecomment-2092574309.

r? pietroalbini
2024-05-19 08:41:49 +00:00
Ralf Jung
3460853a45 Merge from rustc 2024-05-19 10:35:44 +02:00
Ralf Jung
1ba83f2dc1 Preparing for merge from rustc 2024-05-19 10:35:38 +02:00