]> git.lizzy.rs Git - rust.git/commitdiff
Clarify that ParameterEnvironment::for_item can take impl/trait items too
authorManish Goregaokar <manishsmail@gmail.com>
Sun, 27 Mar 2016 00:34:50 +0000 (06:04 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Sun, 27 Mar 2016 07:01:34 +0000 (12:31 +0530)
src/librustc/ty/mod.rs

index 96a0627c6a45f9d51503d3745f9b9fabcb877864..97c5e4c76dae5de63f9bf58571cda36892c5a0e9 100644 (file)
@@ -1202,6 +1202,7 @@ pub fn with_caller_bounds(&self,
         }
     }
 
+    /// 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)) => {