| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
HirId-ify intravisit
A big step towards https://github.com/rust-lang/rust/pull/57578.
This affects mostly `hir::{collector, intravisit}` and `rustc::lint`.
|
|
Update parking_lot to 0.7
Unfortunately this'll dupe parking_lot until the data_structures crate
is published and be updated in rls in conjunction with crossbeam-channel
|
|
Update cargo
5 commits in b33ce7fc9092962b0657b4c25354984b5e5c47e4..5c6aa46e6f28661270979696e7b4c2f0dff8628f
2019-02-19 18:42:50 +0000 to 2019-02-22 19:32:35 +0000
- convert unused doc comments to regular comments (rust-lang/cargo#6692)
- Add more about system library on whether to keep Cargo.lock (rust-lang/cargo#6685)
- Warn when excluding non-existing packages (rust-lang/cargo#6679)
- Incremental profile cleanup. (rust-lang/cargo#6688)
- Various cosmetic improvements (rust-lang/cargo#6687)
|
|
Rollup of 16 pull requests
Successful merges:
- #58100 (Transition librustdoc to Rust 2018)
- #58122 (RangeInclusive internal iteration performance improvement.)
- #58199 (Add better error message for partial move)
- #58227 (Updated RELEASES.md for 1.33.0)
- #58353 (Check the Self-type of inherent associated constants)
- #58453 (SGX target: fix panic = abort)
- #58476 (Remove `LazyTokenStream`.)
- #58526 (Special suggestion for illegal unicode curly quote pairs)
- #58595 (Turn duration consts into associated consts)
- #58609 (Allow Self::Module to be mutated.)
- #58628 (Optimise vec![false; N] to zero-alloc)
- #58643 (Don't generate minification variables if minification disabled)
- #58648 (Update tests to account for cross-platform testing and miri.)
- #58654 (Do not underflow after resetting unmatched braces count)
- #58658 (Add expected/provided byte alignments to validation error message)
- #58667 (Reduce Miri-related Code Repetition `like (n << amt) >> amt`)
Failed merges:
r? @ghost
|
|
r=alexcrichton
Added a connection timeout and speed threshold when downloading the Docker cache
This is an attempt to fix one possible cause of #56112. Similar to #52846, this changed the download docker-cache command to fail if it cannot connect or falls below 10 bytes/s after 30 seconds, so it could be retried sooner.
|
|
Reduce Miri-related Code Repetition `like (n << amt) >> amt`
This Pull Request fixes a part of [#49937](https://github.com/rust-lang/rust/issues/49937).
|
|
Add expected/provided byte alignments to validation error message
Fixes #58617
|
|
Do not underflow after resetting unmatched braces count
Fix #58638.
r? @oli-obk
|
|
Update tests to account for cross-platform testing and miri.
Fix #23926
|
|
Don't generate minification variables if minification disabled
If the minification is disabled, there is no sense having those variables.
r? @QuietMisdreavus
|
|
Optimise vec![false; N] to zero-alloc
Nowadays booleans have a well-defined representation, so there is no reason not to optimise their allocation.
|
|
Allow Self::Module to be mutated.
This only changes `&Self::Module` to `&mut Self::Module` in a couple of places.
`codegen_allocator` and `write_metadata` from `ExtraBackendMethods` mutate the underlying LLVM module. As such, it makes sense for these two functions to receive a mutable reference to the module (as opposed to an immutable one).
I am trying to implement `codegen_allocator` for my backend, and I need to be able to mutate `Self::Module`:
https://github.com/rust-lang/rust/blob/f66e4697ae286985ddefc53c3a047614568458bb/src/librustc_codegen_ssa/traits/backend.rs#L41
Modifying the module in `codegen_allocator`/`write_metadata` is not a problem for the LLVM backend, because [ModuleLlvm](https://github.com/rust-lang/rust/blob/master/src/librustc_codegen_llvm/lib.rs#L357) contains a raw pointer to the underlying LLVM module, so it can easily be mutated through FFI calls.
I am trying to avoid interior mutability and `unsafe` as much as I can. What do you think? Does this change make sense, or is there a reason why this should stay the way it is?
|
|
Turn duration consts into associated consts
As suggested in https://github.com/rust-lang/rust/issues/57391#issuecomment-459658236, I'm moving `Duration` constants (`SECOND`, `MILLISECOND` and so on; currently behind unstable `duration_constants` feature) into the `impl Duration` block.
cc @frewsxcv @SimonSapin
|
|
Special suggestion for illegal unicode curly quote pairs
Fixes #58436
Did not end up expanding the error message span to include the full string literal since I figured the start of the token was the issue, while the help suggestion span would include up to the closing quotation mark.
The look ahead logic does not affect the reader position, not sure if that is an issue (if eg it should still continue to parse after the closing quote without erroring out).
|
|
Remove `LazyTokenStream`.
`LazyTokenStream` was added in #40939. Perhaps it was an effective optimization then, but no longer. This PR removes it, making the code both simpler and faster.
r? @alexcrichton
|
|
SGX target: fix panic = abort
What is the difference between `no_mangle` and `rustc_std_internal_symbol`?
|
|
Check the Self-type of inherent associated constants
r? @arielb1
|
|
Add better error message for partial move
closes #56657
r? @davidtwco
|
|
RangeInclusive internal iteration performance improvement.
Specialize `Iterator::try_fold` and `DoubleEndedIterator::try_rfold` to improve code generation in all internal iteration scenarios.
This changes brings the performance of internal iteration with `RangeInclusive` on par with the performance of iteration with `Range`:
- Single conditional jump in hot loop,
- Unrolling and vectorization,
- And even Closed Form substitution.
Unfortunately, it only applies to internal iteration. Despite various attempts at stream-lining the implementation of `next` and `next_back`, LLVM has stubbornly refused to optimize external iteration appropriately, leaving me with a choice between:
- The current implementation, for which Closed Form substitution is performed, but which uses 2 conditional jumps in the hot loop when optimization fail.
- An implementation using a `is_done` boolean, which uses 1 conditional jump in the hot loop when optimization fail, allowing unrolling and vectorization, but for which Closed Form substitution fails.
In the absence of any conclusive evidence as to which usecase matters most, and with no assurance that the lack of Closed Form substitution is not indicative of other optimizations being foiled, there is no way
to pick one implementation over the other, and thus I defer to the statu quo as far as `next` and `next_back` are concerned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 17 pull requests
Successful merges:
- #57656 (Deprecate the unstable Vec::resize_default)
- #58059 (deprecate before_exec in favor of unsafe pre_exec)
- #58064 (override `VecDeque::try_rfold`, also update iterator)
- #58198 (Suggest removing parentheses surrounding lifetimes)
- #58431 (fix overlapping references in BTree)
- #58555 (Add a note about 2018e if someone uses `try {` in 2015e)
- #58588 (remove a bit of dead code)
- #58589 (cleanup macro after 2018 transition)
- #58591 (Dedup a rustdoc diagnostic construction)
- #58600 (fix small documentation typo)
- #58601 (Search for target_triple.json only if builtin target not found)
- #58606 (Docs: put Future trait into spotlight)
- #58607 (Fixes #58586: Make E0505 erronous example fail for the 2018 edition)
- #58615 (miri: explain why we use static alignment in ref-to-place conversion)
- #58620 (introduce benchmarks of BTreeSet.intersection)
- #58621 (Update miri links)
- #58632 (Make std feature list sorted)
Failed merges:
r? @ghost
|
|
|
|
Fix #58638.
|
|
|
|
AFAICT, we do not have the same const-eval issues that we used to when
rust-lang/rust#23926 was filed. (Probably because of the switch to
miri for const-evaluation.)
|
|
huge-array-simple.rs test.
(and now unignore the test since it shouldn't break tests of
cross-compiles anymore.)
|
|
Make std feature list sorted
This helps to avoid merge conflicts when concurrent PRs append features to the end of the list.
|
|
Update miri links
Miri has been moved to `rust-lang` a couple of days ago.
|
|
introduce benchmarks of BTreeSet.intersection
16 tests combining 4 kinds of contents with different sizes exposing edge cases.
The ones with asymmetric sizes are addressed by https://github.com/rust-lang/rust/pull/58577.
The pos_vs_neg cases seems (are were meant to be) the same as the neg_vs_pos case (same thing, reverse order) but reality shows a surprsing 25% difference.
|
|
miri: explain why we use static alignment in ref-to-place conversion
@eddyb @oli-obk do you think this makes sense? Or should we use the run-time alignment (`align_of_val`)? I am a bit worried about custom DSTs, but that affects way more areas of Miri so I'd ignore them for now.
r? @oli-obk
|
|
Fixes #58586: Make E0505 erronous example fail for the 2018 edition
The original example worked for 2015, but not the 2018 edition of Rust.
Borrowing the moved value after ownership is transferred seems required for 2018.
[this](https://github.com/rust-lang/rust/compare/rust-lang:f66e469...gurgalex:b2a02c8#diff-4ca866aea4a6efecd732f1975faaad88R1564) line though is correct for 2018, but not for the 2015 edition.
Fix #58586
|
|
Docs: put Future trait into spotlight
If a function returns a type that implements `Future`, there should be a small "i" symbol next to it indicating the return type implements an important trait.
|
|
Search for target_triple.json only if builtin target not found
Before this commit, if the builtin target was found, but an error
happened when instantiating it (e.g. validating the target
specification file failed, etc.), then we ignored those errors
and proceeded to try to find a `target_triple.json` file, and if
that failed, reported that as an error.
With this commit, if rustc is supposed to provide the builtin target,
and something fails while instantiating it, that error will
get properly propagated.
r? @oli-obk
|
|
fix small documentation typo
Thanks to @stjepang for catching my mistake.
|
|
r=GuillaumeGomez
Dedup a rustdoc diagnostic construction
None
|
|
cleanup macro after 2018 transition
We can now use `?`
|
|
remove a bit of dead code
[Six years](https://github.com/rust-lang/rust/commit/5dc5efefd47527067ab5b7862d89a99da4824f49) seem to be a long enough transition period :rofl:
|
|
Add a note about 2018e if someone uses `try {` in 2015e
Inspired by https://github.com/rust-lang/rust/issues/58491, where a `try_blocks` example was accidentally run in 2015, which of course produces a bunch of errors.
What's the philosophy about gating for this? The keyword is stably a keyword in 2018, so I haven't gated it for now but am not mentioning what the keyword _does_. Let me know if I should do differently.
Resolves #53672
|
|
fix overlapping references in BTree
This fixes two kinds of overlapping references in BTree (both found by running the BTree test suite in Miri).
In `into_slices_mut`, we did `k.into_key_slice_mut()` followed by `self.into_val_slice_mut()` (where `k` is a copy of `self`). Calling `into_val_slice_mut` calls `self.len()`, which creates a shared reference to `NodeHeader`, which unfortunately (due to padding) overlaps with the mutable reference returned by `into_key_slice_mut`. Hence the key slice got (partially) invalidated. The fix is to avoid creating an `&NodeHeader` after the first slice got created.
In the iterators, we used to first create the references that will be returned, and then perform the walk on the tree. Walking the tree creates references (such as `&mut InternalNode`) that overlap with all of the keys and values stored in a pointer; in particular, they overlap with the references the iterator will later return. This is fixed by reordering the operations of walking the tree and obtaining the inner references.
The test suite still passes (and it passes in Miri now!), but there is a lot of code here that I do not understand...
|