-
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
fix: clarify suggestion that &T
must refer to T: Sync
for &T: Send
#87322
fix: clarify suggestion that &T
must refer to T: Sync
for &T: Send
#87322
Conversation
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
@bors r+ rollup |
📌 Commit 831ac19 has been approved by |
…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`
Failed on rollup: #87399 (comment) Needs to update Clippy. |
|
the new diagnostic messages
c9d83c2
to
a1518f0
Compare
Thanks! |
📌 Commit a1518f0 has been approved by |
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
Description
rustc_trait_selection/src/traits/error_reporting/suggestions.rs
to include a more clear suggestion when&T
fails to satisfySend
bounds due to the fact thatT
fails to implementSync
src/tools/tests/ui/future_not_send.stderr