Skip to content
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

add suggestion when there is a impl of external trait on pointer with wrong coherence rules #99686

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

vincenzopalazzo
Copy link
Member

Closes #99572

This will try to improve the node in the error message by suggesting a general solution because the solution, in this case, is application depended.

I'm not super happy regarding the code quality, but I'm happy to have feedback on it.

@rustbot r? @compiler-errors

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 24, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 24, 2022
@vincenzopalazzo vincenzopalazzo changed the title improve note on the when we impl of external trait on pointer add suggestion when there is a impl of external trait on pointer with wrong coherence rules Jul 24, 2022
@vincenzopalazzo vincenzopalazzo force-pushed the macros/impl_on_ptr branch 2 times, most recently from 119d42a to 07de5de Compare July 26, 2022 21:00
compiler/rustc_typeck/src/coherence/orphan.rs Outdated Show resolved Hide resolved
compiler/rustc_typeck/src/coherence/orphan.rs Outdated Show resolved Hide resolved
compiler/rustc_typeck/src/coherence/orphan.rs Outdated Show resolved Hide resolved
compiler/rustc_typeck/src/coherence/orphan.rs Outdated Show resolved Hide resolved
compiler/rustc_typeck/src/coherence/orphan.rs Outdated Show resolved Hide resolved
compiler/rustc_typeck/src/coherence/orphan.rs Show resolved Hide resolved
compiler/rustc_typeck/src/coherence/orphan.rs Outdated Show resolved Hide resolved
@vincenzopalazzo vincenzopalazzo force-pushed the macros/impl_on_ptr branch 2 times, most recently from ddf4d0c to e566a33 Compare July 27, 2022 21:48
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 28, 2022

📌 Commit 1e584d2 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 28, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 29, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#99686 (add suggestion when there is a impl of external trait on pointer with wrong coherence rules)
 - rust-lang#99760 (doc/rustc: describe the uefi target platforms)
 - rust-lang#99766 (Htmldocck: Substitute the doc channel when blessing)
 - rust-lang#99781 (Use String::from_utf8_lossy in CStr demo)
 - rust-lang#99803 (Update mentions to `rustc_metadata::rmeta::Lazy`)
 - rust-lang#99845 (Remove `$` prefix for bash scripts in doc)
 - rust-lang#99850 (rustdoc: Remove more Clean trait implementations)
 - rust-lang#99872 (Clone the `src/llvm-project` submodule if profiling is enabled)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a573adf into rust-lang:master Jul 29, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 29, 2022
@vincenzopalazzo vincenzopalazzo deleted the macros/impl_on_ptr branch July 29, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misleading error when implementing foreign trait on pointers to local types
5 participants