about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-03-27 06:04:50 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-03-27 12:31:34 +0530
commit157ba0038dea24f06d594b6e1190fcd0eb431018 (patch)
treecc5babfe0e34499a7080a091e332342d4dfd1065 /src
parent68de28b309b38c5143b3c27f3db0d57f4373729e (diff)
downloadrust-157ba0038dea24f06d594b6e1190fcd0eb431018.tar.gz
rust-157ba0038dea24f06d594b6e1190fcd0eb431018.zip
Clarify that ParameterEnvironment::for_item can take impl/trait items too
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index 96a0627c6a4..97c5e4c76da 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -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)) => {