-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 #138760
Rollup of 8 pull requests #138760
Conversation
We had a discussion[1] today about whether postfix yield would make sense. It's easy enough to support both in the parser, so we might as well have both and see how people use it while the feature is experimental. [1]: https://rust-lang.zulipchat.com/#narrow/channel/481571-t-lang.2Fgen/topic/postfix-yield/with/505231568
This involved fixing the span when parsing .yield
Co-authored-by: Travis Cross <[email protected]>
Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`. - If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type. - If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs. This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases. Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in rust-lang#138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing.
Signed-off-by: xizheyin <[email protected]>
This is currently unused, but paves the way for future work on expansion regions without having to worry about the FFI parts.
For expansion region support, we will want to be able to convert and check spans before creating a corresponding local file ID. If we create local file IDs eagerly, but some expansion turns out to have no successfully-converted spans, LLVM will complain about that expansion's file ID having no regions.
Because it's way too easy to confuse that versus trying to ping WG-llvm. And AFAIK, icebreakers-llvm isn't really used in a good while.
Add support for postfix yield expressions We've been having a discussion about whether we want postfix yield, or want to stick with prefix yield, or have both. I figured it's easy enough to support both for now and let us play around with them while the feature is still experimental. This PR treats `yield x` and `x.yield` as semantically equivalent. There was a suggestion to make `yield x` have a `()` type (so it only works in coroutines with `Resume = ()`. I think that'd be worth trying, either in a later PR, or before this one merges, depending on people's opinions. rust-lang#43122
…owered-param-names, r=compiler-errors Use `Option<Ident>` for lowered param names. Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`. - If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type. - If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs. This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases. Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in rust-lang#138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing. r? ```@compiler-errors```
Suggest `-Whelp` when pass `--print lints` to rustc Closes rust-lang#138612
…mease Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType` The ordering of ty var unification means that we may end up with a root variable whose ty var origin is from another item's params. Let's not rely on this by just unifying the infer vars with the params of the impl + resolving. It's kinda goofy but it's clearer IMO. Fixes rust-lang#132826. r? ``@fmease`` or ``@lcnr``
Clean up `FnCtxt::resolve_coroutine_interiors` Random cleanups before I make a PR that stalls generator obligations. r? lcnr
coverage: Add LLVM plumbing for expansion regions This is currently unused, but paves the way for future work on expansion regions without having to worry about the FFI parts. The span conversion refactoring is only loosely related, but I've included it here because it would conflict with the main changes in `fill_region_tables`, and is pretty straightforward on its own.
Use `def_path_str` for def id arg in `UnsupportedOpInfo` We could alternatively just omit the def path from the label, but I think it's fine to keep around Fixes rust-lang#138730
Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group Because it's way too easy to confuse LLVM Icebreakers ping group versus trying to ping WG-llvm. And AFAIK, icebreakers-llvm isn't really used in a good while. I also fixed the rustc-dev-guide docs about ```@rustbot`` ping llvm` (and changed that to the raw ping group name ```@rustbot`` icebreakers-llvm`) because it's very confusing. Previously discussed in [#t-compiler/wg-llvm > Ping group renaming](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fwg-llvm/topic/Ping.20group.20renaming/with/453005029). FYI ``@rust-lang/wg-llvm`` FYI ``@RalfJung`` (since you asked in rust-lang#138120 (comment)) r? ``@nikic`` (or wg-llvm)
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing eda7820 (parent) -> 01dc45c (this PR) Test differencesShow 32888 test diffs
(and 16356 additional test diffs) Additionally, 16432 doctest diffs were found. These are ignored, as they are noisy. Job group index
|
Finished benchmarking commit (01dc45c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 3.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 774.102s -> 774.81s (0.09%) |
Successful merges:
Option<Ident>
for lowered param names. #138685 (UseOption<Ident>
for lowered param names.)-Whelp
when pass--print lints
to rustc #138700 (Suggest-Whelp
when pass--print lints
to rustc)type_var_origin
inOrphanCheckErr::NonLocalInputType
#138727 (Do not rely ontype_var_origin
inOrphanCheckErr::NonLocalInputType
)FnCtxt::resolve_coroutine_interiors
#138729 (Clean upFnCtxt::resolve_coroutine_interiors
)def_path_str
for def id arg inUnsupportedOpInfo
#138732 (Usedef_path_str
for def id arg inUnsupportedOpInfo
)llvm
andllvms
triagebot ping aliases foricebreakers-llvm
ping group #138735 (Removellvm
andllvms
triagebot ping aliases foricebreakers-llvm
ping group)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup