diff options
| author | Kang Seonghoon <public+git@mearie.org> | 2014-04-27 05:05:45 +0900 |
|---|---|---|
| committer | Kang Seonghoon <public+git@mearie.org> | 2014-04-27 14:52:30 +0900 |
| commit | dee21a67b802ba9d8a0fac11369cbcd53552a216 (patch) | |
| tree | 7ac97ed73d4e5aab30fdaa5411ef8f802982e6cc /src/libsyntax/fold.rs | |
| parent | a692e9b1234ff6573b0cfbc39394d9222eb38f81 (diff) | |
| download | rust-dee21a67b802ba9d8a0fac11369cbcd53552a216.tar.gz rust-dee21a67b802ba9d8a0fac11369cbcd53552a216.zip | |
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.
Diffstat (limited to 'src/libsyntax/fold.rs')
| -rw-r--r-- | src/libsyntax/fold.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<T: Folder>(m: &TypeMethod, fld: &mut T) -> TypeMeth pub fn noop_fold_mod<T: Folder>(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(), |
