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

ices/86201.rs: fixed with errors #883

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86201

#![feature(unboxed_closures)]
#![feature(min_type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]

type FunType = impl Fn<()>;
static STATIC_FN: FunType = some_fn;

fn some_fn() {}

fn main() {
    let _: <FunType as FnOnce<()>>::Output = STATIC_FN();
}
=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/86201.rs:3:12
  |
3 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/86201.rs:6:29
  |
5 | type FunType = impl Fn<()>;
  |                ----------- the expected opaque type
6 | static STATIC_FN: FunType = some_fn;
  |                             ^^^^^^^ expected opaque type, found fn item
  |
  = note: expected opaque type `impl Fn<()>`
                 found fn item `fn() {some_fn}`

error: could not find defining uses
 --> /home/runner/work/glacier/glacier/ices/86201.rs:5:16
  |
5 | type FunType = impl Fn<()>;
  |                ^^^^^^^^^^^

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/86201.rs:3:12
  |
3 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/86201.rs:6:29
  |
5 | type FunType = impl Fn<()>;
  |                ----------- the expected opaque type
6 | static STATIC_FN: FunType = some_fn;
  |                             ^^^^^^^ expected opaque type, found fn item
  |
  = note: expected opaque type `impl Fn<()>`
                 found fn item `fn() {some_fn}`

error: could not find defining uses
 --> /home/runner/work/glacier/glacier/ices/86201.rs:5:16
  |
5 | type FunType = impl Fn<()>;
  |                ^^^^^^^^^^^

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0557.
For more information about an error, try `rustc --explain E0308`.
==============
@Alexendoo Alexendoo closed this Jul 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86201.rs branch July 23, 2021 18:49
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