| Age | Commit message (Collapse) | Author | Lines |
|
Since the values for the fcntl constants can vary from architecture
to architecture, it is better to use the values defined in the libc
crate instead of assigning literals in the flock code which would
make the assumption that all architectures use the same values.
Fixes #57007
|
|
|
|
Inline tweaks
r? @michaelwoerister
|
|
|
|
Closes #41758
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Allow calling `const unsafe fn` in `const fn` behind a feature gate
cc #55607
r? @Centril
|
|
|
|
|
|
|
|
|
|
They're not strictly necessary, and they result in the `Vec` being
allocated even for the trivial (and common) case where a
`start_snapshot` is immediately followed by a `commit` or `rollback_to`.
|
|
This makes the two snapshot implementations more consistent with each
other and with crate `ena`.
|
|
Because they shouldn't be reused. This provides consistency with the
`ena` crate.
|
|
|
|
Because it's as useless as its name suggests.
This commit also renames `UndoLog::Noop` as `UndoLog::Purged`, because
(a) that's a more descriptive name and (b) it matches the name used in
similar code in `librustc/infer/region_constraints/mod.rs`.
|
|
This version has some significant speed-ups relating to snapshotting.
|
|
Ensure that the argument to `static_assert` is a `bool`
cc @eddyb
|
|
|
|
|
|
|
|
|
|
fix various typos in doc comments
|
|
|
|
This means it can be used by more crates.
|
|
refactor: use shorthand fields
refactor: use shorthand for single fields everywhere (excluding tests).
|
|
Make `process_obligations`' computation of `completed` optional.
It's only used in tests.
This reduces instruction counts on several benchmarks by 0.5--1%.
|
|
|
|
* Also update the bootstrap compiler
* Update cargo to 1.32.0
* Clean out stage0 annotations
|
|
It's only used in tests.
This reduces instruction counts on several benchmarks by 0.5--1%.
|
|
|
|
Stabilize impl_header_lifetime_elision in 2015
~~This is currently blocked on https://github.com/rust-lang/rust/issues/54902; it should be good after that~~
It's already stable in 2018; this finishes the stabilization.
FCP completed (https://github.com/rust-lang/rust/issues/15872#issuecomment-417953153), proposal (https://github.com/rust-lang/rust/issues/15872#issuecomment-412759783).
Tracking issue: https://github.com/rust-lang/rust/issues/15872
Usage examples (from libcore): https://github.com/rust-lang/rust/pull/54687
|
|
It's already stable in 2018; this finishes the stabilization.
|
|
|
|
|
|
|
|
Remove HybridBitSet::dummy
This simplifies some of the `HybridBitSet` code.
cc @nnethercote
|
|
|
|
This can be a big help when debugging the trait resolver.
|
|
Correct doc for WorkQueue<T>::pop().
The old function doc looks like copy-pasta from WorkQueue::insert().
WorkQueue::pop() does not enqueue nor does it return a boolean false. Doc corrected accordingly.
|
|
Add a per-tree error cache to the obligation forest
This implements part of what @nikomatsakis mentioned in https://github.com/rust-lang/rust/pull/30533#issuecomment-170705871:
> 1. If you find that a new obligation is a duplicate of one already in the tree, the proper processing is:
> * if that other location is your parent, you should abort with a cycle error (or accept it, if coinductive)
> * if that other location is not an ancestor, you can safely ignore the new obligation
In particular it implements the "if that other location is your parent accept it, if coinductive" part. This fixes #40827.
I have to say that I'm not 100% confident that this is rock solid. This is my first pull request :tada:, and I didn't know anything about the trait resolver before this. In particular I'm not totally sure that comparing predicates is enough (for instance, do we need to compare `param_env` as well?). Also, I'm not sure what @nikomatsakis mentions [here](https://github.com/rust-lang/rust/issues/30977#issue-127091096), but it might be something that affects this PR:
> In particular, I am wary of getting things wrong around inference variables! We can always add things to the set in their current state, and if unifications occur then the obligation is just kind of out-of-date, but I want to be sure we don't accidentally fail to notice that something is our ancestor. I decided this was subtle enough to merit its own PR.
Anyway, go ahead and review :slightly_smiling_face:.
Ref #30977.
# Performance
We are now copying vectors around, so I decided to do some benchmarking. A simple benchmark shows that this does not seem to affect performance in a measurable way:
I ran `cargo clean && cargo build` 20 times on actix-web (84b27db) and these are the results:
```text
rustc master:
Mean Std.Dev. Min Median Max
real 66.637 2.996 57.220 67.714 69.314
user 307.293 14.741 258.093 312.209 320.702
sys 12.524 0.653 10.499 12.726 13.193
rustc fix-bug-overflow-send:
Mean Std.Dev. Min Median Max
real 66.297 4.310 53.532 67.516 70.348
user 306.812 22.371 236.917 314.748 326.229
sys 12.757 0.952 9.671 13.125 13.544
```
I will do a more comprehensive benchmark (compiling rustc stage1) and post the results.
r? @nikomatsakis, @nnethercote
PS: It is better to review this commit-by-commit.
|
|
Fixes #40827.
|
|
|