Skip to content

Commit abb3a10

Browse files
committed
Auto merge of #32521 - Manishearth:paramitem, r=eddyb
Doc fixes for ParameterEnvironment r? @eddyb
2 parents a18e124 + a3fdf32 commit abb3a10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc/ty/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> {
12021202
}
12031203
}
12041204

1205+
/// Construct a parameter environment given an item, impl item, or trait item
12051206
pub fn for_item(cx: &'a TyCtxt<'tcx>, id: NodeId) -> ParameterEnvironment<'a, 'tcx> {
12061207
match cx.map.find(id) {
12071208
Some(ast_map::NodeImplItem(ref impl_item)) => {
@@ -1341,7 +1342,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> {
13411342
}
13421343
_ => {
13431344
cx.sess.span_bug(item.span,
1344-
"ParameterEnvironment::from_item():
1345+
"ParameterEnvironment::for_item():
13451346
can't create a parameter \
13461347
environment for this kind of item")
13471348
}
@@ -1352,7 +1353,7 @@ impl<'a, 'tcx> ParameterEnvironment<'a, 'tcx> {
13521353
ParameterEnvironment::for_item(cx, cx.map.get_parent(id))
13531354
}
13541355
_ => {
1355-
cx.sess.bug(&format!("ParameterEnvironment::from_item(): \
1356+
cx.sess.bug(&format!("ParameterEnvironment::for_item(): \
13561357
`{}` is not an item",
13571358
cx.map.node_to_string(id)))
13581359
}

0 commit comments

Comments
 (0)