-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #55933 - euclio:doc-panic, r=QuietMisdreavus
emit error when doc generation fails Fixes #41813. The diagnostic looks something like this: ``` error: couldn't generate documentation: No space left on device (os error 28) | = note: failed to create or modify "/path/to/crate/target/doc/src/lazycell" ```
- Loading branch information
Showing
4 changed files
with
43 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-include ../tools.mk | ||
|
||
# This test verifies that rustdoc doesn't ICE when it encounters an IO error | ||
# while generating files. Ideally this would be a rustdoc-ui test, so we could | ||
# verify the error message as well. | ||
|
||
OUTPUT_DIR := "$(TMPDIR)/rustdoc-io-error" | ||
|
||
# Ignore Windows: the test uses `chmod`. | ||
ifndef IS_WINDOWS | ||
|
||
# This test operates by creating a temporary directory and modifying its | ||
# permissions so that it is not writable. We have to take special care to set | ||
# the permissions back to normal so that it's able to be deleted later. | ||
all: | ||
mkdir -p $(OUTPUT_DIR) | ||
chmod u-w $(OUTPUT_DIR) | ||
-$(shell $(RUSTDOC) -o $(OUTPUT_DIR) foo.rs) | ||
chmod u+w $(OUTPUT_DIR) | ||
exit $($(.SHELLSTATUS) -eq 1) | ||
|
||
else | ||
all: | ||
|
||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub struct Foo; |