fix: clarify suggestion that &T must refer to T: Sync for &T: Send#87322
Merged
bors merged 2 commits intorust-lang:masterfrom Jul 23, 2021
Merged
fix: clarify suggestion that &T must refer to T: Sync for &T: Send#87322bors merged 2 commits intorust-lang:masterfrom
&T must refer to T: Sync for &T: Send#87322bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
&T must refer to T: Send + Sync for &T: Send
chazkiker2
commented
Jul 21, 2021
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
&T must refer to T: Send + Sync for &T: Send&T must refer to T: Sync for &T: Send
This comment has been minimized.
This comment has been minimized.
&T must refer to T: Sync for &T: Send&T must refer to T: Sync for &T: Send
estebank
reviewed
Jul 22, 2021
Contributor
estebank
left a comment
There was a problem hiding this comment.
Left some small action items. Could you also squash your commits before we merge this?
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
Contributor
|
r? @estebank |
add test for issue 86507 add stderr for issue 86507 update issue-86507 UI test add comment for the expected error in UI test file add proper 'refers to <ref_type>' in suggestion update diagnostic phrasing; update test to match new phrasing; re-organize logic for checking T: Sync evaluate additional obligation to figure out if T is Sync run './x.py test tidy --bless' incorporate changes from review; reorganize logic for readability
04d20ef to
831ac19
Compare
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit 831ac19 has been approved by |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jul 23, 2021
…send, r=estebank fix: clarify suggestion that `&T` must refer to `T: Sync` for `&T: Send` ### Description - [x] fix rust-lang#86507 - [x] add UI test for relevant code from issue - [x] change `rustc_trait_selection/src/traits/error_reporting/suggestions.rs` to include a more clear suggestion when `&T` fails to satisfy `Send` bounds due to the fact that `T` fails to implement `Sync`
Member
|
Failed on rollup: #87399 (comment) Needs to update Clippy. |
Contributor
Author
|
the new diagnostic messages
c9d83c2 to
a1518f0
Compare
Member
|
Thanks! |
Collaborator
|
📌 Commit a1518f0 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 23, 2021
Rollup of 14 pull requests Successful merges: - rust-lang#86410 (VecMap::get_value_matching should return just one element) - rust-lang#86790 (Document iteration order of `retain` functions) - rust-lang#87171 (Remove Option from BufWriter) - rust-lang#87175 (Stabilize `into_parts()` and `into_error()`) - rust-lang#87185 (Fix panics on Windows when the build was cancelled) - rust-lang#87191 (Package LLVM libs for the target rather than the build host) - rust-lang#87255 (better support for running libcore tests with Miri) - rust-lang#87266 (Add testcase for 87076) - rust-lang#87283 (Add `--codegen-backends=foo,bar` configure flag) - rust-lang#87322 (fix: clarify suggestion that `&T` must refer to `T: Sync` for `&T: Send`) - rust-lang#87358 (Fix `--dry-run` when download-ci-llvm is set) - rust-lang#87380 (Don't default to `submodules = true` unless the rust repo has a .git directory) - rust-lang#87398 (Add test for fonts used for module items) - rust-lang#87412 (Add missing article) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
rustc_trait_selection/src/traits/error_reporting/suggestions.rsto include a more clear suggestion when&Tfails to satisfySendbounds due to the fact thatTfails to implementSyncsrc/tools/tests/ui/future_not_send.stderr