diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-22 17:42:04 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-12-22 17:42:47 -0500 |
| commit | a06baa56b95674fc626b3c3fd680d6a65357fe60 (patch) | |
| tree | cd9d867c2ca3cff5c1d6b3bd73377c44649fb075 /src/libsyntax/expand/allocator.rs | |
| parent | 8eb7c58dbb7b32701af113bc58722d0d1fefb1eb (diff) | |
| download | rust-a06baa56b95674fc626b3c3fd680d6a65357fe60.tar.gz rust-a06baa56b95674fc626b3c3fd680d6a65357fe60.zip | |
Format the world
Diffstat (limited to 'src/libsyntax/expand/allocator.rs')
| -rw-r--r-- | src/libsyntax/expand/allocator.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libsyntax/expand/allocator.rs b/src/libsyntax/expand/allocator.rs index cc3eeed04a6..7ab8e370926 100644 --- a/src/libsyntax/expand/allocator.rs +++ b/src/libsyntax/expand/allocator.rs @@ -55,11 +55,15 @@ pub static ALLOCATOR_METHODS: &[AllocatorMethod] = &[ ]; pub fn global_allocator_spans(krate: &ast::Crate) -> Vec<Span> { - struct Finder { name: Symbol, spans: Vec<Span> } + struct Finder { + name: Symbol, + spans: Vec<Span>, + } impl<'ast> visit::Visitor<'ast> for Finder { fn visit_item(&mut self, item: &'ast ast::Item) { - if item.ident.name == self.name && - attr::contains_name(&item.attrs, sym::rustc_std_internal_symbol) { + if item.ident.name == self.name + && attr::contains_name(&item.attrs, sym::rustc_std_internal_symbol) + { self.spans.push(item.span); } visit::walk_item(self, item) |
