rust/src/librustdoc
Huon Wilson cc760a647a syntax: modernise attribute handling in syntax::attr.
This does a number of things, but especially dramatically reduce the
number of allocations performed for operations involving attributes/
meta items:

- Converts ast::meta_item & ast::attribute and other associated enums
  to CamelCase.
- Converts several standalone functions in syntax::attr into methods,
  defined on two traits AttrMetaMethods & AttributeMethods. The former
  is common to both MetaItem and Attribute since the latter is a thin
  wrapper around the former.
- Deletes functions that are unnecessary due to iterators.
- Converts other standalone functions to use iterators and the generic
  AttrMetaMethods rather than allocating a lot of new vectors (e.g. the
  old code would have to allocate a new vector to use functions that
  operated on &[meta_item] on &[attribute].)
- Moves the core algorithm of the #[cfg] matching to syntax::attr,
  similar to find_inline_attr and find_linkage_metas.

This doesn't have much of an effect on the speed of #[cfg] stripping,
despite hugely reducing the number of allocations performed; presumably
most of the time is spent in the ast folder rather than doing attribute
checks.

Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so
that `rustc --cfg 'foo(bar)'` now works.
2013-07-20 01:06:16 +10:00
..
astsrv.rs librustc: Remove all uses of the Copy bound. 2013-07-17 14:57:53 -07:00
attr_parser.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
attr_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
config.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
demo.rs rustc: add a lint to enforce uppercase statics. 2013-07-01 17:52:57 +10:00
desc_to_brief_pass.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
doc.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
escape_pass.rs Silence some warnings. 2013-06-12 12:21:05 +10:00
extract.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
fold.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
markdown_index_pass.rs librustc: Remove all uses of the Copy bound. 2013-07-17 14:57:53 -07:00
markdown_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
markdown_writer.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
page_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
parse.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
path_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
prune_hidden_pass.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
prune_private_pass.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
rustdoc.rs Silence various warnings in bootstrap build. 2013-07-18 09:35:12 +02:00
sectionalize_pass.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
sort_item_name_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
sort_item_type_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
sort_pass.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
text_pass.rs Silence various warnings in bootstrap build. 2013-07-18 09:35:12 +02:00
trim_pass.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
tystr_pass.rs librustc: Remove all uses of the Copy bound. 2013-07-17 14:57:53 -07:00
unindent_pass.rs Replaces the free-standing functions in f32, &c. 2013-07-08 18:05:17 +02:00