- 18 6月, 2022 1 次提交
-
-
由 Joshua Nelson 提交于
This was surprisingly complicated. The main changes are: 1. Invert the order of iteration in `StepDescription::run`. Previously, it did something like: ```python for path in paths: for (step, should_run) in should_runs: if let Some(set) = should_run.pathset_for_path(path): step.run(builder, set) ``` That worked ok for individual paths, but didn't allow passing more than one path at a time to `Step::run` (since `pathset_for_paths` only had one path available to it). Change it to instead look at the intersection of `paths` and `should_run.paths`: ```python for (step, should_run) in should_runs: if let Some(set) = should_run.pathset_for_paths(paths): step.run(builder, set) ``` 2. Change `pathset_for_path` to take multiple pathsets. The goal is to avoid `x test library/alloc` testing *all* library crates, instead of just alloc. The changes here are similarly subtle, to use the intersection between the paths rather than all paths in `should_run.paths`. I added a test for the behavior to try and make it more clear. Note that we use pathsets instead of just paths to allow for sets with multiple aliases (*cough* `all_krates` *cough*). See the documentation added in the next commit for more detail. 3. Change `StepDescription::run` to explicitly handle 0 paths. Before this was implicitly handled by the `for` loop, which just didn't excute when there were no paths. Now it needs a check, to avoid trying to run all steps (this is a problem for steps that use `default_condition`). 4. Change `RunDescription` to have a list of pathsets, rather than a single path. 5. Remove paths as they're matched This allows checking at the end that no invalid paths are left over. Note that if two steps matched the same path, this will no longer run both; but that's a bug anyway. 6. Handle suite paths separately from regular sets. Running multiple suite paths at once instead of in separate `make_run` invocations is both tricky and not particularly useful. The respective test Steps already handle this by introspecting the original paths. Avoid having to deal with it by moving suite handling into a seperate loop than `PathSet::Set` checks.
-
- 17 6月, 2022 12 次提交
-
-
由 bors 提交于
Split up `Definitions` and `ResolverAstLowering`. Split off https://github.com/rust-lang/rust/pull/95573 r? `@michaelwoerister`
-
由 bors 提交于
`BitSet` related perf improvements This commit makes two changes: 1. Changes `MaybeLiveLocals` to use `ChunkedBitSet` 2. Overrides the `fold` method for the iterator for `ChunkedBitSet` I have local benchmarks verifying that each of these changes individually yield significant perf improvements to #96451 . I'm hoping this will be true outside of that context too. If that is not the case, I'll try to gate things on where they help as needed r? `@nnethercote` who I believe was working on closely related things, cc `@tmiasko` because of the destprop pr
-
由 bors 提交于
Add `#[inline]` to small fns of futex `RwLock` The important methods like `read` and `write` were already inlined, which can propagate all the way to inlining in user code, but these small state functions were left behind as normal calls. They should almost always be inlined as well, as they're just a few instructions.
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97377 (Do not suggest adding semicolon/changing delimiters for macros in item position that originates in macros) - #97675 (Make `std::mem::needs_drop` accept `?Sized`) - #98118 (Test NLL fix of bad lifetime inference for reference captured in closure.) - #98166 (Add rustdoc-json regression test for #98009) - #98169 (Keyword docs: Link to wikipedia article for dynamic dispatch) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Yuki Okushi 提交于
Keyword docs: Link to wikipedia article for dynamic dispatch
-
由 Yuki Okushi 提交于
Add rustdoc-json regression test for #98009 Fixes #98009. There was apparently nothing to be done... cc `@matthiaskrgr` r? `@notriddle`
-
由 Yuki Okushi 提交于
Test NLL fix of bad lifetime inference for reference captured in closure. This came up as a use-case for `thread::scope` API that only compiles successfully since `feature(nll)` got stabilized recently. Closes #93203 which had been re-opened for tracking this very test case to be added.
-
由 Yuki Okushi 提交于
Make `std::mem::needs_drop` accept `?Sized` This change attempts to make `needs_drop` work with types like `[u8]` and `str`. This enables code in types like `Arc<T>` that was not possible before, such as https://github.com/rust-lang/rust/pull/97676.
-
由 Yuki Okushi 提交于
Do not suggest adding semicolon/changing delimiters for macros in item position that originates in macros Fixes #91800.
-
由 bors 提交于
Compile `unicode-normalization` faster Various optimizations and cleanups aimed at improving compilation of `unicode-normalization`, which is notable for having several very large `match`es with many char ranges. Best reviewed one commit at a time. r? `@oli-obk`
-
由 bors 提交于
Update Clippy r? `@Manishearth`
-
- 16 6月, 2022 27 次提交
-
-
由 flip1995 提交于
-
由 flip1995 提交于
-
由 pierwill 提交于
-
由 flip1995 提交于
-
由 flip1995 提交于
-
由 bors 提交于
Build mdbook in remark workflow r? `@xFrednet` Supersedes #8959 changelog: none
-
由 Guillaume Gomez 提交于
-
由 flip1995 提交于
This is just to ensure that the book builds all time to not get in trouble when syncing with rust-lang/rust
-
由 bors 提交于
Improve the tuple and unit trait docs * Reduce duplicate impls; show only the `(T,)` and include a sentence saying that there exists ones up to twelve of them. * Show `Copy` and `Clone`. * Show auto traits like `Send` and `Sync`, and blanket impls like `Any`. Here's the new version: * <https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html> * <https://notriddle.com/notriddle-rustdoc-test/std/primitive.unit.html>
-
由 bors 提交于
Rollup of 4 pull requests Successful merges: - #97757 (Support lint expectations for `--force-warn` lints (RFC 2383)) - #98125 (Entry and_modify doc) - #98137 (debuginfo: Fix NatVis for Rc and Arc with unsized pointees.) - #98147 (Make #[cfg(bootstrap)] not error in proc macros on later stages ) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
Make #[cfg(bootstrap)] not error in proc macros on later stages As was discovered in https://github.com/rust-lang/rust/pull/93628#issuecomment-1154697627, adding #[cfg(bootstrap)] to a rust-internal proc macro crate would yield an unexpected cfg name error, at least on later stages wher the bootstrap cfg arg wasn't set. rustc already passes arguments to mark bootstrap as expected, however the means of delivery through the RUSTFLAGS env var is unable to reach proc macro crates, as described in the issue linked in the code this commit touches. This wouldn't be an issue for cfg args that get passed through RUSTFLAGS, as they would never become *active* either, so any usage of one of these flags in a proc macro's code would legitimately yield a lint warning. But since dc302587, rust takes extra measures to pass --cfg=bootstrap even in proc macros, by passing it via the wrapper. Thus, we need to send the flags to mark bootstrap as expected also from the wrapper, so that #[cfg(bootstrap)] also works from proc macros. I want to thank `Urgau` and `jplatte` for helping me find the cause of this.
❤ -
由 Matthias Krüger 提交于
debuginfo: Fix NatVis for Rc and Arc with unsized pointees. Currently, the NatVis for `Rc<T>` and `Arc<T>` does not support unsized `T`. For both `Rc<T>` and `Rc<dyn SomeTrait>` the visualizers fail: ```txt [Reference count] : -> must be used on pointers and . on structures [Weak reference count] : -> must be used on pointers and . on structures ``` This PR fixes the visualizers. For slices we can even give show the elements, so one now gets something like: ```txt slice_rc : { len=3 } [Length] : 3 [Reference count] : 41 [Weak reference count] : 2 [0] : 1 [1] : 2 [2] : 3 ``` r? `@wesleywiser`
-
由 Matthias Krüger 提交于
Entry and_modify doc This PR modifies the documentation for [HashMap](https://doc.rust-lang.org/std/collections/struct.HashMap.html#) and [BTreeMap](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#) by introducing examples for `and_modify`. `and_modify` is a function that tends to give more idiomatic rust code when dealing with these data structures -- yet it lacked examples and was hidden away. This PR adds that and addresses #98122. I've made some choices which I tried to explain in my commits. This is my first time contributing to rust, so hopefully, I made the right choices.
-
由 Matthias Krüger 提交于
Support lint expectations for `--force-warn` lints (RFC 2383) Rustc has a `--force-warn` flag, which overrides lint level attributes and forces the diagnostics to always be warn. This means, that for lint expectations, the diagnostic can't be suppressed as usual. This also means that the expectation would not be fulfilled, even if a lint had been triggered in the expected scope. This PR now also tracks the expectation ID in the `ForceWarn` level. I've also made some minor adjustments, to possibly catch more bugs and make the whole implementation more robust. This will probably conflict with https://github.com/rust-lang/rust/pull/97718. That PR should ideally be reviewed and merged first. The conflict itself will be trivial to fix. --- r? `@wesleywiser` cc: `@flip1995` since you've helped with the initial review and also discussed this topic with me.
🙃 Follow-up of: https://github.com/rust-lang/rust/pull/87835 Issue: https://github.com/rust-lang/rust/issues/85549 Yeah, and that's it. -
由 Nicholas Nethercote 提交于
This simplifies things, but requires making `CacheEncoder` non-generic. (This was previously merged as commit 4 in #94732 and then was reverted in #97905 because it caused a perf regression.)
-
由 xFrednet 提交于
-
由 bors 提交于
Rustdoc: Fix stab disappearing and exclude cfg "doc" and "doctest" Fixes #98065 Context: https://github.com/rust-lang/rust/issues/43781#issuecomment-1154226733 r? `@GuillaumeGomez`
-
由 Chayim Refael Friedman 提交于
Do not suggest adding semicolon/changing delimiters for macros in item position that originates in macros
-
由 bors 提交于
BTreeMap: Support custom allocators (v1.5) Related: https://github.com/rust-lang/wg-allocators/issues/7 https://github.com/TimDiekmann/alloc-wg Blocked on: ~~#77187~~ ~~#78459~~ ~~#95036~~ previous: #77438
-
由 Nicholas Nethercote 提交于
This commit removes the `a == b` early return, which isn't useful in practice, and replaces it with one that helps matches with many ranges, including char ranges.
-
由 Nicholas Nethercote 提交于
Because these evaluations can never fail.
-
由 Nicholas Nethercote 提交于
It's now only used in no-longer-interesting assertion.
-
由 Nicholas Nethercote 提交于
The code is clearer and simpler without it. Note that the `a == b` early return at the top of the function means the `a == b` test at the end of the function could never succeed.
-
由 Nicholas Nethercote 提交于
-
由 Nicholas Nethercote 提交于
A direct comparison has the same effect. This also avoids the need for a type test within `compare_const_vals`.
-
由 Nicholas Nethercote 提交于
Because they're always equal.
-