-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat: add type aliases #110
Comments
Hey, |
Yes there was previously a case where this was needed. But that was no longer the case so this has much lower priority. |
I have a question about mun-lang syntax. Should type aliases be definable in a block? type OtherTypename = i32;
type Typename = OtherTypename;
fn main() {
let a: Typename = 10
} Example2: type OtherTypeName = i32;
fn main() {
type Typename = OtherTypeName; // <- Does mun-lang expect this?
let a: Typename = 10;
} |
Yes, Rust supports this and my expectation for Mun was to mimick this. |
@Wodann rust-analyzer does not yet support Example2.
rust-lang/rust-analyzer#1165 |
Definitely! We prefer smaller increments. |
We want to introduce type aliases, as follows:
In large, this change builds on existing architecture, but it will require work in several places of our stack:
type
keyword (src, example)type TypeName = OtherTypeName
(example#1, example#2)Good first issue process:
If this is your first PR, welcome 🎉 😄
The text was updated successfully, but these errors were encountered: