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

Conversation

@jonas-schievink
Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator

commented Sep 17, 2019

r? @zackmdavis

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

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

commented Sep 17, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-09-17T22:13:37.4169490Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-17T22:13:37.4411747Z ##[command]git config gc.auto 0
2019-09-17T22:13:37.4473175Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-17T22:13:37.4528625Z ##[command]git config --get-all http.proxy
2019-09-17T22:13:37.4670199Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64564/merge:refs/remotes/pull/64564/merge
---
2019-09-17T22:49:23.2172133Z    Compiling arena v0.0.0 (/checkout/src/libarena)
2019-09-17T22:49:33.1020412Z    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-09-17T22:49:41.5974811Z    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
2019-09-17T22:50:02.2506228Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2019-09-17T22:50:26.7031608Z error[E0520]: `cache_on_disk` specializes an item from a parent `impl`, but that item is not marked `default`
2019-09-17T22:50:26.7033157Z     --> src/librustc/query/mod.rs:31:1
2019-09-17T22:50:26.7034090Z      |
2019-09-17T22:50:26.7034714Z 31   |   rustc_queries! {
2019-09-17T22:50:26.7035323Z      |  _^
2019-09-17T22:50:26.7036488Z      | |
2019-09-17T22:50:26.7037490Z 32   | |     Other {
2019-09-17T22:50:26.7038283Z 33   | |         /// Records the type of every item.
2019-09-17T22:50:26.7038283Z 33   | |         /// Records the type of every item.
2019-09-17T22:50:26.7038973Z 34   | |         query type_of(key: DefId) -> Ty<'tcx> {
2019-09-17T22:50:26.7040527Z 1136 | |     }
2019-09-17T22:50:26.7041171Z 1137 | | }
2019-09-17T22:50:26.7041778Z      | | ^
2019-09-17T22:50:26.7042535Z      | |_|
2019-09-17T22:50:26.7042535Z      | |_|
2019-09-17T22:50:26.7043468Z      | |_cannot specialize default item `cache_on_disk`
2019-09-17T22:50:26.7044704Z      | 
2019-09-17T22:50:26.7045272Z     ::: /checkout/src/librustc_macros/src/lib.rs:22:1
2019-09-17T22:50:26.7045957Z      |
2019-09-17T22:50:26.7045957Z      |
2019-09-17T22:50:26.7046881Z 22   | / pub fn symbols(input: TokenStream) -> TokenStream {
2019-09-17T22:50:26.7048261Z 23   | |     symbols::symbols(input)
2019-09-17T22:50:26.7048959Z 24   | | }
2019-09-17T22:50:26.7050180Z      | |_- in this expansion of `rustc_queries!`
2019-09-17T22:50:26.7053032Z     ::: src/librustc/ty/query/config.rs:67:1
2019-09-17T22:50:26.7054821Z      |
2019-09-17T22:50:26.7054821Z      |
2019-09-17T22:50:26.7055481Z 67   | / impl<'tcx, M: QueryAccessors<'tcx, Key = DefId>> QueryDescription<'tcx> for M {
2019-09-17T22:50:26.7056039Z 68   | |     default fn describe(tcx: TyCtxt<'_>, def_id: DefId) -> Cow<'static, str> {
2019-09-17T22:50:26.7056512Z 69   | |         if !tcx.sess.verbose() {
2019-09-17T22:50:26.7057943Z 70   | |             format!("processing `{}`", tcx.def_path_str(def_id)).into()
2019-09-17T22:50:26.7059738Z 75   | |     }
2019-09-17T22:50:26.7060777Z 76   | | }
2019-09-17T22:50:26.7060777Z 76   | | }
2019-09-17T22:50:26.7061568Z      | |_- parent `impl` is here
2019-09-17T22:50:26.7090710Z      |
2019-09-17T22:50:26.7091419Z      = note: to specialize, `cache_on_disk` in the parent `impl` must be marked `default`
2019-09-17T22:50:26.7091751Z 
2019-09-17T22:50:26.7908505Z error[E0520]: `try_load_from_disk` specializes an item from a parent `impl`, but that item is not marked `default`
2019-09-17T22:50:26.7909942Z     --> src/librustc/query/mod.rs:31:1
2019-09-17T22:50:26.7910551Z      |
2019-09-17T22:50:26.7911153Z 31   |   rustc_queries! {
2019-09-17T22:50:26.7911592Z      |  _^
2019-09-17T22:50:26.7912890Z      | |
2019-09-17T22:50:26.7913366Z 32   | |     Other {
2019-09-17T22:50:26.7913873Z 33   | |         /// Records the type of every item.
2019-09-17T22:50:26.7913873Z 33   | |         /// Records the type of every item.
2019-09-17T22:50:26.7914424Z 34   | |         query type_of(key: DefId) -> Ty<'tcx> {
2019-09-17T22:50:26.7915451Z 1136 | |     }
2019-09-17T22:50:26.7915892Z 1137 | | }
2019-09-17T22:50:26.7916480Z      | | ^
2019-09-17T22:50:26.7917629Z      | |_|
2019-09-17T22:50:26.7917629Z      | |_|
2019-09-17T22:50:26.7918280Z      | |_cannot specialize default item `try_load_from_disk`
2019-09-17T22:50:26.7919207Z      | 
2019-09-17T22:50:26.7919675Z     ::: /checkout/src/librustc_macros/src/lib.rs:22:1
2019-09-17T22:50:26.7920086Z      |
2019-09-17T22:50:26.7920086Z      |
2019-09-17T22:50:26.7920597Z 22   | / pub fn symbols(input: TokenStream) -> TokenStream {
2019-09-17T22:50:26.7921254Z 23   | |     symbols::symbols(input)
2019-09-17T22:50:26.7921833Z 24   | | }
2019-09-17T22:50:26.7922309Z      | |_- in this expansion of `rustc_queries!`
2019-09-17T22:50:26.7923228Z     ::: src/librustc/ty/query/config.rs:67:1
2019-09-17T22:50:26.7923644Z      |
2019-09-17T22:50:26.7923644Z      |
2019-09-17T22:50:26.7924162Z 67   | / impl<'tcx, M: QueryAccessors<'tcx, Key = DefId>> QueryDescription<'tcx> for M {
2019-09-17T22:50:26.7924844Z 68   | |     default fn describe(tcx: TyCtxt<'_>, def_id: DefId) -> Cow<'static, str> {
2019-09-17T22:50:26.7925387Z 69   | |         if !tcx.sess.verbose() {
2019-09-17T22:50:26.7925975Z 70   | |             format!("processing `{}`", tcx.def_path_str(def_id)).into()
2019-09-17T22:50:26.7926878Z 75   | |     }
2019-09-17T22:50:26.7928220Z 76   | | }
2019-09-17T22:50:26.7928220Z 76   | | }
2019-09-17T22:50:26.7928815Z      | |_- parent `impl` is here
2019-09-17T22:50:26.7929331Z      |
2019-09-17T22:50:26.7930273Z      = note: to specialize, `try_load_from_disk` in the parent `impl` must be marked `default`
2019-09-17T22:50:46.1237470Z error: aborting due to 2 previous errors
2019-09-17T22:50:46.1241886Z 
2019-09-17T22:50:46.1248780Z For more information about this error, try `rustc --explain E0520`.
2019-09-17T22:50:46.4325251Z error: Could not compile `rustc`.
---
2019-09-17T22:51:50.7086399Z == clock drift check ==
2019-09-17T22:51:50.7101861Z   local time: Tue Sep 17 22:51:50 UTC 2019
2019-09-17T22:51:50.8619860Z   network time: Tue, 17 Sep 2019 22:51:50 GMT
2019-09-17T22:51:50.8620211Z == end clock drift check ==
2019-09-17T22:51:51.9441780Z ##[error]Bash exited with code '1'.
2019-09-17T22:51:51.9493040Z ##[section]Starting: Checkout
2019-09-17T22:51:51.9495557Z ==============================================================================
2019-09-17T22:51:51.9495607Z Task         : Get sources
2019-09-17T22:51:51.9495668Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

@jonas-schievink

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2019

Ah I forgot that we wanted to crater this.

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

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

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 19, 2019

@craterbot run mode=check-only

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Sep 19, 2019

👌 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

Copy link
Contributor

left a comment

r=me once crater run is complete etc

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Sep 30, 2019

🚧 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

This comment has been minimized.

Copy link
Collaborator

commented Oct 5, 2019

🎉 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

@jonas-schievink

This comment has been minimized.

Copy link
Member Author

commented Oct 5, 2019

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 jonas-schievink force-pushed the jonas-schievink:cowardly-default branch from 88f3075 to 47f89e7 Oct 5, 2019
@jonas-schievink

This comment has been minimized.

Copy link
Member Author

commented Oct 6, 2019

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

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2019

📌 Commit 47f89e7 has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Oct 6, 2019

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

@bors bors added the merged-by-bors label Oct 6, 2019
@bors bors merged commit 47f89e7 into rust-lang:master Oct 6, 2019
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20191005.14 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@jonas-schievink jonas-schievink deleted the jonas-schievink:cowardly-default branch Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.