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

Deny specializing items not in the parent impl #64564

Merged
merged 8 commits into from
Oct 6, 2019
Merged

Deny specializing items not in the parent impl #64564

merged 8 commits into from
Oct 6, 2019

Conversation

jonas-schievink
Copy link
Contributor

@jonas-schievink jonas-schievink commented Sep 17, 2019

Part of #29661 (rust-lang/rfcs#2532). At least sort of?

This was discussed in #61812 (comment) and is needed for that PR to make progress (fixing an unsoundness).

One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it default (ie. there is no syntax to forward this impl method to the provided trait method).

cc @Centril and @arielb1

@rust-highfive
Copy link
Collaborator

r? @zackmdavis

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 17, 2019
@jonas-schievink jonas-schievink added A-specialization Area: Trait impl specialization F-specialization `#![feature(specialization)]` labels Sep 17, 2019
@Centril Centril added the F-associated_type_defaults `#![feature(associated_type_defaults)]` label Sep 17, 2019
@rust-highfive

This comment has been minimized.

@Centril
Copy link
Contributor

Centril commented Sep 17, 2019

r? @nikomatsakis

@jonas-schievink
Copy link
Contributor Author

Ah I forgot that we wanted to crater this.

@bors try

@bors
Copy link
Contributor

bors commented Sep 19, 2019

⌛ Trying commit 88f3075 with merge 8d67a66...

bors added a commit that referenced this pull request Sep 19, 2019
Deny specializing items not in the parent impl

Part of #29661 (rust-lang/rfcs#2532). At least sort of?

This was discussed in #61812 (comment) and is needed for that PR to make progress (fixing an unsoundness).

One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it `default` (ie. there is no syntax to forward this impl method to the provided trait method).

cc @Centril and @arielb1
@bors
Copy link
Contributor

bors commented Sep 19, 2019

☀️ Try build successful - checks-azure
Build commit: 8d67a66

@Centril
Copy link
Contributor

Centril commented Sep 19, 2019

@craterbot run mode=check-only

@craterbot
Copy link
Collaborator

👌 Experiment pr-64564 created and queued.
🤖 Automatically detected try build 8d67a66
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2019
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me once crater run is complete etc

@craterbot
Copy link
Collaborator

🚧 Experiment pr-64564 is now running on agent aws-1.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-64564 is completed!
📊 49 regressed and 3 fixed (74234 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Oct 5, 2019
@jonas-schievink
Copy link
Contributor Author

Summary

There are 7 root regressions: pyo3, tao-of-rust, paperclip-core, kompact, serde_traitobject, mockiato and incrust.

There is one seemingly unrelated build failure in moxie.

Full Analysis

pyo3

  • Axect/freeze_out
  • JellyWX/md-html
  • RuneBlazer/kmer_vec
  • StephanHeijl/global-supertrees
  • a-hacker/PyRounders
  • aleozlx/sturdy-engine
  • ckaran/pyo3_issue_report
  • cualbondi/pyosmptparser
  • cybermatt/fast-luhn
  • dante-signal31/steganer
  • deaz/pyo3-test
  • gavrie/trial_division
  • hhatto/fcsv
  • hhatto/fpath
  • kdar/rust-python-example
  • mozilla/pyo3-parsepatch
  • nikhilmitrax/python-oxidation
  • omerbenamram/pyevtx-rs
  • omerbenamram/pymft-rs
  • omerbenamram/pyo3-file
  • pattonw/rust-pyn5
  • petervaro/rusty-python-fibonacci
  • rdeaton/pyskim
  • sbdchd/codeowners
  • dict_derive
  • inline-python-macros
  • inline-python
  • mbf_gtf
  • numpy
  • orkhon
  • pyo3-built
  • pyo3-file
  • pyrus-nn
  • retworkx
  • spellcheck-rs

tao-of-rust

paperclip-core:

  • paperclip-actix

kompact:

  • Max-Meldrum/kompact_template

serde_traitobject

  • alecmocatta/deploy

mockiato

  • jeremystucki/mvr
  • myelin-ai/engine
  • myelin-engine

incrust

moxie

@jonas-schievink
Copy link
Contributor Author

Okay, given that there are only 7 root regressions (meaning that only 7 projects need to be fixed after landing this), and this is an unstable feature anyways, I'm going to go ahead and:

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Oct 6, 2019

📌 Commit 47f89e7 has been approved by nikomatsakis

@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 Oct 6, 2019
@bors
Copy link
Contributor

bors commented Oct 6, 2019

⌛ Testing commit 47f89e7 with merge 421bd77...

bors added a commit that referenced this pull request Oct 6, 2019
Deny specializing items not in the parent impl

Part of #29661 (rust-lang/rfcs#2532). At least sort of?

This was discussed in #61812 (comment) and is needed for that PR to make progress (fixing an unsoundness).

One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it `default` (ie. there is no syntax to forward this impl method to the provided trait method).

cc @Centril and @arielb1
@bors
Copy link
Contributor

bors commented Oct 6, 2019

☀️ Test successful - checks-azure
Approved by: nikomatsakis
Pushing 421bd77 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 6, 2019
@bors bors merged commit 47f89e7 into rust-lang:master Oct 6, 2019
@jonas-schievink jonas-schievink deleted the cowardly-default branch October 7, 2019 13:43
luxrck added a commit to luxrck/distances that referenced this pull request Nov 8, 2019
bors added a commit that referenced this pull request Feb 26, 2020
Implement RFC 2532 – Associated Type Defaults

This is a partial implementation that is still missing the changes to object types, since I ran into some trouble while implementing that. I'm opening this part already to get feedback on the implementation and the unexpected test fallout (see my comments below). The remaining changes can be done in a later PR.

Blockers before this can land:
* [x] Resolve unsoundness around interaction with specialization (#61812 (comment)) - #64564

cc #29661
Fixes #53907
Fixes #54182
Fixes #62211
Fixes #41868
Fixes #63593
Fixes #47385
Fixes #43924
Fixes #32350
Fixes #26681
Fixes #67187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-specialization Area: Trait impl specialization F-associated_type_defaults `#![feature(associated_type_defaults)]` F-specialization `#![feature(specialization)]` merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants