Beyond the &

20 points by gignico


wrs

In this proposal it looks like you put “feature flags” in the trait impl to tell the compiler the semantics?

        // Tell the borrow checker that multiple references can be made to the
        // same place at the same time:
        const ACCESS: AccessKind = AccessKind::Shared;

That seems…odd. Aren’t marker traits the normal way to communicate semantics? Are there other things like this in Rust that I haven’t noticed or is this a new technique?