mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
check `mut`-restriction when tuple constructor is used as a value this fixes a bug where tuple struct constructors could bypass `mut` field restrictions when used as function values instead of being called directly. right now `CheckMutRestriction` only checks struct expressions like `Wrapper(5)`. but referencing `inner::Wrapper` as a value was allowed, which let outsiders construct structs with restricted fields. Fixes rust-lang/rust#160891