| Age | Commit message (Collapse) | Author | Lines |
|
|
|
record fewer adjustment types in generator witnesses, avoid spurious drops in MIR construction
Don't record all intermediate adjustment types -- That's way more than is needed, and winds up recording types that will never appear in MIR.
Note: I'm like 90% sure that this logic is correct, but this stuff is subtle and can be hard to keep straight. However, the risk of this PR is fairly low -- if we miss types here, I believe the most common outcome is an ICE.
This fixes the original issue cited by #64477, but I'm leaving the issue open for now since there may be other cases we can detect and improve in a targeted way.
r? @Zoxc
|
|
When possible point at argument causing item obligation failure
Fix https://github.com/rust-lang/rust/issues/41781, fix https://github.com/rust-lang/rust/issues/42855, fix https://github.com/rust-lang/rust/issues/46658, fix https://github.com/rust-lang/rust/issues/48099, fix https://github.com/rust-lang/rust/issues/63143.
|
|
This is a big speed win for `keccak` and `inflate`.
|
|
Optimizing for the common numbers of entries in `stalled_on` wins about
4% on `keccak` and `inflate`.
|
|
|
|
|
|
|
|
Fix backticks in documentation
Fix a few typos in comments/documentation where backticks were doubled-up on one side.
|
|
fix Miri discriminant handling
This can be reviewed commit-by-commit fairly well.
The Miri side is at https://github.com/rust-lang/miri/pull/903.
Fixes https://github.com/rust-lang/rust/issues/62138
r? @eddyb @oli-obk
|
|
|
|
Currently, after a CALL terminator is created in MIR, we insert DROP
statements for all of its operands -- even though they were just moved
shortly before! These spurious drops are later removed, but not before
causing borrow check errors.
This PR series modifies the drop code to track operands that were
moved and avoid creating drops for them.
Right now, I'm only using this mechanism for calls, but it seems
likely it could be used in more places.
|
|
More `ObligationForest` improvements
Following on from #64500, these commits alsomake the code both nicer and faster.
r? @nikomatsakis
|
|
|
|
|
|
|
|
|
|
The super-hot call site of `inlined_shallow_resolve()` basically does
`r.inlined_shallow_resolve(ty) != ty`. This commit introduces a
version of that function specialized for that particular call pattern,
`shallow_resolve_changed()`. Incredibly, this reduces the instruction
count for `keccak` by 5%.
The commit also renames `inlined_shallow_resolve()` as
`shallow_resolve()` and removes the `inline(always)` annotation, as it's
no longer nearly so hot.
|
|
Amazingly enough, this is a 3.5% instruction count win on `keccak`.
|
|
rename Allocation::retag -> with_tags_and_extra
This is more consistent with `Pointer::with_tag`. Also, "retag" is a [term from Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md#retagging) with a [corresponding Machine hook](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/interpret/machine/trait.Machine.html#method.retag), and this function has nothing to do with that other use of the term.
r? @oli-obk
|
|
Rollup of 10 pull requests
Successful merges:
- #61626 (Get rid of special const intrinsic query in favour of `const_eval`)
- #64283 (Updated RELEASES.md for 1.38.0)
- #64394 (Shrink `SubregionOrigin`.)
- #64429 (Fix failure note `to_str` implementation)
- #64436 (improve Vec example soundness in mem::transmute docs)
- #64502 (avoid duplicate issues for Miri build failures)
- #64505 (Fix inconsistent link formatting)
- #64529 (Add an example to Pin::as_mut)
- #64541 (document Miri error categories)
- #64544 (build-manifest: re-add some comments)
Failed merges:
r? @ghost
|
|
document Miri error categories
r? @oli-obk
|
|
Shrink `SubregionOrigin`.
It's currently 120 bytes on x86-64, due to one oversized variant
(`Subtype`). This commit boxes `Subtype`'s contents, reducing the size
of `SubregionOrigin` to 32 bytes.
The change speeds things up by avoiding lots of `memcpy` calls, mostly
relating to `RegionConstraintData::constraints`, which is a `BTreeMap`
with `SubregionOrigin` values.
|
|
r=davidtwco
adjust desugaring for async fn to correct drop order
Old desugaring, given a user function body `{ $stmts; $expr }`
```
{
let $param_pattern0 = $raw_param0;
...
let $param_patternN = $raw_paramN;
$stmts;
$expr
}
```
New desugaring:
```
{
let $param_pattern0 = $raw_param0;
...
let $param_patternN = $raw_paramN;
drop-temps {
$stmts;
$expr
}
}
```
The drop-temps is an internal bit of HIR that drops temporaries from the resulting expression, but it should be equivalent to `return { $stmts; $expr }`.
Fixes #64512
Fixes #64391
|
|
|
|
This avoids concurrency-related bugs when locks are acquired for too
short a time and similar cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #64412
|
|
|
|
DropTemps(...) looks like a function, this looks like wacko special stuff
|
|
|
|
|
|
|
|
Tweak unsatisfied HRTB errors
r? @oli-obk
Close #35180.
|
|
|
|
update Miri
Fixes https://github.com/rust-lang/rust/issues/64363
r? @alexcrichton for the Cargo.toml changes: with byteorder 1.3, the `i128` feature is a NOP, so we can remove it everywhere and then get rid of this crate in the workspace-hack.
|
|
`AdtDef` is an algebraic data type, not abstract data type
r? @varkor
|
|
Old desugaring, given a user function body { $stmts; $expr }
```
{
let $param_pattern0 = $raw_param0;
...
let $param_patternN = $raw_paramN;
$stmts;
$expr
}
```
New desugaring:
```
{
let $param_pattern0 = $raw_param0;
...
let $param_patternN = $raw_paramN;
drop-temps {
$stmts;
$expr
}
}
```
The drop-temps is an internal bit of HIR that drops temporaries from
the resulting expression, but it should be equivalent to `return {
$stmts; $expr }`.
|
|
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #63955 (Make sure interned constants are immutable)
- #64028 (Stabilize `Vec::new` and `String::new` as `const fn`s)
- #64119 (ci: ensure all tool maintainers are assignable on issues)
- #64444 (fix building libstd without backtrace feature)
- #64446 (Fix build script sanitizer check.)
- #64451 (when Miri tests are not passing, do not add Miri component)
- #64467 (Hide diagnostics emitted during --cfg parsing)
- #64497 (Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given)
- #64499 (Use `Symbol` in two more functions.)
- #64504 (use println!() instead of println!(""))
Failed merges:
r? @ghost
|
|
Hide diagnostics emitted during --cfg parsing
The early error is more than sufficient for fixing the problem.
Fixes https://github.com/rust-lang/rust/issues/31496.
|
|
Pacify `tidy`. It's also more correct in this context.
|
|
Upgrade parking_lot and tempfile rustc dependencies
This should be last piece to unbreak `rustc` in https://github.com/rust-lang/rust/issues/63848
|
|
|