Skip to content

NLL: Reject partial init of uninitialized record (struct or tuple) #54986

Closed
@pnkfelix

Description

@pnkfelix

Spawned off of #21232

In the short term, we want to reject code like this:

struct S { x: u32, y: u32 }
fn main() { let mut s: S; s.x = 10; }

See #54987 for the long-term goal.

Metadata

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)NLL-soundWorking towards the "invalid code does not compile" goal

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions