Skip to content

Fix soundness hole in struct with expressions, e.g. S{x:foo, .. y} - #18672

Merged
bors merged 1 commit into
rust-lang:masterfrom
brandonson:functional-update-walk
Nov 7, 2014
Merged

Fix soundness hole in struct with expressions, e.g. S{x:foo, .. y}#18672
bors merged 1 commit into
rust-lang:masterfrom
brandonson:functional-update-walk

Conversation

@brandonson

Copy link
Copy Markdown
Contributor

Fixes #18567. Struct{x:foo, .. with_expr} did not walk with_expr, which allowed
using moved variables in some cases. The CFG for structs also built up with
with_expr happening before the fields, which is now reversed. (Fields are now
before the with_expr in the CFG)

@brandonson
brandonson force-pushed the functional-update-walk branch from 20eb468 to 8f62f21 Compare November 6, 2014 18:39
Fixes rust-lang#18567. Struct{x:foo, .. with_expr} did not walk with_expr, which allowed
using moved variables in some cases.  The CFG for structs also built up with
with_expr happening before the fields, which is now reversed. (Fields are now
before the with_expr in the CFG)
@brandonson
brandonson force-pushed the functional-update-walk branch from 8f62f21 to d80a62d Compare November 6, 2014 18:43
@brandonson

Copy link
Copy Markdown
Contributor Author

Just to keep a record: @nikomatsakis commented on an earlier version asking about comments that I'd accidentally left above the walk_expr change. They were just there to record the problems I was seeing with the CFG fixed as well, and have now been changed.

@nikomatsakis

Copy link
Copy Markdown
Contributor

r+ with clarification

bors added a commit that referenced this pull request Nov 7, 2014
…matsakis

Fixes #18567. `Struct{x:foo, .. with_expr}` did not walk `with_expr`, which allowed
using moved variables in some cases.  The CFG for structs also built up with
`with_expr` happening before the fields, which is now reversed. (Fields are now
before the `with_expr` in the CFG)
@bors bors closed this Nov 7, 2014
@bors
bors merged commit d80a62d into rust-lang:master Nov 7, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Dec 16, 2024
internal: Do not require a special env var to be set for the proc-macro-srv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Struct{x:y, .. old.method_taking_self()} doesn't treat old as a moved value

3 participants