| Age | Commit message (Collapse) | Author | Lines |
|
Replace `yes` command by `while-echo` in test `tests/ui/process/process-sigpipe.rs`
The `yes` command is not available on all platforms.
Fixes #108596.
Inviting `@mvf` as he contributed to this patch. Thanks! This issue has been discussed in https://github.com/rust-lang/rust/pull/106673 but was moved to #108596 to get going.
CC `@gh-tr`
r? `@workingjubilee`
`@rustbot` label +O-neutrino
Notes about the comments https://github.com/rust-lang/rust/pull/106673#discussion_r1117324265:
- The `echo` command is `/proc/boot/echo` (not built-in)
- `/bin/sh` is a symlink to `/proc/boot/ksh`
```sh
# ls -l /bin/sh /proc/boot/ksh /proc/boot/echo
lrwxrwxrwx 1 root root 14 Mar 20 07:52 /bin/sh -> /proc/boot/ksh
-r-xr-xr-x 1 root root 9390 Sep 12 2022 /proc/boot/echo
-r-xr-xr-x 1 root root 308114 Sep 12 2022 /proc/boot/ksh
```
|
|
Use `?0` notation for ty/ct/int/float/region vars
Aligns the notation for infer vars that T-types and friends most often uses for inference variables with the notation in the compiler (which is kinda a sigil nightmare IMO: `_#`) by adopting `?0` style infer vars.
This mostly affects debug output since verbose infer vars shouldn't show up in user-facing places.
Does this need an MCP? It's debug output, so I'm thinking no, but happy to open one. :thinking:
r? types
|
|
|
|
Consider polarity in new solver
It's kinda ugly to have a polarity check in all of the builtin impls -- I guess I could consider the polarity at the top of assemble-builtin but that would require adding a polarity fn to `GoalKind`...
:shrug: putting this up just so i dont forget, since it's needed to bootstrap core during coherence (this alone does not allow core to bootstrap though, additional work is needed!)
r? ``@lcnr``
|
|
Migrate `rustc_hir_analysis` to session diagnostic [Part 4]
Part 4: Finishing `check/mod.rs` file
r? `@compiler-errors`
|
|
Add support for allocators in `LinkedList`
Allows `LinkedList` to use a custom allocator
|
|
Add loongarch64 asm! support
|
|
|
|
|
|
|
|
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
|
|
This reverts commit 4b981c26487ebe56de6b3000fcd98713804beefc.
|
|
This reverts commit 4da05e0b88d8b51fc6912da2d0b93edb2780e76b.
|
|
Rollup of 10 pull requests
Successful merges:
- #110480 (Add `known-bug` tests for 11 unsound issues)
- #110539 (Move around `{Idx, IndexVec, IndexSlice}` adjacent code)
- #110590 (Add some tests around (lack of) object safety of associated types and consts)
- #110602 (Ignore src/bootstrap formatting commit in .git-blame-ignore-revs)
- #110667 (pointer-auth-link-with-c: Fix cross compilation.)
- #110681 (drop few unused crates, gate libc under unix for rustc_codegen_ssa)
- #110685 (Some cleanups to DataflowConstProp)
- #110744 (bootstrap: update paths cargo-credential crate)
- #110750 (Add size asserts for MIR `SourceScopeData` & `VarDebugInfo`)
- #110760 (rustdoc: Add regression test for #60522)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustdoc: Add regression test for #60522
Fixes https://github.com/rust-lang/rust/issues/60522.
r? `@notriddle`
|
|
pointer-auth-link-with-c: Fix cross compilation.
|
|
Add some tests around (lack of) object safety of associated types and consts
See https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/.60where.20Self.3ASized.60.20on.20assoc.20types/near/351260928 for some discussion around why this isn't allowed.
We didn't have any tests for these, so I decided to add them now, even if we don't end up doing anything about it.
|
|
r=jackh726
Add `known-bug` tests for 11 unsound issues
r? ``@jackh726``
Should tests for other issues be in separate PRs? Thanks.
Edit: Partially addresses #105107. This PR adds `known-bug` tests for 11 unsound issues:
- #25860
- #49206
- #57893
- #84366
- #84533
- #84591
- #85099
- #98117
- #100041
- #100051
- #104005
|
|
Add mir-opt tests to track MIR quality.
cc `@scottmcm` `@saethlin`
If you have other ideas, please say so.
|
|
r=workingjubilee
allow array-style simd in inline asm
Required for [MCP#621](https://github.com/rust-lang/compiler-team/issues/621) to be implemented.
r? `@workingjubilee`
|
|
|
|
Add `intrinsics::transmute_unchecked`
This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`.
Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions.
It also simplifies a couple places in `core`.
See also https://github.com/rust-lang/rust/pull/108442#issuecomment-1474777273, where `CastKind::Transmute` was added having exactly these semantics before the lang meeting (which I wasn't in) independently expressed interest.
|
|
r=cjgillot,BoxyUwU
Don't create projection ty for const projection
Fixes #110549
|
|
Suggest using integration tests for test crate using own proc-macro
cc #110247
|
|
|
|
Don't infer fn return type to return itself
Fixes #110687
|
|
r=GuillaumeGomez
rustdoc: clean up settings.css and settings.js
`handleKey` was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser-native checkbox was `display: none`, breaking native keyboard accessibility.
The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more.
[behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics
The other, one line change to settings.css is follow-up to #110205
|
|
|
|
Remove the size of locals heuristic in MIR inlining
This heuristic doesn't necessarily correlate to complexity of the MIR Body. In particular, a lot of straight-line code in MIR tends to never reuse a local, even though any optimizer would effectively reuse the storage or just put everything in registers. So it doesn't even necessarily make sense that this would be a stack size heuristic.
So... what happens if we just delete the heuristic? The benchmark suite improves significantly. Less heuristics better?
r? `@cjgillot`
|
|
Run various queries from other queries instead of explicitly in phases
These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps.
This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
|
|
|
|
This takes a whole 3 lines in `compiler/` since it lowers to `CastKind::Transmute` in MIR *exactly* the same as the existing `intrinsics::transmute` does, it just doesn't have the fancy checking in `hir_typeck`.
Added to enable experimenting with the request in <https://github.com/rust-lang/rust/pull/106281#issuecomment-1496648190> and because the portable-simd folks might be interested for dependently-sized array-vector conversions.
It also simplifies a couple places in `core`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Clone region var origins instead of taking them in borrowck
Fixes an issue with the new solver where reporting a borrow-checker error ICEs because it calls `InferCtxt::evaluate_obligation`.
This also removes a handful of unnecessary `tcx.infer_ctxt().build()` calls that are only there to mitigate this same exact issue, but with the old solver.
Fixes compiler-errors/next-solver-hir-issues#12.
----
This implements `@aliemjay's` solution where we just don't *take* the region constraints, but clone them. This potentially makes it easier to write a bug about taking region constraints twice or never at all, but again, not many folks are touching this code.
|
|
Report allocation errors as panics
OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`.
This should be review one commit at a time:
- The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics.
- The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API.
ACP: https://github.com/rust-lang/libs-team/issues/192
Closes #51540
Closes #51245
|
|
Evaluate place expression in `PlaceMention`
https://github.com/rust-lang/rust/pull/102256 introduces a `PlaceMention(place)` MIR statement which keep trace of `let _ = place` statements from surface rust, but without semantics.
This PR proposes to change the behaviour of `let _ =` patterns with respect to the borrow-checker to verify that the bound place is live.
Specifically, consider this code:
```rust
let _ = {
let a = 5;
&a
};
```
This passes borrowck without error on stable. Meanwhile, replacing `_` by `_: _` or `_p` errors with "error[E0597]: `a` does not live long enough", [see playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c448d25a7c205dc95a0967fe96bccce8).
This PR *does not* change how `_` patterns behave with respect to initializedness: it remains ok to bind a moved-from place to `_`.
The relevant test is `tests/ui/borrowck/let_underscore_temporary.rs`. Crater check found no regression.
For consistency, this PR changes miri to evaluate the place found in `PlaceMention`, and report eventual dangling pointers found within it.
r? `@RalfJung`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|