-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
AFAICT it's currently impossible to destructure a &T
into a mut T
(which should be possible when T is Copy).
eg.
let &foo = &1;
foo = 2; // Cannot mutate foo
a)
let &mut foo = &1; // Will not compile
foo = 2;
b)
let &(mut foo) = &1; // Will not compile
foo = 2;
c)
let mut &foo = &1; // Will not compile
foo = 2;
d)
let & mut foo = &1; // Will not compile
foo = 2;
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.