Skip to content

error: calls in constants are limited to constant functions, struct and enum constructors #29

Description

@Boscop

error: calls in constants are limited to constant functions, struct and enum constructors

How can I make the generated new() constructor const-fn?
E.g.:

#[derive(new, Copy, Clone)]
pub struct ColorHB {
	hue: Hue,
	#[new(value = "1.")]
	brightness: f32,
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions