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

ices/53092.rs: fixed with errors #890

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#53092

#![feature(min_type_alias_impl_trait)]
#![allow(dead_code)]

type Bug<T, U> = impl Fn(T) -> U + Copy;

const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };

fn make_bug<T, U: From<T>>() -> Bug<T, U> {
    |x| x.into()
}

fn main() {
    CONST_BUG(0);
}
=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/53092.rs:1:12
  |
1 | #![feature(min_type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of full type_alias_impl_trait

error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/53092.rs:4:18
  |
4 | type Bug<T, U> = impl Fn(T) -> U + Copy;
  |                  ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/53092.rs:1:12
  |
1 | #![feature(min_type_alias_impl_trait)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of full type_alias_impl_trait

error[E0658]: `impl Trait` in type aliases is unstable
 --> /home/runner/work/glacier/glacier/ices/53092.rs:4:18
  |
4 | type Bug<T, U> = impl Fn(T) -> U + Copy;
  |                  ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #63063 <rust-lang/rust#63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0557, E0658.
For more information about an error, try `rustc --explain E0557`.
==============
@Alexendoo
Copy link
Member

46dba1a

@Alexendoo Alexendoo closed this Jul 29, 2021
@Alexendoo Alexendoo deleted the autofix/ices/53092.rs branch July 29, 2021 12:36
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