-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Respect -Z
unstable options in rustdoc --test
#147292
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
warning: the `main` function of this doctest won't be run as it contains expressions at the top level, meaning that the whole doctest code will be wrapped in a function | ||
--> $DIR/main-alongside-stmts.rs:17:1 | ||
--> $DIR/main-alongside-stmts.rs:18:1 | ||
| | ||
17 | //! ``` | ||
LL | //! ``` | ||
| ^^^^^^^ | ||
|
||
warning: the `main` function of this doctest won't be run as it contains expressions at the top level, meaning that the whole doctest code will be wrapped in a function | ||
--> $DIR/main-alongside-stmts.rs:26:1 | ||
--> $DIR/main-alongside-stmts.rs:27:1 | ||
| | ||
26 | //! ``` | ||
| ^^^^^^^ | ||
LL | //! | ||
| ^^^ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (unrelated, preexisting) Lol, we really gotta improve the span finding heuristic for all of these cases... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the spans are really rough. I think no one realized how bad they were until now. |
||
|
||
warning: 2 warnings emitted | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
running 2 tests | ||
test $DIR/main-alongside-stmts.rs - (line 17) ... ok | ||
test $DIR/main-alongside-stmts.rs - (line 26) ... ok | ||
test $DIR/main-alongside-stmts.rs - (line 18) ... ok | ||
test $DIR/main-alongside-stmts.rs - (line 27) ... ok | ||
|
||
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess ideally we would either exhaustively destructure
RustdocOptions
at the start of the function or exhaustively constructconfig::Options
to prevent such mistakes in the futures (hell, I don't even know if there are still any options we want to copy over); but yeah, it's probably not feasible due to the sheer amount of options...