Skip to content

Instantly share code, notes, and snippets.

@daboross
Created March 24, 2015 05:39
Show Gist options
  • Save daboross/6e008c98fff7f1bf5415 to your computer and use it in GitHub Desktop.
Save daboross/6e008c98fff7f1bf5415 to your computer and use it in GitHub Desktop.
fn main() {
let a = Box::new([0; isize::MAX]);
}
$ RUST_BACKTRACE=1 rustc test.rs
test.rs:2:26: 2:36 error: type `isize` does not implement any method in scope named `MAX`
test.rs:2 let a = Box::new([0; isize::MAX]);
^~~~~~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefPrimTy(TyInt(isize)), last_private: LastMod(AllPublic), depth: 1 }', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/middle/def.rs:79
stack backtrace:
1: 0x7f5f4f5efb84 - sys::backtrace::write::h5e3efc31357524bax4C
2: 0x7f5f4f618528 - panicking::on_panic::ha90a3694573d0234cjJ
3: 0x7f5f4f54bb0c - rt::unwind::begin_unwind_inner::hed207b77c3567743tZI
4: 0x7f5f4f54bef1 - rt::unwind::begin_unwind_fmt::hc68cf3a549295d5e4XI
5: 0x7f5f4d41db2c - middle::const_eval::eval_const_expr_partial::h12ddce37ea16da2avph
6: 0x7f5f4d6202bc - middle::ty::eval_repeat_count::h387b0361b68bceb5v55
7: 0x7f5f4e3554ed - check::check_expr_with_unifier::h9359096955431801547
8: 0x7f5f4e32ec08 - check::check_argument_types::h8d5e6036623af320aAp
9: 0x7f5f4e32b678 - check::callee::confirm_builtin_call::hc942a6dcdf6ffc17qkm
10: 0x7f5f4e32a0c1 - check::callee::check_call::h26cb5d092aa0c615Sam
11: 0x7f5f4e36d73c - check::check_expr_with_unifier::h5228973384822829375
12: 0x7f5f4e39498d - check::check_decl_local::h1d8aa7046af2d3baj2r
13: 0x7f5f4e343790 - check::check_block_with_expected::h48654249dc75ee7bq8r
14: 0x7f5f4e326359 - check::check_fn::hf00168574636b371ssn
15: 0x7f5f4e3403ce - check::check_bare_fn::h4aeaf589451764bd8hn
16: 0x7f5f4e338913 - check::check_item::h8c63c985a80d6d6cMAn
17: 0x7f5f4e40b787 - check_crate::closure.35943
18: 0x7f5f4e4064ca - check_crate::h4c34ce3ed2b7e6ceIhC
19: 0x7f5f4fc3d4c8 - driver::phase_3_run_analysis_passes::h66fdf3bbde068e6asGa
20: 0x7f5f4fc23db4 - driver::compile_input::hbb0d45c147e0b714Rba
21: 0x7f5f4fcdb822 - run_compiler::h7d24915e61095736v2b
22: 0x7f5f4fcd95f3 - thunk::F.Invoke<A, R>::invoke::h119471990717082172
23: 0x7f5f4fcd8a89 - rt::unwind::try::try_fn::h7237081841665992942
24: 0x7f5f4f68e358 - rust_try_inner
25: 0x7f5f4f68e345 - rust_try
26: 0x7f5f4fcd8dac - thunk::F.Invoke<A, R>::invoke::h12484507958770312030
27: 0x7f5f4f604b18 - sys::thread::create::thread_start::h05349c15f3b249d8oUH
28: 0x7f5f494d4181 - start_thread
29: 0x7f5f4f1b347c - __clone
30: 0x0 - <unknown>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment