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

Enum Type #2346

Closed
kgtkr opened this issue Feb 23, 2018 · 5 comments
Closed

Enum Type #2346

kgtkr opened this issue Feb 23, 2018 · 5 comments
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.

Comments

@kgtkr
Copy link

kgtkr commented Feb 23, 2018

example

let x:Option::Some<i32>=Some(1);
pub struct A<T:Option<i32>>{
  x:T
}

impl A<Some<i32>>{
  pub fn get_x(&self)->i32{
    let Some<x>=self.x;
    x
  }
}
@Centril Centril added the T-lang Relevant to the language team, which will review and decide on the RFC. label Feb 23, 2018
@Centril
Copy link
Contributor

Centril commented Feb 23, 2018

From this example, this seems to me some sort of lifting of enums into traits and their variants into types.

It is an interesting idea, but it is better discussed over at internals.rust-lang.org which is more actively looked at. This repository should mainly be used to file full RFCs according to the template as PRs. The issues filed here are not actively looked at by the teams.

@petrochenkov
Copy link
Contributor

This is a duplicate of RFC 1450 "Types for enum variants", so I'm going to close it in favor of #2347.

@petrochenkov
Copy link
Contributor

@Centril

The issues filed here are not actively looked at by the teams.

Hey, you are from teams, I'm from teams and we are actively looking at issues in this repo!

@Centril
Copy link
Contributor

Centril commented Feb 23, 2018

@petrochenkov yes yes 😆 , I was referring to:

You may file issues on this repo for discussion, but these are not actively looked at by the teams.

https://github.com/rust-lang/rfcs/blob/master/README.md#before-creating-an-rfc

@kgtkr
Copy link
Author

kgtkr commented Feb 23, 2018

OK&Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

3 participants