-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE: rustdoc on issue-43106-gating-of-proc_macro_derive.rs: proc-macro derives require a name #79496
Comments
@rustbot label -T-compiler +T-rustdoc |
MCVE: #![crate_type="proc-macro"]
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive()]
pub fn some_derive(_: TokenStream) -> TokenStream {
TokenStream::new()
} Rustc gives the correct error:
which is emitted from here:
So for some reason that pass isn't getting run by rustdoc (probably because of the hackery in Lines 457 to 473 in 0c11b93
|
Marking as P-low since there are many places where rustdoc assumes its inputs are valid (e.g. all of https://doc.rust-lang.org/nightly/rustdoc/advanced-features.html#interactions-between-platform-specific-docs) and I don't think it's particularly important to handle invalid input, since people learn by running rustc, not rustdoc*. *with the caveat that this only applies to features that are common to rustc and rustdoc; it's very important for rustdoc to handle invalid intra-doc links for example. |
This no longer crashes as of
but I now get an error
which is interesting because the file [1] actually has [1] #79496 (comment) |
@matthiaskrgr probably #107291, the MCVE needs to use --crate-type proc-macro instead of an attribute |
Triage: the error now says with
So I guess it has been fixed by another PR? |
Code
code from
./src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: