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

ices/78456.rs: fixed with errors #534

Merged
merged 1 commit into from
Oct 31, 2020
Merged

ices/78456.rs: fixed with errors #534

merged 1 commit into from
Oct 31, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#78456

#![feature(type_alias_impl_trait)]
#![no_std]

pub trait Tr<'x> {
    type Fut: core::future::Future<Output = ()>;

    fn f() -> Self::Fut;
}

impl<'x> Tr<'x> for () {
    type Fut = impl core::future::Future<Output = ()>;

    fn f() -> Self::Fut {
        async {
            //if false {
            return ();
            //}
            let res: Undef = ();
            res
        }
    }
}
=== stdout ===
=== stderr ===
error[E0412]: cannot find type `Undef` in this scope
  --> /home/runner/work/glacier/glacier/ices/78456.rs:18:22
   |
18 |             let res: Undef = ();
   |                      ^^^^^ not found in this scope

error[E0601]: `main` function not found in crate `78456`
  --> /home/runner/work/glacier/glacier/ices/78456.rs:1:1
   |
1  | / #![feature(type_alias_impl_trait)]
2  | | #![no_std]
3  | |
4  | | pub trait Tr<'x> {
...  |
21 | |     }
22 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/78456.rs`

error: language item required, but not found: `eh_personality`

error: `#[panic_handler]` function required, but not found

warning: unreachable statement
  --> /home/runner/work/glacier/glacier/ices/78456.rs:18:13
   |
16 |             return ();
   |             --------- any code following this expression is unreachable
17 |             //}
18 |             let res: Undef = ();
   |             ^^^^^^^^^^^^^^^^^^^^ unreachable statement
   |
   = note: `#[warn(unreachable_code)]` on by default

error: aborting due to 4 previous errors; 1 warning emitted

Some errors have detailed explanations: E0412, E0601.
For more information about an error, try `rustc --explain E0412`.
==============

=== stdout ===
=== stderr ===
error[E0412]: cannot find type `Undef` in this scope
  --> /home/runner/work/glacier/glacier/ices/78456.rs:18:22
   |
18 |             let res: Undef = ();
   |                      ^^^^^ not found in this scope

error[E0601]: `main` function not found in crate `78456`
  --> /home/runner/work/glacier/glacier/ices/78456.rs:1:1
   |
1  | / #![feature(type_alias_impl_trait)]
2  | | #![no_std]
3  | |
4  | | pub trait Tr<'x> {
...  |
21 | |     }
22 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/78456.rs`

error: language item required, but not found: `eh_personality`

error: `#[panic_handler]` function required, but not found

warning: unreachable statement
  --> /home/runner/work/glacier/glacier/ices/78456.rs:18:13
   |
16 |             return ();
   |             --------- any code following this expression is unreachable
17 |             //}
18 |             let res: Undef = ();
   |             ^^^^^^^^^^^^^^^^^^^^ unreachable statement
   |
   = note: `#[warn(unreachable_code)]` on by default

error: aborting due to 4 previous errors; 1 warning emitted

Some errors have detailed explanations: E0412, E0601.
For more information about an error, try `rustc --explain E0412`.
==============
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.

Indeed this was duplicate of rust-lang/rust#77993.

@JohnTitor JohnTitor merged commit f4f1750 into master Oct 31, 2020
@JohnTitor JohnTitor deleted the autofix/ices/78456.rs branch October 31, 2020 12:27
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