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

Min specialization improvements #111252

Merged
merged 3 commits into from
May 9, 2023

Conversation

matthewjasper
Copy link
Contributor

  • Don't allow specialization impls with no items, such implementations are probably not correct and only occur as mistakes in the compiler and standard library
  • Fix a missing normalization call
  • Adds spans for lifetime errors from overly general specializations

Closes #79457
Closes #109815

Such implementations are usually mistakes and are not used in the
compiler or standard library (after this commit) so forbid them with
`min_specialization`.
@rustbot
Copy link
Collaborator

rustbot commented May 5, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels May 5, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 5, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@matthewjasper matthewjasper changed the title Min spec improvements Min specialization improvements May 5, 2023
@compiler-errors
Copy link
Member

r? types

@rustbot rustbot assigned spastorino and unassigned TaKO8Ki May 5, 2023
Add an obligation cause for these error so that the error points to the
implementations that caused the error.
@compiler-errors
Copy link
Member

r? @compiler-errors @bors r+

@bors
Copy link
Contributor

bors commented May 8, 2023

📌 Commit f46eabb has been approved by compiler-errors

It is now in the queue for this repository.

@rustbot rustbot assigned compiler-errors and unassigned spastorino May 8, 2023
@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 May 8, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#110304 (Add GNU Property Note)
 - rust-lang#110504 (Tweak borrow suggestion span)
 - rust-lang#110583 (tweak "make mut" spans when assigning to locals)
 - rust-lang#110694 (Implement builtin # syntax and use it for offset_of!(...))
 - rust-lang#111120 (Suggest let for possible binding with ty)
 - rust-lang#111252 (Min specialization improvements)
 - rust-lang#111361 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f748bb1 into rust-lang:master May 9, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 9, 2023
@matthewjasper matthewjasper deleted the min-spec-improvements branch May 9, 2023 19:32
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
6 participants