Closed
Description
Hey, here's the compiler error :
rustc --out-dir=lib src/rgsl.rs
src/types/rng.rs:76:39: 76:101 error: function calls in constants are limited to struct and enum constructors [E0015]
src/types/rng.rs:76 pub static DefaultRngType : RngType = ffi::FFI::wrap(ffi::gsl_rng_default as *mut ffi::gsl_rng_type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/types/rng.rs:76:39: 76:53 error: paths in constants may only refer to constants or functions [E0014]
src/types/rng.rs:76 pub static DefaultRngType : RngType = ffi::FFI::wrap(ffi::gsl_rng_default as *mut ffi::gsl_rng_type);
^~~~~~~~~~~~~~
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'expected item, found foreign item ffi::gsl_rng_default::gsl_rng_default (id=77)', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/ast_map/mod.rs:278
stack backtrace:
1: 0x2b06fdd678d0 - rt::backtrace::imp::write::hd12ae02842755623o1q
2: 0x2b06fdd6a970 - failure::on_fail::h6afb6f0ebb5c1bdeBmr
3: 0x2b06fd5f4bb0 - unwind::begin_unwind_inner::h86392b0c3fc310f0M8d
4: 0x2b06fd5f48a0 - unwind::begin_unwind_fmt::hd35db468d804f365h6d
5: 0x2b06feb04f80 - ast_map::Map::expect_item::h4597d80f1ef5aa9cILy
6: 0x2b06fc46c270 - middle::check_const::CheckItemRecursionVisitor<'a>.Visitor<(*>::visit_expr::h2e9f3d299534964bjPl
7: 0x2b06fc46c270 - middle::check_const::CheckItemRecursionVisitor<'a>.Visitor<(*>::visit_expr::h2e9f3d299534964bjPl
8: 0x2b06fc46c270 - middle::check_const::CheckItemRecursionVisitor<'a>.Visitor<(*>::visit_expr::h2e9f3d299534964bjPl
9: 0x2b06fc46af70 - middle::check_const::CheckItemRecursionVisitor<'a>.Visitor<(*>::visit_item::h8a613a9edea4e565oOl
10: 0x2b06fc466090 - middle::check_const::check_item::h267c6ba5219e9e33Yul
11: 0x2b06fc466090 - middle::check_const::check_item::h267c6ba5219e9e33Yul
12: 0x2b06fc466090 - middle::check_const::check_item::h267c6ba5219e9e33Yul
13: 0x2b06fc469490 - middle::check_const::check_crate::h65bbcf0bb3bc1b23zul
14: 0x2b06fc21e400 - util::common::time::h7327768964783328304
15: 0x2b06fcadb690 - driver::driver::phase_3_run_analysis_passes::hb464148d666a3b1afJw
16: 0x2b06fcad67d0 - driver::driver::compile_input::h638ffee922a36ddauvw
17: 0x2b06fcb80820 - driver::run_compiler::h5ecca9beeafb5864JZz
18: 0x2b06fcb80730 - driver::main_args::closure.136214
19: 0x2b06fcb93080 - task::TaskBuilder<S>::try_future::closure.137375
20: 0x2b06fcb92e80 - task::TaskBuilder<S>::spawn_internal::closure.137352
21: 0x2b06fbf2da20 - task::spawn_opts::closure.8315
22: 0x2b06fd64c750 - rust_try_inner
23: 0x2b06fd64c740 - rust_try
24: 0x2b06fd5f2210 - unwind::try::ha10f578e4c63e61ehXd
25: 0x2b06fd5f1fb0 - task::Task::run::hddad80091d517d7cT4c
26: 0x2b06fbf2d7e0 - task::spawn_opts::closure.8261
27: 0x2b06fd5f3df0 - thread::thread_start::h182a6a945c32d2093sd
28: 0x2b06fe3f10c0 - start_thread
29: 0x2b06fda0c359 - __clone
30: 0x0 - <unknown>
make: *** [rgsl] Error 101