| Age | Commit message (Collapse) | Author | Lines |
|
Rollup of 4 pull requests
Successful merges:
- #124948 (chore: Remove repeated words (extension of #124924))
- #124992 (Add example to IsTerminal::is_terminal)
- #125279 (make `Debug` impl for `Term` simpler)
- #125286 (Miri subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Miri subtree update
r? `@ghost`
|
|
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)
|
|
Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes
r? `@compiler-errors`
Related to #123929
|
|
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.
|
|
- share implementation with miri_starting_unwind
- make test use a custom unwinding class
- extend comments
- use NeedsUnwind more consistently
|
|
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.
|
|
|
|
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``
|
|
|
|
generics' attributes
|
|
|
|
Subtree update of `rust-analyzer`
r? `@ghost`
|
|
|
|
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.
|
|
make basic things work on Android
Fixes https://github.com/rust-lang/miri/issues/3608
|
|
support aligned_alloc for unixes.
Fixes https://github.com/rust-lang/miri/issues/3577
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 3 pull requests
Successful merges:
- #125214 (Only make GAT ambiguous in `match_projection_projections` considering shallow resolvability)
- #125236 (Add tests for `-Zunpretty=expanded` ported from stringify's tests)
- #125251 (Clarify how String::leak and into_boxed_str differ )
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add tests for `-Zunpretty=expanded` ported from stringify's tests
This PR adds a new set of tests for the AST pretty-printer.
Previously, pretty-printer edge cases were tested by way of `stringify!` in [tests/ui/macros/stringify.rs](https://github.com/rust-lang/rust/blob/1.78.0/tests/ui/macros/stringify.rs), such as the tests added by https://github.com/rust-lang/rust/commit/419b26931b73209bfafdb9938c09e12b9d650613 and https://github.com/rust-lang/rust/commit/527e2eac17c5d3709e4e30e8b72ae33a6e8990b1.
Those tests will no longer provide effective coverage of the AST pretty-printer after #124141. `Nonterminal` and `TokenKind::Interpolated` are being removed, and a consequence is that `stringify!` will perform token stream pretty printing, instead of AST pretty printing, in all of the `stringify!` cases including $:expr and all other interpolations.
This PR adds 2 new ui tests with `compile-flags: -Zunpretty=expanded`:
- **tests/ui/unpretty/expanded-exhaustive.rs** — this test aims for exhaustive coverage of all the variants of `ExprKind`, `ItemKind`, `PatKind`, `StmtKind`, `TyKind`, and `VisibilityKind`. Some parts could use being fleshed out further, but the current state is roughly on par with what exists in the old stringify-based tests.
- **tests/ui/unpretty/expanded-interpolation.rs** — this test covers tricky macro metavariable edge cases that require the AST pretty printer to synthesize parentheses in order for the printed code to be valid Rust syntax.
r? `@nnethercote`
|
|
Rename Unsafe to Safety
Alternative to #124455, which is to just have one Safety enum to use everywhere, this opens the posibility of adding `ast::Safety::Safe` that's useful for unsafe extern blocks.
This leaves us today with:
```rust
enum ast::Safety {
Unsafe(Span),
Default,
// Safe (going to be added for unsafe extern blocks)
}
enum hir::Safety {
Unsafe,
Safe,
}
```
We would convert from `ast::Safety::Default` into the right Safety level according the context.
|
|
|
|
|
|
|
|
|
|
|
|
Migrate `run-make/issue-28766` to `rmake`
Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
|
|
Migrate `run-make/issue64319` to `rmake` and rename
Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
~~I noticed that the Makefile was not listed in `allowed-run-makefiles` in Tidy. Does this mean the test was being ignored?~~ EDIT: No, it was there, just not in its expected alphabetical order.
EDIT2: Perhaps it could be interesting to clean this test visually by looping over the `rustc` calls, like in #125227.
|
|
Migrate `run-make/static-unwinding` to `rmake`
Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
An easy one after the last one, though the explanatory comment could use some clarification.
|
|
|
|
|
|
|
|
Give `FileDescription::{read, write}` access to the `MiriInterpCx `
fixes #3572
|
|
|
|
|
|
|
|
|
|
|
|
Migrate `run-make/rustdoc-with-out-dir-option` to new `rmake.rs`
Part of https://github.com/rust-lang/rust/issues/121876.
r? `@jieyouxu`
|
|
Adjust Allocation Bytes used by Miri to custom MiriAllocBytes
Previously, the `MiriMachine` used `type Bytes = Box<[u8]>` for its allocations.
This PR swaps this out for a custom `MiriAllocBytes` type implemented in `alloc_bytes.rs`.
This is in anticipation of an extension to Miri's FFI, which will require its allocations to take care of alignment (the methods in `impl AllocBytes for Box<[u8]>` ignore this `_align: Align` argument).
Needs https://github.com/rust-lang/rust/pull/124492
|
|
|
|
|
|
|