-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 6 pull requests #102046
Closed
Closed
Rollup of 6 pull requests #102046
Conversation
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
…rminal The UNIX and WASI implementations use `isatty`. The Windows implementation uses the same logic the `atty` crate uses, including the hack needed to detect msys terminals. Implement this trait for `File` and for `Stdin`/`Stdout`/`Stderr` and their locked counterparts on all platforms. On UNIX and WASI, implement it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for `BorrowedHandle`/`OwnedHandle`. Based on rust-lang#91121 Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
If a process has no console, it'll have NULL in place of a console handle, so return early with `false` in that case without making any OS calls.
Rather than referencing a slice's pointer and then creating a new slice with a longer length, offset from the base structure pointer instead. This makes some choices of Rust semantics happier.
This class was originally added in 73b97c7 to support hiding and showing the item, because `main.js` went through all `docblock` elements in the DOM and added toggles to them. https://github.com/rust-lang/rust/blob/73b97c7e7c9cfac4dfa4804654b1db6ab687b589/src/librustdoc/html/static/main.js#L1856-L1867 The `item-decl` is no longer auto-hidden since c96f86d removed it. `item-decl` used to be called `type-decl`: that name was changed in 8b7a2dd. The `docblock` class is no longer used for implementing toggles, since rustdoc switched to using `<details>` elements.
This avoids toil when changing other functions in `ObligationForest` to take an `OUT` parameter.
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
… r=thomcc Add `IsTerminal` trait to determine if a descriptor or handle is a terminal The UNIX implementation uses `isatty`. The Windows implementation uses the same logic the `atty` crate uses, including the hack needed to detect msys terminals. Implement this trait for `Stdin`/`Stdout`/`Stderr`/`File` on all platforms. On Unix, implement it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for `BorrowedHandle`/`OwnedHandle`. Based on rust-lang#91121 Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
…aron1011 Manually cleanup token stream when macro expansion aborts. In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE. In this case, this PR manually cleans up the token stream by closing all currently open delimiters. Fixes rust-lang#96818. Fixes rust-lang#80447. Fixes rust-lang#81920. Fixes rust-lang#91023.
…e, r=oli-obk Improve error for when query is unsupported by crate This is an improvement to the error message mentioned on rust-lang#101666. It seems like a good idea to also add [this link to the rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/query.html), if explaining the query system in detail is a concern here, but I'm unsure if there is any restrictions on adding links to error messages.
…=compiler-errors Simplify rpitit handling on lower_fn_decl r? ``@compiler-errors``
…decl, r=GuillaumeGomez rustdoc: remove `docblock` class from `item-decl` This class was originally added in 73b97c7 to support hiding and showing the item, because `main.js` went through all `docblock` elements in the DOM and added toggles to them. https://github.com/rust-lang/rust/blob/73b97c7e7c9cfac4dfa4804654b1db6ab687b589/src/librustdoc/html/static/main.js#L1856-L1867 The `item-decl` is no longer auto-hidden since c96f86d removed it. `item-decl` used to be called `type-decl`: that name was changed in 8b7a2dd. The `docblock` class is no longer used for implementing toggles, since rustdoc switched to using `<details>` elements. Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-item-decl/rustdoc/clean/types/enum.Type.html
Make cycle errors recoverable In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: rust-lang#91430 (comment) > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered. Helps with rust-lang#81091. r? `@lcnr` cc `@matthewjasper`
rustbot
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Sep 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
IsTerminal
trait to determine if a descriptor or handle is a terminal #98033 (AddIsTerminal
trait to determine if a descriptor or handle is a terminal)docblock
class fromitem-decl
#102027 (rustdoc: removedocblock
class fromitem-decl
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup