Skip to content

Fix typo bug in DepGraph::try_mark_green(). #57698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ impl DepGraph {
DepKind::Hir |
DepKind::HirBody |
DepKind::CrateMetadata => {
if dep_node.extract_def_id(tcx).is_none() {
if dep_dep_node.extract_def_id(tcx).is_none() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One could argue, that the parameter name is not very well choosen :/ Maybe one should address as well in a next patch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to rename dep_dep_node to dep_node_of_dependency or something like that, yeah.

// If the node does not exist anymore, we
// just fail to mark green.
return None
Expand Down
17 changes: 17 additions & 0 deletions src/test/incremental/change_name_of_static_in_fn.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

// revisions:rpass1 rpass2 rpass3

// See issue #57692.

#![allow(warnings)]

fn main() {
#[cfg(rpass1)]
{
static map: u64 = 0;
}
#[cfg(not(rpass1))]
{
static MAP: u64 = 0;
}
}