-
Notifications
You must be signed in to change notification settings - Fork 52
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
const fn
doesn't work
#84
Comments
I can try adding a top-level |
also there are some problems with struct Foo {
s: Option<String>,
}
impl Foo {
const fn new() -> Self {
Self { s: None }
}
const fn s(mut self, s: String) -> Self {
self.s = Some(s); //error[E0493]: destructor of `Option<String>` cannot be evaluated at compile-time
self
}
} |
I don't think that'd be a problem. Typed builder's setters do not override fields, so they don't need to invoke destructors. |
Due to the way I parse things, it's going to have to be |
Problem - I can't implement this until const traits get stabilized (rust-lang/rust#67792) The issue is that I'm using traits in the |
The text was updated successfully, but these errors were encountered: