-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#[doc = $expr]
in macro silently fails to generate docs
#44730
Comments
This is a regression introduced in today's nightly (rustc 1.22.0-nightly (325ba23 2017-09-19))
325ba23 Auto merge of #44620 - zackmdavis:rfc_1940_housekeeping, r=nikomatsakis
5d5dcae Auto merge of #44601 - alexcrichton:lower-attributes-in-hir, r=nrc 9a00f3c Auto merge of #44026 - QuietMisdreavus:trimmed-std, r=steveklabnik 0694e4f rustc: Forbid interpolated tokens in the HIR 06bb0e0 Auto merge of #44680 - infinity0:master, r=Mark-Simulacrum 8f25497 rustbuild: with --no-fail-fast, report the specific commands that failed 0701b37 Auto merge of #44678 - alexcrichton:rollup, r=alexcrichton 929215d Rollup merge of #44671 - GuillaumeGomez:run-button, r=steveklabnik 4af3073 Rollup merge of #44668 - iwillspeak:into-iterator-docs, r=steveklabnik 3bbe153 Rollup merge of #44661 - GuillaumeGomez:more-links, r=QuietMisdreavus 64c9fd6 Rollup merge of #44657 - Ixrec:patch-1, r=eddyb d5b0cbb Rollup merge of #44651 - bluss:document-thread-name-no-nuls, r=steveklabnik fa9dd27 Rollup merge of #44640 - budziq:stabilize_splice, r=dtolnay 156698e Rollup merge of #44548 - oyvindln:rustc_help_fix, r=arielb1 8dae2b0 Rollup merge of #44537 - oli-obk:memchr, r=alexcrichton fbf3b8a Rollup merge of #44466 - clarcharr:cow_error, r=alexcrichton 9ad5473 Rollup merge of #44364 - michaelwoerister:hash-all-the-things2, r=nikomatsakis 90ce24a Fix run button 4961a8e incr.comp.: Fix ICE caused by trying to hash INVALID_CRATE_NUM. 74d6b85 incr.comp.: Fix rebase fallout. d5b1fee incr.comp.: Remove tcx from StableHashingContext. ba6f93c incr.comp.: Make the StableHashingContext mostly independent of the tcx. e567afb incr.comp.: Initialize IGNORED_ATTRS in StableHashingContext lazily. dd50173 incr.comp.: Initialize the CachingCodemapView in StableHashingContext lazily. 67c84e0 incr.comp.: Use StableHash impls instead of functions for hashing most maps. b9816c5 incr.comp.: Already hash HIR bodies during metadata export so they don't have to be hashed in downstream crates. e3f9131 Fix issues uncovered by rebasing: 3cc3ae2 incr.comp.: Move result fingerprinting to DepGraph::with_task(). e6c9a53 incr.comp.: Compute hashes of all query results. 3cf28f3 Use DefId instead of NodeId as identifier in resolve_lifetime::Region. 3a7b960 Auto merge of #44441 - tamird:cargo-bitflags, r=alexcrichton ebd0e4f Add Example of caad256 Auto merge of #43628 - oli-obk:orbital_standard_library, r=alexcrichton e8a76d8 Auto merge of #44529 - alexcrichton:trans-query, r=michaelwoerister e47279f Add more links and put the link character to the left 01555b1 Rebase fallout a9df19b Update miri submodule 68fc65e Prevent distribution if miri is enabled 13921da -Zmir-emit-validate is in stage 0 ab018c7 Add a file to trivially disable tool building or testing f0b5402 Improve documentation f381744 Get the miri test suite to run inside the rustc dev environment 2787a28 Add 231d9e7 Remove rustc_bitflags; use the bitflags crate 6d614dd rustc: Move codegen to a query e788fa7 bootstrap: plumb verbosity into submodule ops 4a8933f Use double quotes to appease some TOML parsers 3021c1d rustc: Attach an mpsc channel to TyCtxt 2eada58 rustc: Remove another global map from trans 19727c8 rustc: Move a comment to the right spot in trans afb85cf rustc: Mostly remove 8821aff rustc: Move some attr methods to queries 132bde7 rustc: Make trans collect/partition a query dba3ddd rustc: Calculate baca9a6 rustc: Use reachablility through a query a97ad6a rustc: Refactor trans paritioning to use tcx c72240a rustc_trans: Refactor collection to use tcx 38fa340 missed a 'mut' 2633b85 Replace str's transmute() calls with pointer casts 6b167f9 Updated tracking issue for String::splice and its unstable-book entry 7b932d2 stabilized vec_splice (fixes #32310) 7859c9e std: Document thread builder panics for nul bytes in thread names d09db63 unstable book section for e9569d9 RFC 1940 UI test in own directory, exercise must_use trait methods e89748e Remove the other period and start with lowercase for more consistency edf1622 Add proper help line for inline threshold 778d5f2 Add Cow -> Box impls. 64f6111 remove tests for doc(masked) db09332 update bb6de3c add feature gate doc_masked and tests c491e19 new attribute #[doc(masked)] to hide internal crates from std docs |
This seems to apply to any kind of attribute, not just doc attributes (and not just the
does not generate Similarly, doing something like this with |
Looks like early lint passes do detect these attributes, it is late lint passes which have trouble here. So it's on the HIR side. |
Yep, it was regressed by #44601 |
Well, cc-ing @alexcrichton (and/or @rust-lang/compiler) seems more appropriate. |
I'm working on a fix for this |
This commit fixes a regression from rust-lang#44601 where lowering attribute to HIR now involves expanding interpolated tokens to their actual tokens. In that commit all interpolated tokens were surrounded with a `DelimToken::None` group of tokens, but this ended up causing regressions like rust-lang#44730 where the various attribute parsers in `syntax/attr.rs` weren't ready to cope with `DelimToken::None`. Instead of fixing the parser in `attr.rs` this commit instead opts to just avoid the `DelimToken::None` in the first place, ensuring that the token stream should look the same as it did before where possible. Closes rust-lang#44730
I've posted a fix at #44745 |
rustc: Don't use DelimToken::None if possible This commit fixes a regression from rust-lang#44601 where lowering attribute to HIR now involves expanding interpolated tokens to their actual tokens. In that commit all interpolated tokens were surrounded with a `DelimToken::None` group of tokens, but this ended up causing regressions like rust-lang#44730 where the various attribute parsers in `syntax/attr.rs` weren't ready to cope with `DelimToken::None`. Instead of fixing the parser in `attr.rs` this commit instead opts to just avoid the `DelimToken::None` in the first place, ensuring that the token stream should look the same as it did before where possible. Closes rust-lang#44730
This will not generate docs for the generated enum, and will warn about missing docs on the enum variant. (missing_docs is off by default, so normally you wouldn't notice this)
This is a rustc bug, not a rustdoc bug, since the lint fails too (so we're somehow losing the doc attribute entirely). This works fine on beta.
cc @eddyb
The text was updated successfully, but these errors were encountered: