-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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-tests don't work with macros 1.1 #39064
Comments
just linking related tickets to attract some more attention :-)
|
@colin-kiegel: I think this should be filed at |
ok, I filed it there too: rust-lang/cargo#3545 I'm not sure if this ticket belongs here or with cargo, so I'll leave it to someone else to close one of these tickets. |
I'll take a look at this, it's most likely a rust bug. There is probably a codepath that isn't visited because it's a proc macro crate. |
From what I can see, this is both a rust bug and a cargo bug. On a proc macro crate, cargo doesn't call |
…hton Stop warning when doc testing proc macro crates Fixes #39064 Add the test option to the session struct that is passed to phase_2_configure_and_expand function inside the rustdoc test module. This prevents the warning code from triggering when parsing proc_macro_derive attributes, just like when `--test` is normally invoked. This change makes the warning disappear, but I'm not sure what else it might change. So this early PR is mainly to run the test suite, and to get feedback.
It looks like having
proc-macro = true
inCargo.toml
disables all doc-tests. However unit tests#[test]
work fine.Steps to reproduce
cargo new foo
edit Cargo.toml
edit src/lib.rs
cargo test
The text was updated successfully, but these errors were encountered: