Skip to content

Commit

Permalink
Clarify that ParameterEnvironment::for_item can take impl/trait items…
Browse files Browse the repository at this point in the history
… too
  • Loading branch information
Manishearth committed Mar 27, 2016
1 parent 68de28b commit 157ba00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> {
}
}

/// Construct a parameter environment given an item, impl item, or trait item
pub fn for_item(cx: &'a TyCtxt<'tcx>, id: NodeId) -> ParameterEnvironment<'a, 'tcx> {
match cx.map.find(id) {
Some(ast_map::NodeImplItem(ref impl_item)) => {
Expand Down

0 comments on commit 157ba00

Please sign in to comment.