-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: External module item links to the module contents. Fixes #12926
. the basic strategy is to distinguish `mod foo;` from `mod foo {...}` by checking if the span for the module item and module contents is in different files. if it's the case, we prefer module contents. it is technically possible to fix #12926 without changing the AST, probably by checking the individual items' span. this is not without a problem though, since it is possible that some items inside `mod foo {...}` may have originated from other file (e.g. `include!`). therefore it is better to record both spans explicitly.
- Loading branch information
1 parent
dee21a6
commit c8a29c4
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c8a29c4
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.
saw approval from huonw
at lifthrasiir@c8a29c4
c8a29c4
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.
merging lifthrasiir/rust/mod-inner-span = c8a29c4 into auto
c8a29c4
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.
lifthrasiir/rust/mod-inner-span = c8a29c4 merged ok, testing candidate = a1ad41b
c8a29c4
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5476
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5472
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/4565
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/4578
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/5574
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/4662
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/4670
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/5576
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/4661
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/4667
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/4729
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2462
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/5570
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/4665
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/4680
c8a29c4
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.
fast-forwarding master to auto = a1ad41b