Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/109815.rs: fixed with errors #1583

Merged
merged 1 commit into from
May 11, 2023
Merged

ices/109815.rs: fixed with errors #1583

merged 1 commit into from
May 11, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#109815

#![crate_type="lib"]
#![feature(min_specialization)]

trait X {}
trait Y: X {}
trait Z {
    type Assoc: Y;
}
struct A<T>(T);

impl<T: X> Z for A<T> {}

impl<T: X> From<<A<T> as Z>::Assoc> for T {}


fn main() {}
=== stdout ===
=== stderr ===
error: specialization impl does not specialize any associated items
  --> /home/runner/work/glacier/glacier/ices/109815.rs:13:1
   |
13 | impl<T: X> From<<A<T> as Z>::Assoc> for T {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: impl is a specialization of this impl
  --> /rustc/2f6bc5d259e7ab25ddfdd33de53b892770218918/library/core/src/convert/mod.rs:723:1

error: cannot specialize on trait `X`
  --> /home/runner/work/glacier/glacier/ices/109815.rs:13:9
   |
13 | impl<T: X> From<<A<T> as Z>::Assoc> for T {}
   |         ^

error: aborting due to 2 previous errors

==============

=== stdout ===
=== stderr ===
error: specialization impl does not specialize any associated items
  --> /home/runner/work/glacier/glacier/ices/109815.rs:13:1
   |
13 | impl<T: X> From<<A<T> as Z>::Assoc> for T {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: impl is a specialization of this impl
  --> /rustc/2f6bc5d259e7ab25ddfdd33de53b892770218918/library/core/src/convert/mod.rs:723:1

error: cannot specialize on trait `X`
  --> /home/runner/work/glacier/glacier/ices/109815.rs:13:9
   |
13 | impl<T: X> From<<A<T> as Z>::Assoc> for T {}
   |         ^

error: aborting due to 2 previous errors

==============
@Alexendoo Alexendoo merged commit c451786 into master May 11, 2023
@Alexendoo Alexendoo deleted the autofix/ices/109815.rs branch May 11, 2023 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants