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

ices/69487.rs: fixed with errors #549

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#69487

#![feature(const_trait_impl)]
#![feature(fn_traits)]
#![feature(unboxed_closures)]

struct Closure;

impl const FnOnce<&usize> for Closure {
    type Output = usize;
    
    extern "rust-call" fn call_once(self, arg: &usize) -> Self::Output {
        *arg
    }
}

enum Bug<T = [(); Closure.call_once(&0) ]> {
    V(T),
}

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

error: A function with the "rust-call" ABI must take a single non-self argument that is a tuple
  --> /home/runner/work/glacier/glacier/ices/69487.rs:10:5
   |
10 |     extern "rust-call" fn call_once(self, arg: &usize) -> Self::Output {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error; 1 warning emitted

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

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

error: A function with the "rust-call" ABI must take a single non-self argument that is a tuple
  --> /home/runner/work/glacier/glacier/ices/69487.rs:10:5
   |
10 |     extern "rust-call" fn call_once(self, arg: &usize) -> Self::Output {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error; 1 warning emitted

==============
@Alexendoo Alexendoo closed this in d9b0e56 Nov 21, 2020
@Alexendoo Alexendoo deleted the autofix/ices/69487.rs branch November 21, 2020 18:33
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.

1 participant