-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
lazy_type_alias: causes error no nominal type found for inherent implementation
#114216
Labels
C-bug
Category: This is a bug.
F-lazy_type_alias
`#![feature(lazy_type_alias)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added
C-bug
Category: This is a bug.
F-lazy_type_alias
`#![feature(lazy_type_alias)]`
labels
Jul 29, 2023
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jul 29, 2023
compiler-errors
added
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Jul 29, 2023
#![feature(lazy_type_alias)]
pub struct FooA;
pub type FooJ = FooA;
impl FooJ {} |
compiler-errors
removed
the
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
label
Jul 29, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 17, 2024
Properly deal with weak alias types as self types of impls Fixes rust-lang#114216. Fixes rust-lang#116100. Not super happy about the two ad hoc “normalization” implementations for weak alias types: 1. In `inherent_impls`: The “peeling”, normalization to [“WHNF”][whnf]: Semantically that's exactly what we want (neither proper normalization nor shallow normalization would be correct here). Basically a weak alias type is “nominal” (well...^^) if the WHNF is nominal. [rust-lang#97974](rust-lang#97974) followed the same approach. 2. In `constrained_generic_params`: Generic parameters are constrained by a weak alias type if the corresp. “normalized” type constrains them (where we only normalize *weak* alias types not arbitrary ones). Weak alias types are injective if the corresp. “normalized” type is injective. Both have ad hoc overflow detection mechanisms. **Coherence** is handled in rust-lang#117164. r? `@oli-obk` or types [whnf]: https://en.wikipedia.org/wiki/Lambda_calculus_definition#Weak_head_normal_form
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-lazy_type_alias
`#![feature(lazy_type_alias)]`
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
tests/rustdoc/deref/deref-typedef.rs
without `-Zcrate-attr=feature(lazy_type_alias)´: no warnings
with
-Zcrate-attr=feature(lazy_type_alias)
:The text was updated successfully, but these errors were encountered: