Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upFixes and cleanups #58000
+77
−45
Conversation
oli-obk
added some commits
Jan 30, 2019
rust-highfive
assigned
nikomatsakis
Jan 30, 2019
This comment has been minimized.
This comment has been minimized.
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Jan 30, 2019
RalfJung
reviewed
Jan 30, 2019
// State of a local variable | ||
/// State of a local variable including a memoized layout | ||
#[derive(Clone, PartialEq, Eq)] | ||
pub struct LocalValue<'tcx, Tag=(), Id=AllocId> { |
This comment has been minimized.
This comment has been minimized.
RalfJung
Jan 30, 2019
Member
Nit: I think swapping the names LocalValue
and LocalState
is nicer. The layout
stuff looks much more state-y than value-y to me.
RalfJung
reviewed
Jan 30, 2019
oli-obk
added some commits
Jan 30, 2019
RalfJung
reviewed
Jan 30, 2019
type Item = LocalValue<(), AllocIdSnapshot<'a>>; | ||
|
||
fn snapshot(&self, ctx: &'a Ctx) -> Self::Item { | ||
self.state.snapshot(ctx) |
This comment has been minimized.
This comment has been minimized.
RalfJung
Jan 30, 2019
Member
We otherwise follow the pattern to use LocalState { state, layout: _ } = self
to make sure we revisit this when new fields get added.
impl_snapshot_for!
doesn't work?
This comment has been minimized.
This comment has been minimized.
oli-obk
Jan 30, 2019
Author
Contributor
nope, it's a very simple macro with no support for lifetimes or so
This comment has been minimized.
This comment has been minimized.
oli-obk
Jan 30, 2019
Author
Contributor
Done and opened rust-lang/rust-clippy#3724 to make sure we take care of this issue once and for all at some point
RalfJung
approved these changes
Jan 30, 2019
This comment has been minimized.
This comment has been minimized.
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Jan 30, 2019
added a commit
to Centril/rust
that referenced
this pull request
Jan 30, 2019
added a commit
to Centril/rust
that referenced
this pull request
Jan 30, 2019
added a commit
that referenced
this pull request
Jan 30, 2019
added a commit
to Centril/rust
that referenced
this pull request
Jan 31, 2019
added a commit
that referenced
this pull request
Jan 31, 2019
bors
merged commit 8c26c59
into
rust-lang:master
Jan 31, 2019
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bors retry |
This comment has been minimized.
This comment has been minimized.
@bors r- retry |
bors
added
S-waiting-on-author
and removed
S-waiting-on-bors
labels
Feb 7, 2019
kennytm
added
S-waiting-on-bors
and removed
S-waiting-on-author
labels
Feb 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
oli-obk commentedJan 30, 2019
Address the points raised in https://github.com/rust-lang/rust/pull/57677/files by @eddyb and @RalfJung