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

ices/22565.rs: fixed with errors #608

Merged
merged 1 commit into from
Jan 9, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 9, 2021

Issue: rust-lang/rust#22565

#![feature(fn_traits, unboxed_closures)]

struct A;
impl A {
    extern "rust-call" fn foo() {}
}

trait T {
    extern "rust-call" fn foo(i: i32) {}
}

struct B;

impl T for B {}

struct C;

impl FnOnce<i64> for C {
    type Output = ();
    extern "rust-call" fn call_once(mut self, _: i64) {}
}

fn main () {
    A::foo();
    <B as T>::foo(10);
}
=== stdout ===
=== stderr ===
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/22565.rs:5:5
  |
5 |     extern "rust-call" fn foo() {}
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

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/22565.rs:9:5
  |
9 |     extern "rust-call" fn foo(i: i32) {}
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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/22565.rs:20:5
   |
20 |     extern "rust-call" fn call_once(mut self, _: i64) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
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/22565.rs:5:5
  |
5 |     extern "rust-call" fn foo() {}
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

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/22565.rs:9:5
  |
9 |     extern "rust-call" fn foo(i: i32) {}
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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/22565.rs:20:5
   |
20 |     extern "rust-call" fn call_once(mut self, _: i64) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original issue was closed by rust-lang/rust#78961 but it used a different snippet as a regression test so it wasn't reported as fixed. Now the snippet here has been fixed by rust-lang/rust#79675.

@JohnTitor JohnTitor merged commit e5f7e76 into master Jan 9, 2021
@JohnTitor JohnTitor deleted the autofix/ices/22565.rs branch January 9, 2021 12:38
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