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

ices/74047.rs: fixed with errors #449

Merged
merged 1 commit into from
Jul 25, 2020
Merged

ices/74047.rs: fixed with errors #449

merged 1 commit into from
Jul 25, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#74047

use std::convert::{TryFrom, TryInto};
use std::io;

pub struct MyStream;
pub struct OtherStream;

pub async fn connect() -> io::Result<MyStream> {
    let stream: MyStream = OtherStream.try_into()?;
    Ok(stream)
}

impl TryFrom<OtherStream> for MyStream {}

fn main() {}
=== stdout ===
=== stderr ===
error[E0046]: not all trait items implemented, missing: `Error`, `try_from`
  --> /home/runner/work/glacier/glacier/ices/74047.rs:12:1
   |
12 | impl TryFrom<OtherStream> for MyStream {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Error`, `try_from` in implementation
   |
   = help: implement the missing item: `type Error = Type;`
   = help: implement the missing item: `fn try_from(_: T) -> std::result::Result<Self, <Self as std::convert::TryFrom<T>>::Error> { todo!() }`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0046`.
==============

=== stdout ===
=== stderr ===
error[E0046]: not all trait items implemented, missing: `Error`, `try_from`
  --> /home/runner/work/glacier/glacier/ices/74047.rs:12:1
   |
12 | impl TryFrom<OtherStream> for MyStream {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Error`, `try_from` in implementation
   |
   = help: implement the missing item: `type Error = Type;`
   = help: implement the missing item: `fn try_from(_: T) -> std::result::Result<Self, <Self as std::convert::TryFrom<T>>::Error> { todo!() }`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0046`.
==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

The issue is closed as fixed.

@JohnTitor JohnTitor merged commit 29cee5c into master Jul 25, 2020
@JohnTitor JohnTitor deleted the autofix/ices/74047.rs branch July 25, 2020 12:17
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