-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #118768
Rollup of 8 pull requests #118768
Commits on Dec 8, 2023
-
Extend tidy alphabetical checking to
tests/
.This is desired for rust-lang#118702.
Configuration menu - View commit details
-
Copy full SHA for 5d16c54 - Browse repository at this point
Copy the full SHA 5d16c54View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2d742c - Browse repository at this point
Copy the full SHA d2d742cView commit details -
coverage: Add
CoverageKind::SpanMarker
for including extra spans in…… MIR There are cases where coverage instrumentation wants to show a span for some syntax element, but there is no MIR node that naturally carries that span, so the instrumentor can't see it. MIR building can now use this new kind of coverage statement to deliberately include those spans in MIR, attached to a dummy statement that has no other effect.
Configuration menu - View commit details
-
Copy full SHA for 44b47aa - Browse repository at this point
Copy the full SHA 44b47aaView commit details -
coverage: Use
SpanMarker
to markcontinue
expressions.This replaces the previous workaround, which was to inject a dummy `Assign` statement.
Configuration menu - View commit details
-
Copy full SHA for 9816635 - Browse repository at this point
Copy the full SHA 9816635View commit details -
coverage: Use
SpanMarker
to mark the full condition ofif !
When MIR is built for an if-not expression, the `!` part of the condition doesn't correspond to any MIR statement, so coverage instrumentation normally can't see it. We can fix that by deliberately injecting a dummy statement whose sole purpose is to associate that span with its enclosing block.
Configuration menu - View commit details
-
Copy full SHA for d90fd02 - Browse repository at this point
Copy the full SHA d90fd02View commit details -
Configuration menu - View commit details
-
Copy full SHA for e0cd805 - Browse repository at this point
Copy the full SHA e0cd805View commit details -
coverage: Add
#[track_caller]
to the span generator's unwrap methodsThis should make it easier to investigate unwrap failures in bug reports.
Configuration menu - View commit details
-
Copy full SHA for cec8142 - Browse repository at this point
Copy the full SHA cec8142View commit details -
Configuration menu - View commit details
-
Copy full SHA for e01338a - Browse repository at this point
Copy the full SHA e01338aView commit details -
update target feature following LLVM API change
LLVM commit llvm/llvm-project@e817966 renamed the `unaligned-scalar-mem` target feature to `fast-unaligned-access`.
Configuration menu - View commit details
-
Copy full SHA for b378059 - Browse repository at this point
Copy the full SHA b378059View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f0c6f1 - Browse repository at this point
Copy the full SHA 9f0c6f1View commit details -
use magenta instead of bold for highlighting
according to a poll of gay people in my phone, purple is the most popular color to use for highlighting | color | percentage | | ---------- | ---------- | | bold white | 6% | | blue | 14% | | cyan | 26% | | purple | 37% | | magenta | 17% | unfortunately, purple is not supported by 16-color terminals, which rustc apparently wants to support for some reason. until we require support for full 256-color terms (e.g. by doing the same feature detection as we currently do for urls), we can't use it. instead, i have collapsed the purple votes into magenta on the theory that they're close, and also because magenta is pretty.
Configuration menu - View commit details
-
Copy full SHA for 96b027f - Browse repository at this point
Copy the full SHA 96b027fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 287c77e - Browse repository at this point
Copy the full SHA 287c77eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8361a72 - Browse repository at this point
Copy the full SHA 8361a72View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5dcd85 - Browse repository at this point
Copy the full SHA d5dcd85View commit details -
Configuration menu - View commit details
-
Copy full SHA for 384a49e - Browse repository at this point
Copy the full SHA 384a49eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e987812 - Browse repository at this point
Copy the full SHA e987812View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7079adb - Browse repository at this point
Copy the full SHA 7079adbView commit details
Commits on Dec 9, 2023
-
Rollup merge of rust-lang#118198 - Zalathar:if-not, r=cjgillot
coverage: Use `SpanMarker` to improve coverage spans for `if !` expressions Coverage instrumentation works by extracting source code spans from MIR. However, some kinds of syntax are effectively erased during MIR building, so their spans don't necessarily exist anywhere in MIR, making them invisible to the coverage instrumentor (unless we resort to various heuristics and hacks to recover them). This PR introduces `CoverageKind::SpanMarker`, which is a new variant of `StatementKind::Coverage`. Its sole purpose is to represent spans that would otherwise not appear in MIR, so that the coverage instrumentor can extract them. When coverage is enabled, the MIR builder can insert these dummy statements as needed, to improve the accuracy of spans used by coverage mappings. Fixes rust-lang#115468. --- ``@rustbot`` label +A-code-coverage
Configuration menu - View commit details
-
Copy full SHA for 8ce6c4a - Browse repository at this point
Copy the full SHA 8ce6c4aView commit details -
Rollup merge of rust-lang#118512 - spastorino:add-implied-bounds-rela…
…ted-tests, r=jackh726 Add tests related to normalization in implied bounds Getting ``@aliemjay's`` tests from rust-lang#109763, so we can better track what's going on in every different example. r? ``@jackh726``
Configuration menu - View commit details
-
Copy full SHA for 720bcf0 - Browse repository at this point
Copy the full SHA 720bcf0View commit details -
Rollup merge of rust-lang#118610 - krasimirgg:llvm-18-dec, r=nikic
update target feature following LLVM API change LLVM commit llvm/llvm-project@e817966 renamed* the `unaligned-scalar-mem` target feature to `fast-unaligned-access`. (*) technically the commit folded two previous features into one, but there are no references to the other one in rust.
Configuration menu - View commit details
-
Copy full SHA for 34273dd - Browse repository at this point
Copy the full SHA 34273ddView commit details -
Rollup merge of rust-lang#118666 - Zalathar:body-closure, r=cjgillot
coverage: Simplify the heuristic for ignoring `async fn` return spans The code for extracting coverage spans from MIR has a special heuristic for dealing with `async fn`, so that the function's closing brace does not have a confusing double count. The code implementing that heuristic is currently mixed in with the code for flushing remaining spans after the main refinement loop, making the refinement code harder to understand. We can solve that by hoisting the heuristic to an earlier stage, after the spans have been extracted and sorted but before they have been processed by the refinement loop. The coverage tests verify that the heuristic is still effective, so coverage mappings/reports for `async fn` have not changed. --- This PR also has the side-effect of fixing the `None some_prev` panic that started appearing after rust-lang#118525. The old code assumed that `prev` would always be present after the refinement loop. That was only true if the list of collected spans was non-empty, but prior to rust-lang#118525 that didn't seem to come up in practice. After that change, the list of collected spans could be empty in some specific circumstances, leading to panics. The new code uses an `if let` to inspect `prev`, which correctly does nothing if there is no span present.
Configuration menu - View commit details
-
Copy full SHA for bf703f6 - Browse repository at this point
Copy the full SHA bf703f6View commit details -
Rollup merge of rust-lang#118737 - nnethercote:tidy-alphabetical-in-t…
…estsa, r=Nilstrieb Extend tidy alphabetical checking to `tests/`. This is desired for rust-lang#118702. r? ``@Nilstrieb``
Configuration menu - View commit details
-
Copy full SHA for e2b4ba9 - Browse repository at this point
Copy the full SHA e2b4ba9View commit details -
Rollup merge of rust-lang#118756 - jyn514:colors, r=estebank
use bold magenta instead of bold white for highlighting according to a poll of gay people in my phone, purple is the most popular color to use for highlighting | color | percentage | | ---------- | ---------- | | bold white | 6% | | blue | 14% | | cyan | 26% | | purple | 37% | | magenta | 17% | unfortunately, purple is not supported by 16-color terminals, which rustc apparently wants to support for some reason. until we require support for full 256-color terms (e.g. by doing the same feature detection as we currently do for urls), we can't use it. instead, i have collapsed the purple votes into magenta on the theory that they're close, and also because magenta is pretty. before: ![image](https://github.com/rust-lang/rust/assets/23638587/9a89eee2-8b89-422e-8554-812827bb2a23) after: ![image](https://github.com/rust-lang/rust/assets/23638587/5bf3a917-8a20-4afd-af3e-f9491d0d57f5) other colors for comparison: blue: ![image](https://github.com/rust-lang/rust/assets/23638587/6f199c7b-d598-4009-8ffc-6b7b1d0d1f8c) cyan: ![image](https://github.com/rust-lang/rust/assets/23638587/a77e4fe3-563e-4aa5-ae92-745bb67287d1) purple: ![image](https://github.com/rust-lang/rust/assets/23638587/ffe603fb-d811-4106-95a9-4dd4c955924c) magenta without bolding: ![image](https://github.com/rust-lang/rust/assets/23638587/cf927e5f-8b25-4dc2-b8e7-32905a11a459) r? ``@estebank``
Configuration menu - View commit details
-
Copy full SHA for ebd1b6b - Browse repository at this point
Copy the full SHA ebd1b6bView commit details -
Rollup merge of rust-lang#118762 - compiler-errors:gen-nits, r=eholk
Some more minor `async gen`-related nits Tiny tweaks found after `async gen` pr landed r? eholk
Configuration menu - View commit details
-
Copy full SHA for 5b720b4 - Browse repository at this point
Copy the full SHA 5b720b4View commit details -
Rollup merge of rust-lang#118764 - compiler-errors:fused-async-iterat…
…or, r=eholk Make async generators fused by default I actually changed my mind about this since the implementation PR landed. I think it's beneficial for `async gen` blocks to be "fused" by default -- i.e., for them to repeatedly return `Poll::Ready(None)` -- rather than panic. We have [`FusedStream`](https://docs.rs/futures/latest/futures/stream/trait.FusedStream.html) in futures-rs to represent streams with this capability already anyways. r? eholk cc ``@rust-lang/wg-async,`` would like to know if anyone else has opinions about this.
Configuration menu - View commit details
-
Copy full SHA for 8230fd5 - Browse repository at this point
Copy the full SHA 8230fd5View commit details