Skip to content

Trait sugar syntax for maker trait and implementing the same maker trait for multiple type #3732

@Thomas-Mewily

Description

@Thomas-Mewily

Hello there, here is just a personal suggestion to keep the consistency between declaring a empty struct / marker trait, nothings really important but anyway ^^

struct Empty;   // ok
struct Empty {} // ok

trait SignedInteger;   // currently not ok 
trait SignedInteger {} // ok

impl SignedInteger for i8;   // currently not ok
impl SignedInteger for i8 {} // ok

Also, sometime implementing the same maker trait for multiples types can be helpful (instead of using macro) :

impl SignedInteger for i8, i16, i32, i64, isize;   // currently not ok
impl SignedInteger for i8, i16, i32, i64, isize {} // currently not ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions