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

use min_specialization for some rustc crates where it requires no changes #72044

Merged
merged 1 commit into from
May 12, 2020

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented May 9, 2020

and add FIXME for the rest

Cc @matthewjasper

@rust-highfive
Copy link
Collaborator

r? @varkor

(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 May 9, 2020
@@ -7,7 +7,7 @@
#![feature(nll)]
#![feature(or_patterns)]
#![feature(proc_macro_internals)]
#![feature(specialization)]
#![feature(specialization)] // FIXME: min_specialization ICEs
Copy link
Member Author

Choose a reason for hiding this comment

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

@matthewjasper ICEs shouldn't happen, should they?

error: internal compiler error: src/librustc_trait_selection/traits/specialize/mod.rs:101: When translating substitutions for specialization, the expected specialization failed to hold

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:904:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Copy link
Contributor

Choose a reason for hiding this comment

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

They shouldn't, but the feature has pretty limited testing.

@matthewjasper
Copy link
Contributor

Can you test libserialize as well?

@RalfJung
Copy link
Member Author

RalfJung commented May 9, 2020

Ah I only grepped in libr*and missed that one... on it.

@RalfJung
Copy link
Member Author

RalfJung commented May 9, 2020

Nope that did not work.

error: cannot specialize on trait `serialize::Encodable`
   --> src/libserialize/serialize.rs:644:1
    |
644 | / impl<T: ?Sized + Encodable> Encodable for Box<T> {
645 | |     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
646 | |         (**self).encode(s)
647 | |     }
648 | | }
    | |_^

error: cannot specialize on trait `serialize::Decodable`
   --> src/libserialize/serialize.rs:650:1
    |
650 | / impl<T: Decodable> Decodable for Box<T> {
651 | |     fn decode<D: Decoder>(d: &mut D) -> Result<Box<T>, D::Error> {
652 | |         Ok(box Decodable::decode(d)?)
653 | |     }
654 | | }
    | |_^

And if I mark those as specializable then tons of other impls fail.

@matthewjasper
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 9, 2020

📌 Commit 6f5310bdb207439d8f1ca6f17ed22c158e14339e has been approved by matthewjasper

@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 9, 2020
@bors
Copy link
Contributor

bors commented May 9, 2020

☔ The latest upstream changes (presumably #72041) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 9, 2020
@Dylan-DPC-zz
Copy link

@bors r-

@RalfJung
Copy link
Member Author

rebased
@bors r=matthewjasper

@bors
Copy link
Contributor

bors commented May 10, 2020

📌 Commit c82103c has been approved by matthewjasper

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 10, 2020
@varkor varkor assigned matthewjasper and unassigned varkor May 10, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 10, 2020
use min_specialization for some rustc crates where it requires no changes

and add FIXME for the rest

Cc @matthewjasper
RalfJung added a commit to RalfJung/rust that referenced this pull request May 11, 2020
use min_specialization for some rustc crates where it requires no changes

and add FIXME for the rest

Cc @matthewjasper
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 11, 2020
use min_specialization for some rustc crates where it requires no changes

and add FIXME for the rest

Cc @matthewjasper
bors added a commit to rust-lang-ci/rust that referenced this pull request May 11, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#72014 (Deprecated emoji)
 - rust-lang#72019 (Fix debug assertion in error code)
 - rust-lang#72027 (Use CDN for ci-caches on download)
 - rust-lang#72044 (use min_specialization for some rustc crates where it requires no changes)
 - rust-lang#72052 (display `ConstKind::Param`)
 - rust-lang#72067 (Emit a warning when optimization fuel runs out)
 - rust-lang#72072 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity)
 - rust-lang#72077 (Improve E0571 wording)
 - rust-lang#72107 (Clean up E0579 explanation)
 - rust-lang#72109 (Fix clippy warnings)

Failed merges:

r? @ghost
@bors bors merged commit eade6f7 into rust-lang:master May 12, 2020
@RalfJung RalfJung deleted the min-spec branch May 12, 2020 07:11
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants