You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and produces this error from the compiler with RUST_LOG=rustc=1:
task <unnamed> failed at 'assertion failed: !ty::type_has_params(*s)', /build/buildd/rust-nightly-201308162101~680eb71~raring/src/librustc/middle/trans/monomorphize.rs:78
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', /build/buildd/rust-nightly-201308162101~680eb71~raring/src/librustc/rustc.rs:371
I wouldn't expect the code above to actually compile, since the type parameter is missing, but it should show an error about that rather than an ICE.
Trying to fix the problem--changing the bare foo to foo::<int> in main, for instance--produced a normal compiler error: "this item does not take type parameters." That also seems wrong--if extern fns are not allowed to take type parameters, then shouldn't the compiler should complain about it at the definition? If they are allowed, then I should be able to take the address of one with the type parameter filled in. (Indeed, that should be required in order to use them.)
The text was updated successfully, but these errors were encountered:
I tried to create a generic extern fn, and accidentally left off the type parameter. That caused an ICE. This code reproduces it:
and produces this error from the compiler with
RUST_LOG=rustc=1
:I wouldn't expect the code above to actually compile, since the type parameter is missing, but it should show an error about that rather than an ICE.
Trying to fix the problem--changing the bare
foo
tofoo::<int>
inmain
, for instance--produced a normal compiler error: "this item does not take type parameters." That also seems wrong--if extern fns are not allowed to take type parameters, then shouldn't the compiler should complain about it at the definition? If they are allowed, then I should be able to take the address of one with the type parameter filled in. (Indeed, that should be required in order to use them.)The text was updated successfully, but these errors were encountered: