-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE when simplest rust-call method is called #22565
Comments
Alternative backtrace: trait B {
extern "rust-call" fn b(i: i32) {}
}
struct A;
impl B for A {}
fn main () {
<A as B>::b(10);
}
|
Triage: still ICEs. #![feature(unboxed_closures)]
struct A;
impl A {
extern "rust-call" fn b() {}
}
fn main () {
A::b();
} |
Also reachable more "legitimately" #![feature(unboxed_closures, core)]
pub struct HttpConnector<T = NoSslVerify>(Option<T>);
pub struct NoSslVerify;
impl<'a> FnOnce<&'a mut u8> for NoSslVerify {
type Output = ();
#[inline(always)]
extern "rust-call" fn call_once(self, _: (&mut u8)) {}
} |
Triage: tracked by glacier |
Ran into this same bug in a way very similar to @arielb1. Of course, it's my fault: I should have used #![feature(fn_traits)]
#![feature(unboxed_closures)]
struct Foo;
impl FnOnce<i64> for Foo {
type Output = ();
extern "rust-call" fn call_once(mut self, _: i64) { }
}
fn main() { }
Couldn't get a backtrace because whenever I set |
Doesn't ICE anymore with current nightly (1.28.0 2018-06-22 cbc4c83). |
The ICE returned, |
CC #34901. |
I think this problem can only be witnessed via use of But still, based on that dependence on an unstable feature that is not currently on the 2019 roadmap, I am going to triage this as P-medium for now. If however someone can demonstrate a use of this ICE-vector via stable code (something I tried to do by going through the instances of |
Still ICEs, even with a simple standing function. Doesn't error when not calling the function. |
No, it should have a dedicated error where the ICE is being emitted pointing at the definition saying "this |
I meant emit the error (or the ICE) when using |
Make bad "rust-call" arguments no longer ICE The simplest of bad rust-call definitions will no longer cause an ICE. There is a FIXME added for future work, as I wanted to get this easy fix in before trying to either add a hack or mess with the whole obligation system fixes rust-lang#22565
Make bad "rust-call" arguments no longer ICE The simplest of bad rust-call definitions will no longer cause an ICE. There is a FIXME added for future work, as I wanted to get this easy fix in before trying to either add a hack or mess with the whole obligation system fixes rust-lang#22565
Derivation of #16039, which was closed because it failed to compile for other reasons:
The text was updated successfully, but these errors were encountered: