Skip to content

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 (-Znext-solver) 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.
@matthewjasper matthewjasper force-pushed the min-spec-improvements branch from 1b76b8a to f46eabb Compare May 5, 2023 21:30
@compiler-errors
Copy link
Member

r? @compiler-errors @bors r+

@bors
Copy link
Collaborator

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
@workingjubilee workingjubilee added the F-min_specialization `#![feature(min_specialization)]` label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-min_specialization `#![feature(min_specialization)]` 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 (-Znext-solver)
Projects
None yet
7 participants