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

ices/95628.rs: fixed with errors #1214

Merged
merged 1 commit into from
Apr 14, 2022
Merged

ices/95628.rs: fixed with errors #1214

merged 1 commit into from
Apr 14, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#95628

#![feature(type_alias_impl_trait)]

type T = impl Sized;

struct Foo;

impl Into<T> for Foo {
    fn into(self) -> T {}
}

fn main(){
    let _: T = Foo.into();
}
=== stdout ===
=== stderr ===
error: cannot implement trait on type alias impl trait
 --> /home/runner/work/glacier/glacier/ices/95628.rs:7:11
  |
7 | impl Into<T> for Foo {
  |           ^
  |
note: type alias impl trait defined here
 --> /home/runner/work/glacier/glacier/ices/95628.rs:3:10
  |
3 | type T = impl Sized;
  |          ^^^^^^^^^^

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error: cannot implement trait on type alias impl trait
 --> /home/runner/work/glacier/glacier/ices/95628.rs:7:11
  |
7 | impl Into<T> for Foo {
  |           ^
  |
note: type alias impl trait defined here
 --> /home/runner/work/glacier/glacier/ices/95628.rs:3:10
  |
3 | type T = impl Sized;
  |          ^^^^^^^^^^

error: aborting due to previous error

==============
@JohnTitor JohnTitor merged commit 42edcd9 into master Apr 14, 2022
@JohnTitor JohnTitor deleted the autofix/ices/95628.rs branch April 14, 2022 15:13
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