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

ices/89290.rs: fixed with errors #993

Merged
merged 1 commit into from
Oct 15, 2021
Merged

ices/89290.rs: fixed with errors #993

merged 1 commit into from
Oct 15, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#89290

#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]

const fn foo<T: ~const Drop>(_: T) {}

const fn bar() {
    foo(|| ());
}

pub fn main() {}
=== stdout ===
=== stderr ===
error[E0658]: function pointers cannot appear in constant functions
 --> /home/runner/work/glacier/glacier/ices/89290.rs:7:9
  |
7 |     foo(|| ());
  |         ^^^^^
  |
  = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
  = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0658]: function pointers cannot appear in constant functions
 --> /home/runner/work/glacier/glacier/ices/89290.rs:7:9
  |
7 |     foo(|| ());
  |         ^^^^^
  |
  = note: see issue #57563 <rust-lang/rust#57563> for more information
  = help: add `#![feature(const_fn_fn_ptr_basics)]` to the crate attributes to enable

error: aborting due to previous error

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

JohnTitor commented Oct 15, 2021

Fixed by rust-lang/rust#89247

@JohnTitor JohnTitor merged commit 32fe765 into master Oct 15, 2021
@JohnTitor JohnTitor deleted the autofix/ices/89290.rs branch October 15, 2021 16: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