File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 5
5
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
6
6
rustup update --no-self-update $TOOLCHAIN
7
7
if [[ "$TOOLCHAIN" == "nightly"* ]]; then
8
- rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview
8
+ rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview rust-docs
9
9
fi
10
10
rustup default $TOOLCHAIN
11
11
displayName: Install rust
Original file line number Diff line number Diff line change @@ -78,10 +78,12 @@ fn std_docs() {
78
78
// --extern-html-root-url is unstable
79
79
return ;
80
80
}
81
- if !cargo:: util:: is_ci ( ) {
82
- // For local developers, skip this test if docs aren't installed.
83
- let docs = std:: path:: Path :: new ( & paths:: sysroot ( ) ) . join ( "share/doc/rust/html" ) ;
84
- if !docs. exists ( ) {
81
+ // For local developers, skip this test if docs aren't installed.
82
+ let docs = std:: path:: Path :: new ( & paths:: sysroot ( ) ) . join ( "share/doc/rust/html" ) ;
83
+ if !docs. exists ( ) {
84
+ if cargo:: util:: is_ci ( ) {
85
+ panic ! ( "std docs are not installed, check that the rust-docs component is installed" ) ;
86
+ } else {
85
87
eprintln ! (
86
88
"documentation not found at {}, \
87
89
skipping test (run `rustdoc component add rust-docs` to install",
You can’t perform that action at this time.
0 commit comments