about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-27 02:36:26 -0700
committerbors <bors@rust-lang.org>2016-03-27 02:36:26 -0700
commitabb3a107e45b93ca5332ab11bfa6cc8d5a882fb4 (patch)
treeef8ff632b27e77ccf2951544109e8dbf261d5a0b /src
parenta18e12494f2c6e219a7107b3a827c55dc360aa8b (diff)
parenta3fdf327e8bda2aaafd597f09c25b2192bb4a287 (diff)
downloadrust-abb3a107e45b93ca5332ab11bfa6cc8d5a882fb4.tar.gz
rust-abb3a107e45b93ca5332ab11bfa6cc8d5a882fb4.zip
Auto merge of #32521 - Manishearth:paramitem, r=eddyb
Doc fixes for ParameterEnvironment

r? @eddyb
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index 96a0627c6a4..d080724fac9 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)) => {
@@ -1341,7 +1342,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> {
                     }
                     _ => {
                         cx.sess.span_bug(item.span,
-                                         "ParameterEnvironment::from_item():
+                                         "ParameterEnvironment::for_item():
                                           can't create a parameter \
                                           environment for this kind of item")
                     }
@@ -1352,7 +1353,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> {
                 ParameterEnvironment::for_item(cx, cx.map.get_parent(id))
             }
             _ => {
-                cx.sess.bug(&format!("ParameterEnvironment::from_item(): \
+                cx.sess.bug(&format!("ParameterEnvironment::for_item(): \
                                      `{}` is not an item",
                                     cx.map.node_to_string(id)))
             }