reference icon indicating copy to clipboard operation
reference copied to clipboard

update patterns.md for const pattern RFC

Open RalfJung opened this issue 1 year ago • 2 comments

Updates the reference for https://github.com/rust-lang/rfcs/pull/3535.

This is not 100% implemented yet:

  • parts of it are pending on https://github.com/rust-lang/rust/pull/116284
  • also the (recursive) structural equality checker in rustc currently sometimes issues a future-compat lint instead of a hard error; this may still take some tome to phase out (we need to first bump that to a "future-compat lint that is also shown in dependencies")
  • violations of the T: PartialEq currently also just give a future-compat lint, not a hard error

RalfJung avatar Jan 26 '24 16:01 RalfJung

@RalfJung Is this ready to merge? Were there any changes since this was written?

ehuss avatar Feb 05 '24 16:02 ehuss

We are slowly staging the deployment of this in rustc. Not sure how closely the reference wants to match that.

If you are okay with the reference stating things as required that are just future-compat lints in rustc (rather than hard errors), then this is ready to go, yes.

RalfJung avatar Feb 05 '24 17:02 RalfJung

FYI, when https://github.com/rust-lang/rust/pull/124661 lands rustc will fully behave as documented here. I hope to land that in this release cycle.

RalfJung avatar May 03 '24 14:05 RalfJung