Closed
Description
The following code:
enum thing { thing(int) }
impl thing {
fn baz(&x: int) { x = 5 }
}
fn main() {}
fails to compile with the error:
nubs/method-mutable-ref.rs:3:22: 3:23 error: assigning to argument
nubs/method-mutable-ref.rs:3 fn baz(&x: int) { x = 5 }
which is complete nonsense, since it is a mutable argument. This is because a bug in the parser code that handles explicit self types causes the '&' to get dropped.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Auto merge of rust-lang#3191 - RalfJung:rustup, r=RalfJung
Automatic toolchain upgrade to nightly-2024-05-17 (rust-lang#3191)