Skip to content

Commit fb19205

Browse files
author
James Miller
committed
Fix rustdoc and rusti
1 parent 7ce68dc commit fb19205

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/librustdoc/tystr_pass.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn fold_const(
9494
do astsrv::exec(srv) |ctxt| {
9595
match ctxt.ast_map.get_copy(&doc.id()) {
9696
ast_map::node_item(@ast::item {
97-
node: ast::item_static(ty, _, _), _
97+
node: ast::item_static(ref ty, _, _), _
9898
}, _) => {
9999
pprust::ty_to_str(ty, extract::interner())
100100
}
@@ -245,12 +245,12 @@ fn fold_impl(
245245
do astsrv::exec(srv) |ctxt| {
246246
match ctxt.ast_map.get_copy(&doc.id()) {
247247
ast_map::node_item(@ast::item {
248-
node: ast::item_impl(ref generics, opt_trait_type, self_ty, _), _
248+
node: ast::item_impl(ref generics, ref opt_trait_type, ref self_ty, _), _
249249
}, _) => {
250250
let bounds = pprust::generics_to_str(generics, extract::interner());
251251
let bounds = if bounds.is_empty() { None } else { Some(bounds) };
252252
let trait_types = opt_trait_type.map_default(~[], |p| {
253-
~[pprust::path_to_str(p.path, extract::interner())]
253+
~[pprust::path_to_str(&p.path, extract::interner())]
254254
});
255255
(bounds,
256256
trait_types,
@@ -285,15 +285,14 @@ fn fold_type(
285285
match ctxt.ast_map.get_copy(&doc.id()) {
286286
ast_map::node_item(@ast::item {
287287
ident: ident,
288-
node: ast::item_ty(ty, ref params), _
288+
node: ast::item_ty(ref ty, ref params), _
289289
}, _) => {
290290
Some(fmt!(
291291
"type %s%s = %s",
292292
to_str(ident),
293293
pprust::generics_to_str(params,
294294
extract::interner()),
295-
pprust::ty_to_str(ty,
296-
extract::interner())
295+
pprust::ty_to_str(ty, extract::interner())
297296
))
298297
}
299298
_ => fail!("expected type")

src/librusti/rusti.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn run(mut repl: Repl, input: ~str) -> Repl {
132132
// differently beause they must appear before all 'use' statements
133133
for blk.node.view_items.iter().advance |vi| {
134134
let s = do with_pp(intr) |pp, _| {
135-
pprust::print_view_item(pp, *vi);
135+
pprust::print_view_item(pp, vi);
136136
};
137137
match vi.node {
138138
ast::view_item_extern_mod(*) => {

src/librusti/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ use syntax::print::pp;
1414
use syntax::print::pprust;
1515
use syntax::parse::token;
1616

17-
pub fn each_binding(l: @ast::local, f: @fn(@ast::Path, ast::node_id)) {
17+
pub fn each_binding(l: @ast::local, f: @fn(&ast::Path, ast::node_id)) {
1818
use syntax::visit;
1919

2020
let vt = visit::mk_simple_visitor(
2121
@visit::SimpleVisitor {
2222
visit_pat: |pat| {
2323
match pat.node {
24-
ast::pat_ident(_, path, _) => {
24+
ast::pat_ident(_, ref path, _) => {
2525
f(path, pat.id);
2626
}
2727
_ => {}

0 commit comments

Comments
 (0)