Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
RalfJung:min-spec
May 12, 2020
Merged

use min_specialization for some rustc crates where it requires no changes#72044
bors merged 1 commit into
rust-lang:masterfrom
RalfJung:min-spec

Conversation

@RalfJung

Copy link
Copy Markdown
Member

and add FIXME for the rest

Cc @matthewjasper

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @varkor

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 9, 2020
Comment threadsrc/librustc_metadata/lib.rs Outdated

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
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
Copy Markdown
Contributor

Can you test libserialize as well?

@RalfJung

Copy link
Copy Markdown
MemberAuthor

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

@RalfJung

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented May 9, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 6f5310bdb207439d8f1ca6f17ed22c158e14339e has been approved by matthewjasper

@borsbors 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

bors commented May 9, 2020

Copy link
Copy Markdown
Collaborator

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

@borsbors 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
Copy Markdown

@bors r-

@RalfJung

Copy link
Copy Markdown
MemberAuthor

rebased
@bors r=matthewjasper

@bors

bors commented May 10, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit c82103c has been approved by matthewjasper

@borsbors 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
@varkorvarkor assigned matthewjasper and unassigned varkorMay 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
@RalfJungRalfJung mentioned this pull request May 11, 2020
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
This was referenced May 11, 2020
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:masterMay 12, 2020
@RalfJung
RalfJung deleted the min-spec branch May 12, 2020 07:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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

@RalfJung@rust-highfive@matthewjasper@bors@Dylan-DPC-zz@varkor