| Age | Commit message (Collapse) | Author | Lines |
|
|
|
port all code over to use it.
|
|
There's a little more allocation here and there now since
from_utf8_owned can't be used with Vec.
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
|
|
It's now in the prelude.
|
|
Closes #12771
|
|
|
|
|
|
|
|
The pretty printer was treating block comments with more than two
asterisks after the first slash (e.g. `/***`) as doc comments (which are
attributes), whereas in actual fact they are just regular comments.
|
|
|
|
The transmute was unsound.
There are many instances of .unwrap_or('\x00') for "ignoring" EOF which
either do not make the situation worse than it was (well, actually make
it better, since it's easy to grep for places that don't handle EOF) or
can never ever be read.
Fixes #8971.
|
|
|
|
|
|
|
|
|
|
|
|
The following are renamed:
* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`
Fixes #10010.
|
|
from_utf8_owned() behavior
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This removes trait `handler` and `span_handler`,
and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.
|
|
This function had type &[u8] -> ~str, i.e. it allocates a string
internally, even though the non-allocating version that take &[u8] ->
&str and ~[u8] -> ~str are all that is necessary in most circumstances.
|
|
|
|
|
|
|
|
These methods are all excellent candidates for default methods, so there's no
need to require extra imports of various traits.
|
|
Big fish fried here:
extra::json
most of the compiler
extra::io_util removed
extra::fileinput removed
Fish left to fry
extra::ebml
|
|
Who doesn't like a massive renaming?
|
|
|
|
There is less implicit removal of various comment styles, and it also removes
extraneous stars occasionally found in docblock comments. It turns out that the
bug for getops was just a differently formatted block.
Closes #9425
Closes #9417
|
|
This large commit implements and `html` output option for rustdoc_ng. The
executable has been altered to be invoked as "rustdoc_ng html <crate>" and
it will dump everything into the local "doc" directory. JSON can still be
generated by changing 'html' to 'json'.
This also fixes a number of bugs in rustdoc_ng relating to comment stripping,
along with some other various issues that I found along the way.
The `make doc` command has been altered to generate the new documentation into
the `doc/ng/$(CRATE)` directories.
|
|
|
|
|
|
cc #5898
|
|
this has been replaced by `for`
|
|
|
|
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.
|
|
|
|
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
|
|
|
|
This change prevents the indentation in code blocks inside the /// doc comments
from being eaten. The indentation that is the same across the consecutive doc
comments is removed by the uindent_pass in librustdoc.
|