Skip to content
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 9 pull requests #90712

Closed
wants to merge 27 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Meziu and others added 27 commits November 2, 2021 08:44
In most cases it is handled in the same way as closures.
Add comments regarding superfluous `!Sync` impls
Type inference for inline consts

Fixes rust-lang#78132
Fixes rust-lang#78174
Fixes rust-lang#81857
Fixes rust-lang#89964

Perform type checking/inference of inline consts in the same context as the outer def, similar to what is currently done to closure.

Doing so would require `closure_base_def_id` of the inline const to return the outer def, and since `closure_base_def_id` can be called on non-local crate (and thus have no HIR available), a new `DefKind` is created for inline consts.

The type of the generated anon const can capture lifetime of outer def, so we couldn't just use the typeck result as the type of the inline const's def. Closure has a similar issue, and it uses extra type params `CK, CS, U` to capture closure kind, input/output signature and upvars. I use a similar approach for inline consts, letting it have an extra type param `R`, and then `typeof(InlineConst<[paremt generics], R>)` would just be `R`. In borrowck region requirements are also propagated to the outer MIR body just like it's currently done for closure.

With this PR, inline consts in expression position are quitely usable now; however the usage in pattern position is still incomplete -- since those does not remain in the MIR borrowck couldn't verify the lifetime there. I have left an ignored test as a FIXME.

Some disucssions can be found on [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/inline.20consts.20typeck).
cc ```@spastorino``` ```@lcnr```
r? ```@nikomatsakis```

```@rustbot``` label A-inference F-inline_const T-compiler
ARMv6K Horizon OS panic change

After a small change to `backtrace-rs` ([rust-lang#448](rust-lang/backtrace-rs#448)), `PanicStrategy::Unwind` is now fully supported.
add const generics test

cc rust-lang#89829 (comment)

r? rust-lang/project-const-generics
…Simulacrum

treat illumos like solaris in failing ui tests which need it

Just adding the right cfg target for tests which fail because they don't know illumos is a thing.

(cc ```@jclulow)```
…yn514

use filter(|x| matches!(..)) instead of filter_map(|x| match x ... => Some(xy))
…emoved, r=jyn514

Fix bug with `#[doc]` string single-character last lines

Fixes rust-lang#90618.

This is because `.iter().all(|c| c == '*')` returns `true` if there is no character checked. And in case the last line has only one character, it simply returns `true`, making the last line behind removed.
…=lnicola

⬆️ rust-analyzer

r? ```@ghost```
Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message

Fixes rust-lang#90615
@rustbot rustbot added the rollup A PR which is a rollup label Nov 8, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Nov 8, 2021

📌 Commit fb94698 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 8, 2021
@matthiaskrgr matthiaskrgr deleted the rollup-739z2jv branch November 20, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.