1
Fork 0
Commit graph

27 commits

Author SHA1 Message Date
Mazdak Farrokhzad
097d5e1c5e 1. move node_id to syntax
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
2020-02-01 18:58:08 +01:00
Oliver Middleton
79061d0e02 rustdoc: Catch fatal errors when syntax highlighting
For some errors the lexer will unwind so we need to handle that in addition to handling `token::Unknown`.
2020-01-17 23:44:44 +00:00
Mazdak Farrokhzad
8bd3d240e3 nix syntax::errors & prefer rustc_errors over errors 2020-01-10 07:41:30 +01:00
Yuki Okushi
03fe834a23
Rollup merge of #67875 - dtolnay:hidden, r=GuillaumeGomez
Distinguish between private items and hidden items in rustdoc

I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document.

This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another.

Fixes #67851. Closes #60884.
2020-01-09 00:29:13 +09:00
Andy Russell
1ad928ee52
buffer lexer errors in rustdoc syntax checking 2020-01-04 19:20:35 -05:00
David Tolnay
90adafbc9e
Distinguish between private items and hidden items in rustdoc
I believe rustdoc should not be conflating private items (visibility
lower than `pub`) and hidden items (attribute `doc(hidden)`). This
matters now that Cargo is passing --document-private-items by default
for bin crates. In bin crates that rely on macros, intentionally hidden
implementation details of the macros can overwhelm the actual useful
internal API that one would want to document.

This PR restores the strip-hidden pass when documenting private items,
and introduces a separate unstable --document-hidden-items option to
skip the strip-hidden pass. The two options are orthogonal to one
another.
2020-01-04 11:28:53 -08:00
Mazdak Farrokhzad
75e4783f63 Normalize syntax::source_map imports. 2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Mark Rousskov
70805e6444 Delete ProcessCfgMod
The previous commit removes the use of this, and now we cleanup.
2019-11-20 14:07:57 -05:00
Mazdak Farrokhzad
4ae2728fa8 move syntax::parse -> librustc_parse
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10 03:57:18 +01:00
Mazdak Farrokhzad
be023ebe85 move config.rs to libsyntax_expand 2019-11-10 02:46:17 +01:00
Mazdak Farrokhzad
9d6768a478 syntax::parser::token -> syntax::token 2019-11-07 13:50:12 +01:00
Mazdak Farrokhzad
ae156a56d4 syntax::parse::sess -> syntax::sess 2019-10-15 09:41:58 +02:00
Mazdak Farrokhzad
d855bde457
Rollup merge of #63930 - estebank:rustdoc-ice, r=GuillaumeGomez
Account for doc comments coming from proc macros without spans

Fix https://github.com/rust-lang/rust/issues/63821.
2019-09-05 12:11:07 +02:00
Esteban Küber
b2b9b81c9a Account for doc comments coming from proc macros without spans 2019-08-26 17:46:14 -07:00
Tom Milligan
0ec2e9fceb
librustdoc: warn on empty doc test 2019-08-19 16:02:57 +01:00
Aleksey Kladov
b3e8c8bbe2 adapt rustdoc to infailable lexer 2019-08-05 13:15:12 +03:00
Aleksey Kladov
601bad86b2 cleanup lexer constructors 2019-07-04 09:08:45 +03:00
Eduard-Mihai Burtescu
b25b466a88 rustc: remove 'x: 'y bounds (except from comments/strings). 2019-06-18 18:10:21 +03:00
Mark Rousskov
b1c357e0c3 Introduce InnerSpan abstraction
This should be used when trying to get at subsets of a larger span,
especially when the larger span is not available in the code attempting
to work with those subsets (especially common in the fmt_macros crate).

This is usually a good replacement for (BytePos, BytePos) and (usize,
usize) tuples.

This commit also removes from_inner_byte_pos, since it took usize
arguments, which is error prone.
2019-06-09 14:09:36 -06:00
Vadim Petrochenkov
a3425edb46 syntax: Rename TokenAndSpan into Token 2019-06-06 14:03:15 +03:00
John Kåre Alsaker
51938c61f6 Make the rustc driver and interface demand driven 2019-03-10 04:49:45 +01:00
Andy Russell
1536852b42
merge early and late passes into single struct 2019-02-23 15:10:56 -05:00
Hirokazu Hata
1932d7a52d Transition librustdoc to 2018 edition 2019-02-23 16:40:07 +09:00
Andy Russell
0897ffc28f
remove _with_applicability from suggestion fns 2019-01-26 23:07:55 -05:00
Andy Russell
8c93798e9f
rustdoc: check code block syntax in early pass 2019-01-14 21:21:21 -05:00