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

ices/74280.rs: fixed with errors #885

Merged
merged 1 commit into from
Jul 24, 2021
Merged

ices/74280.rs: fixed with errors #885

merged 1 commit into from
Jul 24, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#74280

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

type Test = impl Copy;

fn test() -> Test {
    let y = || -> Test { () };
    7
}

fn main() {}
=== stdout ===
=== stderr ===
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/74280.rs:2:12
  |
2 | #![feature(type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information

error: concrete type differs from previous defining opaque type use
 --> /home/runner/work/glacier/glacier/ices/74280.rs:7:13
  |
7 |     let y = || -> Test { () };
  |             ^^^^^^^^^^^^^^^^^ expected `i32`, got `()`
  |
note: previous use here
 --> /home/runner/work/glacier/glacier/ices/74280.rs:6:1
  |
6 | fn test() -> Test {
  | ^^^^^^^^^^^^^^^^^

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/74280.rs:2:12
  |
2 | #![feature(type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #63063 <rust-lang/rust#63063> for more information

error: concrete type differs from previous defining opaque type use
 --> /home/runner/work/glacier/glacier/ices/74280.rs:7:13
  |
7 |     let y = || -> Test { () };
  |             ^^^^^^^^^^^^^^^^^ expected `i32`, got `()`
  |
note: previous use here
 --> /home/runner/work/glacier/glacier/ices/74280.rs:6:1
  |
6 | fn test() -> Test {
  | ^^^^^^^^^^^^^^^^^

error: aborting due to previous error; 1 warning emitted

==============
@Alexendoo Alexendoo merged commit b11d6fb into master Jul 24, 2021
@Alexendoo Alexendoo deleted the autofix/ices/74280.rs branch July 24, 2021 13:55
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