-
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
Add compiler docs testing to CI. #46278
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
03f5834
to
283b11a
Compare
Currently failing (probably #46271): https://travis-ci.org/rust-lang/rust/jobs/307535449#L6794-L6818. |
@MaloJaffre, is this part of an overall fix for #29893? |
@Michael-F-Bryan No, because I haven't read this issue before opening this PR, but it is a step forward, because, in the meantime, we can catch regressions of compiler docs building. |
Restarting CI to see if it passes, now that #46405 has been merged. |
283b11a
to
f12927f
Compare
Now it's a lot of broken links in EDIT: it seems that these are intended to be links to |
Friendly ping to keep this on your radar, @MaloJaffre! How's it going? |
@carols10cents I'm currently trying to understand why the links are broken, but it's not very successful... |
It depends per link; some of these point to a |
Meanwhile, I will fix the other broken links that are really in compiler docs. |
The solution to the second one, for now, is just to remove the link. |
@steveklabnik Did you mean to add |
c6e6925
to
2912fb4
Compare
src/librustc/dep_graph/graph.rs
Outdated
@@ -158,7 +158,7 @@ impl DepGraph { | |||
/// what state they have access to. In particular, we want to | |||
/// prevent implicit 'leaks' of tracked state into the task (which | |||
/// could then be read without generating correct edges in the | |||
/// dep-graph -- see the [README] for more details on the | |||
/// dep-graph -- see the module-level README for more details on the |
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.
Perhaps link the README to https://github.com/rust-lang/rust/blob/master/src/librustc/dep_graph/README.md instead of removing the link?
(Alternatively, make use of #![doc(include="README.md")]
in mod.rs
to display the README directly in the rustdoc. This could be another PR once we get the compiler docs into the CI.)
src/librustc/infer/anon_types/mod.rs
Outdated
/// fn baz<'a, 'b>() -> impl Trait<'a, 'b> { ... } | ||
/// ``` | ||
/// fn baz<'a, 'b>() -> impl Trait<'a, 'b> { ... } | ||
/// ``` |
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.
This block should be ```text
?
src/librustc/middle/region.rs
Outdated
/// ``` | ||
/// let a = f().g( 'b: { let x = d(); let y = d(); x.h(y) } ) ; | ||
/// ``` | ||
/// | ||
/// ```text |
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.
Better merge this block with the one above and make it ```text
.
src/librustc/hir/mod.rs
Outdated
@@ -588,7 +588,7 @@ pub type CrateConfig = HirVec<P<MetaItem>>; | |||
/// The top-level data structure that stores the entire contents of | |||
/// the crate currently being compiled. | |||
/// | |||
/// For more details, see [the module-level README](README.md). | |||
/// For more details, see the module-level README. |
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.
src/librustc/mir/mod.rs
Outdated
@@ -8,7 +8,7 @@ | |||
// option. This file may not be copied, modified, or distributed | |||
// except according to those terms. | |||
|
|||
//! MIR datatypes and passes. See [the README](README.md) for details. | |||
//! MIR datatypes and passes. See the module-level README for details. |
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.
src/librustc/ty/context.rs
Outdated
/// various **compiler queries** that have been performed. See [the | ||
/// README](README.md) for more deatils. | ||
/// various **compiler queries** that have been performed. See the | ||
/// the module-level README for more details. |
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.
@@ -149,7 +149,7 @@ | |||
//! The binary of a crate will not only contain machine code for the items | |||
//! defined in the source code of that crate. It will also contain monomorphic | |||
//! instantiations of any extern generic functions and of functions marked with | |||
//! #[inline]. | |||
//! \#[inline]. |
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.
Perhaps `…`
it instead of \
it.
@@ -94,7 +94,7 @@ | |||
//! inlined, so it can distribute function instantiations accordingly. Since | |||
//! there is no way of knowing for sure which functions LLVM will decide to | |||
//! inline in the end, we apply a heuristic here: Only functions marked with | |||
//! #[inline] are considered for inlining by the partitioner. The current | |||
//! \#[inline] are considered for inlining by the partitioner. The current |
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.
Ditto
src/libsyntax/feature_gate.rs
Outdated
pub declared_stable_lang_features: Vec<(Symbol, Span)>, | ||
/// #![feature] attrs for non-language (library) features | ||
/// \#![feature] attrs for non-language (library) features |
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.
Ditto
src/librustc/ty/sty.rs
Outdated
/// will be unified. | ||
/// | ||
/// [upvar inference]: src/librustc_typeck/check/upvar.rs | ||
/// inferred. Once upvar inference (in src/librustc_typeck/check/upvar.rs) |
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.
Please backquote the path.
2912fb4
to
da82759
Compare
@kennytm Thanks for your review! EDIT: After checking formatting of other lists in API docs, I applied your suggested formatting. |
da82759
to
a34ac50
Compare
☔ The latest upstream changes (presumably #47052) made this pull request unmergeable. Please resolve the merge conflicts. |
It tested rust-lang#44953. `log` macros in newer versions are no longer recursive, so these duplicated error messages (about unstable feature uses) previously occurring at each level of recursion are no longer possible, even with the fix by rust-lang#45540. Furthermore this test breaks when multiple versions of `log` are in the sysroot (`log 0.3.9` depends on`log 0.4.1`)
Update `rand` crate to `0.3.19`. Update `log` crate to `0.3.9` and `0.4.1`. Update `parking_lot_core` crate to `0.2.9`. Upgrade all flate2 dependencies to `1.0.1`. - Update `rust-installer` submodule.
As pointed out by @ollie27.
a34ac50
to
2449230
Compare
Thanks! @bors r+ |
📌 Commit 2449230 has been approved by |
Add compiler docs testing to CI. Fixes #47025. I don't know if `x86_64-gnu` is the right builder for this, but there seems to be time left on [Travis](https://travis-ci.org/rust-lang/rust/jobs/307488864). Remaining problems blocking this PR: - [x] broken links caused by rustdoc issues: - [x] `pub use self::Enum::...`: #46766 and #46767 (fixed by #47050, thanks @ollie27!) - [x] `impl Deref for DerefToStdType`: #32129 (ignored in linkchecker) - [x] `#[feature(decl_macro)]` and `use std::vec`: #47038 (ignored in linkchecker) - [x] `rustc_data_structures::sync::{Lrc, RwLock}` aliases `std` types: #32130 (ignored in linkchecker) - [x] markdown differences, in rust repository and in external crates, now failing the build with #46880 merged (all fixed) - [x] multiple crate updates needed: `rand`, `log`, `parking_lot_core`, `flate2` - [x] submodule updates needed to deduplicate dependencies: `rust-installer`, ~`cargo`~ (done by #47052) - [x] #44953 test broken by `log` update (removed, this can be controversial) - [x] Waiting `x86_64-gnu` build results ([done](https://travis-ci.org/rust-lang/rust/builds/323451069)) See individual commits for more details.
☀️ Test successful - status-appveyor, status-travis |
Fixes #47025.
I don't know if
x86_64-gnu
is the right builder for this, but there seems to be time left on Travis.Remaining problems blocking this PR:
pub use self::Enum::...
: Rustdoc mistakes Enum with a module: pub use self::Enum::Variant #46766 and Rustdoc links to private mod: pub use self::private::Enum::* #46767 (fixed by rustdoc: Don't try to generate links for modules in import paths #47050, thanks @ollie27!)impl Deref for DerefToStdType
: Broken links inString
documentation fromDeref
impl #32129 (ignored in linkchecker)#[feature(decl_macro)]
anduse std::vec
: decl_macro and use std::vec combo breaks rustdoc #47038 (ignored in linkchecker)rustc_data_structures::sync::{Lrc, RwLock}
aliasesstd
types: Broken links in BTreeSet struct documentation #32130 (ignored in linkchecker)rand
,log
,parking_lot_core
,flate2
rust-installer
,(done by Improved error messages for linking failure #47052)cargo
log
update (removed, this can be controversial)x86_64-gnu
build results (done)See individual commits for more details.