Skip to content

construct MIR for all crates up to and including rustdoc #27893

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 12 commits into from
Sep 6, 2015
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add a few accessors to Graph
  • Loading branch information
nikomatsakis committed Sep 6, 2015
commit 4f5267dba31fdc49e436c50009fe33a80f21d477
10 changes: 10 additions & 0 deletions src/librustc_data_structures/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,21 @@ impl<N:Debug,E:Debug> Graph<N,E> {
&self.nodes
}

#[inline]
pub fn len_nodes(&self) -> usize {
self.nodes.len()
}

#[inline]
pub fn all_edges<'a>(&'a self) -> &'a [Edge<E>] {
&self.edges
}

#[inline]
pub fn len_edges(&self) -> usize {
self.edges.len()
}

///////////////////////////////////////////////////////////////////////////
// Node construction

Expand Down