about summary refs log tree commit diff
path: root/src/librustc_ast/util/comments
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-43/+0
2020-08-19Move doc comment parsing to rustc_lexerAleksey Kladov-7/+0
Plain comments are trivial, while doc comments are not, so it feels like this belongs to the rustc_lexer. The specific reason to do this is the desire to use rustc_lexer in rustdoc for syntax highlighting, without duplicating "is this a doc comment?" logic there.
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-1/+1
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-08-06rustc_expand: Don not beautify doc comments before passing them to macrosVadim Petrochenkov-9/+9
Beautify all doc strings in rustdoc instead, including those in `#[doc]` attributes
2020-08-06rustc_ast: Stop using "string typing" for doc comment tokensVadim Petrochenkov-25/+17
Explicitly store their kind and style retrieved during lexing in the token
2020-07-15Remove lots of `Symbol::as_str()` calls.Nicholas Nethercote-26/+37
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
2020-02-29Move directory `libsyntax` -> `librustc_ast`Vadim Petrochenkov-0/+47