-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 8 pull requests #82241
Merged
Merged
Rollup of 8 pull requests #82241
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
`start_point` needs to return the *first* character's span, but it would previously call `find_width_of_character_at_span` which returns the span of the *last* character. The implementation is now fixed. Other changes: - Docs for start_point, end_point, find_width_of_character_at_span updated - Minor simplification in find_width_of_character_at_span code Fixes rust-lang#81800
Seeing the trait definition doesn't help with implementation not general enough errors, so don't make the error message larger to show it.
If we have a cause containing `ValuePairs::PolyTraitRefs` but neither TraitRef has any escaping bound regions then we report the same error as for `ValuePairs::TraitRefs`.
Along the way, we also implement a handful of diagnostics improvements and fixes, particularly with respect to the special handling of `||` in place of `|` and when there are leading verts in function params, which don't allow top-level or-patterns anyway.
Quotes the arg and not quotes the arg have different effect on Windows when the program called are msys2/cygwin program. Refer to msys2/MSYS2-packages#2176 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Expose force_quotes on Windows. On Windows, the arg quotes and not quotes have different effect for the program it called, if the program called are msys2/cygwin program. Refer to msys2/MSYS2-packages#2176 This also solve the issues comes from https://internals.rust-lang.org/t/std-process-on-windows-is-escaping-raw-literals-which-causes-problems-with-chaining-commands/8163 Tracking issue: rust-lang#82227
Add a `Result::into_ok_or_err` method to extract a `T` from `Result<T, T>` When updating code to handle the semi-recent deprecation of `compare_and_swap` in favor of `compare_exchange`, which returns `Result<T, T>`, I wanted this. I've also wanted it with code using `slice::binary_search` before. The name (and perhaps the documentation) is the hardest part here, but this name seems consistent with the other Result methods, and equivalently memorable.
Fix SourceMap::start_point `start_point` needs to return the *first* character's span, but it would previously call `find_width_of_character_at_span` which returns the span of the *last* character. The implementation is now fixed. Other changes: - Docs for start_point, end_point, find_width_of_character_at_span updated - Minor simplification in find_width_of_character_at_span code Fixes rust-lang#81800
Simplify pattern grammar, improve or-pattern diagnostics This implements the change under FCP in rust-lang#81415. It allows nested or-patterns to contain a leading `|`, simplifying the [grammar for patterns](https://github.com/rust-lang/reference/pull/957/files?short_path=cc629f1#diff-cc629f15712821139bc706c63b3845ab59a008e2a998e08ffad42e3aebcbcbe2). Along the way, we also improve the diagnostics around a few specially-handled cases, such as using `||` instead of `|`, using or-patterns in fn params, including the leading `|` in the pattern span, etc. r? `@petrochenkov`
…_slice_visualization, r=varkor Fix debug information for function arguments of type &str or slice. Issue details: When lowering MIR to LLVM IR, the compiler decomposes every &str and slice argument into a data pointer and a usize. Then, the original argument is reconstructed from the pointer and the usize arguments in the body of the function that owns it. Since the original argument is declared in the body of a function, it should be marked as a LocalVariable instead of an ArgumentVairable. This confusion causes MSVC debuggers unable to visualize &str and slice arguments correctly. (See rust-lang#81894 for more details). Fix details: Making sure that the debug variable for every &str and slice argument is marked as LocalVariable instead of ArgumentVariable in computing_per_local_var_debug_info. This change has been verified on VS Code debugger, VS debugger, WinDbg and LLDB.
…=nikomatsakis Placeholder lifetime error cleanup - Remove note of trait definition - Avoid repeating the same self type - Use original region names when possible - Use this error kind more often - Print closure signatures when they are suppose to implement `Fn*` traits Works towards rust-lang#57374 r? ```@nikomatsakis```
Implement reborrow for closure captures The strategy for captures is detailed here with examples: https://hackmd.io/PzxYMPY4RF-B9iH9uj9GTA Key points: - We only need to reborrow a capture in case of move closures. - If we mutate something via a `&mut` we store it as a `MutBorrow`/`UniqueMuBorrow` of the path containing the `&mut`, - Similarly, if it's read via `&` ref we just store it as a `ImmBorrow` of the path containing the `&` ref. - If a path doesn't deref a `&mut`, `&`, then that path is captured by Move. - If the use of a path results in a move when the closure is called, then that path is truncated before any deref and the truncated path is moved into the closure. - In the case of non-move closure if a use of a path results in a move, then the path is truncated before any deref and the truncated path is moved into the closure. Note that the implementation differs a bit from the document to allow for truncated path to be used in the ClosureKind analysis that happens as part of the first capture analysis pass. Closes: rust-lang/project-rfc-2229#31 r? ````@nikomatsakis````
Spell out nested Self type in lint message Closes rust-lang#78600 r? `@tmandry`
@bors r+ rollup=never p=5 |
📌 Commit f7501b6 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Feb 17, 2021
☀️ Test successful - checks-actions |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
This was referenced Feb 18, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
Result::into_ok_or_err
method to extract aT
fromResult<T, T>
#80572 (Add aResult::into_ok_or_err
method to extract aT
fromResult<T, T>
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup