From dee21a67b802ba9d8a0fac11369cbcd53552a216 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Sun, 27 Apr 2014 05:05:45 +0900 Subject: syntax: `Mod` records the span for inner contents. this is useful when the module item and module contents are defined from different files (like rustdoc). in most cases the original span for the module item would be used; in other cases, the span for module contents is available separately at the `inner` field. --- src/libsyntax/fold.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libsyntax/fold.rs') diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index ae82a07601b..1e21c0d0986 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -654,6 +654,7 @@ pub fn noop_fold_type_method(m: &TypeMethod, fld: &mut T) -> TypeMeth pub fn noop_fold_mod(m: &Mod, folder: &mut T) -> Mod { ast::Mod { + inner: folder.new_span(m.inner), view_items: m.view_items .iter() .map(|x| folder.fold_view_item(x)).collect(), -- cgit 1.4.1-3-g733a5