-
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 10 pull requests #57075
Rollup of 10 pull requests #57075
Conversation
This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
We need to reduce the alignment with the used offset. If the offset isn't known, we need to reduce with the element size to support arbitrary offsets.
Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`). Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving rust-lang#56028. In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.
The present author regrets not thinking of a more eloquent way to do this.
@bors r+ p=10 |
📌 Commit 35fa309 has been approved by |
Rollup of 10 pull requests Successful merges: - #56188 (enum type instead of variant suggestion unification ) - #56916 (Fix mutable references in `static mut`) - #56917 (Simplify MIR generation for logical operations) - #56953 (Mark tuple structs as live if their constructors are used) - #56964 (Remove `TokenStream::JointTree`.) - #56966 (Correct strings for raw pointer deref and array access suggestions) - #56999 (AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-end) - #57020 (Point to cause of `fn` expected return type) - #57032 (fix deprecation warnings in liballoc benches) - #57053 (Fix alignment for array indexing) Failed merges: r? @ghost
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
…dtwco enum type instead of variant suggestion unification Fixes rust-lang#56028. Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`). Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving rust-lang#56028. In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative. In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for `Option` and `Result` (where the existing code was being confused by their being reexported in the prelude). r? @davidtwco
… r=davidtwco Fix mutable references in `static mut` fixes rust-lang#56903
Simplify MIR generation for logical operations Reduces one block and one branch from MIR generated for a logical operator.
Mark tuple structs as live if their constructors are used fixes rust-lang#56281
…petrochenkov Remove `TokenStream::JointTree`. This is done by adding a new `IsJoint` field to `TokenStream::Tree`, which simplifies a lot of `match` statements. And likewise for `CursorKind`. The commit also adds a new method `TokenTree:stream()` which can replace a choice between `.into()` and `.joint()`.
…zackmdavis Correct strings for raw pointer deref and array access suggestions Fixes rust-lang#56714. Fixes rust-lang#56963. r? @zackmdavis
Point to cause of `fn` expected return type Fix rust-lang#48136.
…r=Centril fix deprecation warnings in liballoc benches
Fix alignment for array indexing We need to reduce the alignment with the used offset. If the offset isn't known, use the element size, as this will yield the minimum possible alignment. This handles both direct array indexing, and array repeat expressions. Fixes rust-lang#56927. r? @nagisa
…fn, r=oli-obk Stabilize min_const_unsafe_fn in 1.33 Fixes rust-lang#55607 r? @oli-obk
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
static mut
#56916 (Fix mutable references instatic mut
)TokenStream::JointTree
. #56964 (RemoveTokenStream::JointTree
.)ExprKind::Err
for better error recovery in the front-end #56999 (AST/HIR: IntroduceExprKind::Err
for better error recovery in the front-end)fn
expected return type #57020 (Point to cause offn
expected return type)Failed merges:
r? @ghost