Skip to content

ICE: 'rustc' panicked at 'assertion failed: *start <= *end' in slice.rs:396 #18490

Closed
@mitchmindtree

Description

@mitchmindtree
Contributor

I'm getting the following ICE

mindTree:RustyJen Mitch$ cargo build                                                                               
   Compiling jen v0.0.0 (file:///Users/Mitch/Programming/Rust/RustyJen)                                            
error: internal compiler error: unexpected panic                                                                   
note: the compiler unexpectedly panicked. 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' panicked at 'assertion failed: *start <= *end', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/b
uild/src/libcore/slice.rs:396                                                                                      

when compiling my project against the latest OSX nightly rustc 0.13.0-nightly (221fc1e3c 2014-10-31 02:27:15 +0000).

Activity

msiemens

msiemens commented on Oct 31, 2014

@msiemens
Contributor

Could you run cargo build again with RUST_BACKTRACE=1 (= RUST_BACKTRACE=1 cargo build) and post the backtrace here?

mitchmindtree

mitchmindtree commented on Oct 31, 2014

@mitchmindtree
ContributorAuthor

oh, of course!

   Compiling jen v0.0.0 (file:///Users/Mitch/Programming/Rust/RustyJen)                                                    
error: internal compiler error: unexpected panic                                                                           
note: the compiler unexpectedly panicked. 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' panicked at 'assertion failed: *start <= *end', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src
/libcore/slice.rs:396                                                                                                      

stack backtrace:                                                                                                           
   1:        0x10d976929 - rt::backtrace::imp::write::hfe87245730e40e498nq                                                 
   2:        0x10d979b6c - failure::on_fail::h250240fc1d2cc13cHEq                                                          
   3:        0x10dbdb395 - unwind::begin_unwind_inner::h629bbfd5c5c7ad4bSJd                                                
   4:        0x10dbdb02f - unwind::begin_unwind_fmt::h26eed6b8c9614d01kHd                                                  
   5:        0x10dbdad82 - rust_begin_unwind                                                                               
   6:        0x10dc315dc - panicking::panic_fmt::h9773bd98fc91f575h7j                                                      
   7:        0x10dc2806f - panicking::panic::hf2209879fd0a6385l4j                                                          
   8:        0x10aaee5eb - middle::typeck::check::vtable::check_object_safety::hd2ef41a3d3297642CBN                        
   9:        0x10ab588db - middle::typeck::check::FnCtxt<'a, 'tcx>::register_unsize_obligations::h93da532586d1f760GhX      
  10:        0x10ab58770 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::hdcb3d01fc6bc2a0bEgX     
  11:        0x10ab58791 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::hdcb3d01fc6bc2a0bEgX     
  12:        0x10ab345b7 - middle::typeck::check::FnCtxt<'a, 'tcx>::write_adjustment::h559300c55596d0cbIdX                 
  13:        0x10ab255fb - middle::typeck::check::FnCtxt<'a, 'tcx>::mk_assignty::h495121b0f62037e0xvX                      
  14:        0x10ab253c5 - middle::typeck::check::demand::coerce::h94b3644e227f71a2RPR                                     
  15:        0x10ab85f09 - middle::typeck::check::check_expr_coercable_to_type::closure.132412                             
  16:        0x10ab7ded6 - middle::typeck::check::check_expr_with_unifier::h69de001b4060f90bdJY                            
  17:        0x10abce4d3 - middle::typeck::check::check_decl_local::h0cae6d84e687454cWJ0                                   
  18:        0x10abce647 - middle::typeck::check::check_stmt::h46c2f90bba03a179WL0                                         
  19:        0x10ab49acf - middle::typeck::check::check_block_with_expected::hde19a8324d3b35305P0                          
  20:        0x10ab45862 - middle::typeck::check::check_fn::h6804afcefd6fc458pvV                                           
  21:        0x10ab44d8f - middle::typeck::check::check_bare_fn::hb7e7210980026133EkV                                      
  22:        0x10ab4c530 - middle::typeck::check::check_method_body::h36c9acd490135be6xPV                                  
  23:        0x10ab41d58 - middle::typeck::check::check_item::h39bec44c2e37ec07NEV                                         
  24:        0x10ab44462 - visit::Visitor::visit_mod::h8897482306723449792                                                 
  25:        0x10ab42fb0 - visit::walk_item::h18177613619592010200                                                         
  26:        0x10ab4446d - visit::Visitor::visit_mod::h8897482306723449792                                                 
  27:        0x10ab42fb0 - visit::walk_item::h18177613619592010200                                                         
  28:        0x10ab44bea - middle::typeck::check::check_item_types::h232f3854bb5459bfOjV                                   
  29:        0x10a6571a6 - util::common::time::h13516290540542203264                                                       
  30:        0x10ae04d7e - middle::typeck::check_crate::h6b2f140055619821A3n                                               
  31:        0x10ae6dadf - driver::driver::phase_3_run_analysis_passes::h9af5661d865aaa0elNA                               
  32:        0x10ae683a8 - driver::driver::compile_input::h64933a02c4abd95e6tA                                             
  33:        0x10aee5b88 - driver::run_compiler::h37c520fe594ec038KgE                                                      
  34:        0x10aee3dae - driver::run::closure.145405                                                                     
  35:        0x10a66f64b - task::TaskBuilder<S>::try_future::closure.103660                                                
  36:        0x10a66f543 - task::TaskBuilder<S>::spawn_internal::closure.103631                                            
  37:        0x10d69ba4d - task::NativeSpawner.Spawner::spawn::closure.8535                                                
  38:        0x10dc4124c - rust_try_inner                                                                                  
  39:        0x10dc41236 - rust_try                                                                                        
  40:        0x10dbd8a17 - unwind::try::h554e9d30ab8d9725cyd                                                               
  41:        0x10dbd88ac - task::Task::run::h39093ecd59554b49ZJc                                                           
  42:        0x10d69b873 - task::NativeSpawner.Spawner::spawn::closure.8472                                                
  43:        0x10dbda1c7 - thread::thread_start::h589be8c0a398d299e5c                                                      
  44:     0x7fff981f52fc - _pthread_body                                                                                   
  45:     0x7fff981f5279 - _pthread_body                                                                                   
UberLambda

UberLambda commented on Oct 31, 2014

@UberLambda

I'm getting this too, on Linux x64:

error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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' panicked at 'assertion failed: *start <= *end', /build/rust-git/src/rust/src/libcore/slice.rs:396

stack backtrace:
   1:     0x7fc07401d550 - rt::backtrace::imp::write::h6d7b51dbe08c7a90Weq
   2:     0x7fc074020650 - <unknown>
   3:     0x7fc078371330 - unwind::begin_unwind_inner::ha369021e3864117bdSd
   4:     0x7fc078370e50 - unwind::begin_unwind_fmt::h6c1ae8b41766cb91FPd
   5:     0x7fc078370e10 - rust_begin_unwind
   6:     0x7fc0783b4d60 - panicking::panic_fmt::h1f4102d9dbcc2a5dh7j
   7:     0x7fc0783b0610 - panicking::panic::h68bf04de05fcd341l4j
   8:     0x7fc078de3300 - middle::typeck::check::vtable::check_object_safety::h5e858634fb68b05e6zN
   9:     0x7fc078de2c40 - middle::typeck::check::vtable::check_object_cast::h76abd899d5e17912cqN
  10:     0x7fc078e3ae20 - <unknown>
  11:     0x7fc078e617a0 - <unknown>
  12:     0x7fc078e5fb30 - <unknown>
  13:     0x7fc078e5e7a0 - <unknown>
  14:     0x7fc078e617a0 - <unknown>
  15:     0x7fc078eaeba0 - middle::typeck::check::check_stmt::hd0a4ef48c8f354dcjI0
  16:     0x7fc078e2f060 - <unknown>
  17:     0x7fc078e617a0 - <unknown>
  18:     0x7fc078ddbf10 - middle::typeck::check::_match::check_match::haa2decc95e3c7268D2M
  19:     0x7fc078e617a0 - <unknown>
  20:     0x7fc078e2f060 - <unknown>
  21:     0x7fc078e2b0a0 - <unknown>
  22:     0x7fc078e2ade0 - <unknown>
  23:     0x7fc078e31d00 - <unknown>
  24:     0x7fc078e270c0 - middle::typeck::check::check_item::h9547b3316e8784c0aBV
  25:     0x7fc078e290e0 - <unknown>
  26:     0x7fc078e2a8b0 - middle::typeck::check::check_item_types::h88799901145244c6bgV
  27:     0x7fc0789b2a50 - <unknown>
  28:     0x7fc0790bed90 - middle::typeck::check_crate::h62ec16fdebb5bcbeQZn
  29:     0x7fc079122330 - driver::driver::phase_3_run_analysis_passes::h9af115960c945947BJA
  30:     0x7fc07911d0a0 - driver::driver::compile_input::h7fc95caa4ba569b2mqA
  31:     0x7fc0791a0660 - <unknown>
  32:     0x7fc0791a0550 - <unknown>
  33:     0x7fc0789cb380 - <unknown>
  34:     0x7fc0789cb170 - <unknown>
  35:     0x7fc0786b3a80 - <unknown>
  36:     0x7fc0783c29f0 - <unknown>
  37:     0x7fc0783c29e0 - rust_try
  38:     0x7fc07836eae0 - unwind::try::hca7256b355f2fe07xGd
  39:     0x7fc07836e970 - task::Task::run::hf4a989e4dbd46d6cnMc
  40:     0x7fc0786b37c0 - <unknown>
  41:     0x7fc0783701d0 - <unknown>
  42:     0x7fc0733ce250 - start_thread
  43:     0x7fc07804b3b9 - clone
  44:                0x0 - <unknown>

(Link to the full RUST_LOG=debug RUST_BACKTRACE=1 cargo build --verbose)


Rustc's version (installed from thestinger's Arch repos:

rustc 0.13.0-dev (fd5365748 2014-10-30 20:17:15 +0000)
binary: rustc
commit-hash: fd53657484d78d0b7c00ce3264d99c051cf07d26
commit-date: 2014-10-30 20:17:15 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-dev
parbo

parbo commented on Oct 31, 2014

@parbo

Same here:

$ RUST_BACKTRACE=1 cargo build
Compiling protobuf v0.0.1 (https://github.com/stepancheg/rust-protobuf.git#cd5c700d)
Compiling rust-crypto v0.1.0 (https://github.com/DaGenix/rust-crypto.git#bd9f0970)
Compiling nix v0.0.1 (https://github.com/carllerche/nix-rust#69437208)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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' panicked at 'assertion failed: *start <= *end', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/slice.rs:396

stack backtrace:
1: 0x7fb85e59daf0 - rt::backtrace::imp::write::h78410bf389422bb4Afq
2: 0x7fb85e5a0bf0 - failure::on_fail::h3d7a049ab1da182dXAq
3: 0x7fb862adfe30 - unwind::begin_unwind_inner::ha5ca26286b78bd8fdSd
4: 0x7fb862adf950 - unwind::begin_unwind_fmt::h9ff359c82ebbcec0FPd
5: 0x7fb862adf910 - rust_begin_unwind
6: 0x7fb862b2b1a0 - panicking::panic_fmt::h6d1e7e05d89e9577h7j
7: 0x7fb862b26a50 - panicking::panic::h9595095b841fe7bal4j
8: 0x7fb8635f2050 - middle::typeck::check::vtable::check_object_safety::h909babbc174b8351CBN
9: 0x7fb86365f600 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_unsize_obligations::h7602815ae022d228GhX
10: 0x7fb86365f570 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::h0590f015c52acbc0EgX
11: 0x7fb86365f570 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::h0590f015c52acbc0EgX
12: 0x7fb86363aa80 - middle::typeck::check::FnCtxt<'a, 'tcx>::write_adjustment::h1396e48fc524a05dIdX
13: 0x7fb86362b520 - middle::typeck::check::FnCtxt<'a, 'tcx>::mk_assignty::ha58af6f758d897bdxvX
14: 0x7fb86362b210 - middle::typeck::check::demand::coerce::h48183cae82ca7869RPR
15: 0x7fb86368e000 - middle::typeck::check::check_expr_coercable_to_type::closure.132386
16: 0x7fb863684970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
17: 0x7fb863682dd0 - middle::typeck::check::check_argument_types::h1928dcb07649510889X
18: 0x7fb863684970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
19: 0x7fb8636501a0 - middle::typeck::check::check_block_with_expected::hbcf547bf91ace5705P0
20: 0x7fb86364b770 - middle::typeck::check::check_fn::hc80418f404e5c598pvV
21: 0x7fb86364b4b0 - middle::typeck::check::check_bare_fn::h1dd0be1cd95d0c63EkV
22: 0x7fb863652ca0 - middle::typeck::check::check_method_body::h131e48693ec30c1axPV
23: 0x7fb8636471c0 - middle::typeck::check::check_item::hfa9ed324eb120d1cNEV
24: 0x7fb86364ac30 - visit::Visitor::visit_mod::h4776340902026008023
25: 0x7fb863649760 - visit::walk_item::h1837381033057518270
26: 0x7fb86364af80 - middle::typeck::check::check_item_types::h7314688a92a7a43fOjV
27: 0x7fb863146590 - util::common::time::h1086293170624038403
28: 0x7fb86391db90 - middle::typeck::check_crate::h707090d761adfc72A3n
29: 0x7fb863987950 - driver::driver::phase_3_run_analysis_passes::h2dc7f682b53f78f9lNA
30: 0x7fb863982200 - driver::driver::compile_input::hb25c14dfa369b7d96tA
31: 0x7fb863a048b0 - driver::run_compiler::h3e5318d61e864690KgE
32: 0x7fb863a047a0 - driver::run::closure.145379
33: 0x7fb86315f370 - task::TaskBuilder::try_future::closure.103636
34: 0x7fb86315f160 - task::TaskBuilder::spawn_internal::closure.103607
35: 0x7fb862e2a1a0 - task::NativeSpawner.Spawner::spawn::closure.8435
36: 0x7fb862b38e30 - rust_try_inner
37: 0x7fb862b38e20 - rust_try
38: 0x7fb862add5e0 - unwind::try::h8c75b93d8c87f5c4xGd
39: 0x7fb862add470 - task::Task::run::h3855d187b4c0788fnMc
40: 0x7fb862e29ee0 - task::NativeSpawner.Spawner::spawn::closure.8373
41: 0x7fb862adecd0 - thread::thread_start::he45c6d58df77cc88C7c
42: 0x7fb85d949fe0 - start_thread
43: 0x7fb8627a9819 - __clone
44: 0x0 -

$ rustc --version=verbose
rustc 0.13.0-nightly (221fc1e 2014-10-31 02:27:15 +0000)
binary: rustc
commit-hash: 221fc1e
commit-date: 2014-10-31 02:27:15 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly

alexcrichton

alexcrichton commented on Oct 31, 2014

@alexcrichton
Member
nrc

nrc commented on Oct 31, 2014

@nrc
Member

@mitchmindtree @UberLambda @parbo would one of you mind posting the code that caused the ICE please? Even better would be if you could narrow down the code to a minimal test case which causes the crash. Thanks!

parbo

parbo commented on Oct 31, 2014

@parbo

For me, it's just a new empty project (cargo new --git) which I added some dependencies to:

Cargo.toml:

[package]

name = "sprs"
version = "0.0.1"
authors = ["bohrarper@spotify.com>"]

[dependencies.protobuf]

git = "https://github.com/stepancheg/rust-protobuf.git"

[dependencies.rust-crypto]

git = "https://github.com/DaGenix/rust-crypto.git"

[dependencies.mio]

git = "https://github.com/carllerche/mio.git"

lib.rs:

extern crate crypto
extern crate mio
extern crate rust-protobuf

#[test]
fn it_works() {
}

waterlink

waterlink commented on Oct 31, 2014

@waterlink

I have the same problem, but this happens only when I compile my tests/* code. So the problem is probably somewhere there. Code is available here: https://github.com/johnmq/raft-rs/tree/master/tests

And here is my backtrace:

RUST_BACKTRACE=1 cargo test
   Compiling raft_rs v0.0.1 (file:///home/user/github/waterlink/johnmq/raft-rs)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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' panicked at 'assertion failed: *start <= *end', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/slice.rs:396

stack backtrace:
   1:     0x7f8136dd9af0 - rt::backtrace::imp::write::h78410bf389422bb4Afq
   2:     0x7f8136ddcbf0 - failure::on_fail::h3d7a049ab1da182dXAq
   3:     0x7f813b31ee30 - unwind::begin_unwind_inner::ha5ca26286b78bd8fdSd
   4:     0x7f813b31e950 - unwind::begin_unwind_fmt::h9ff359c82ebbcec0FPd
   5:     0x7f813b31e910 - rust_begin_unwind
   6:     0x7f813b36a1a0 - panicking::panic_fmt::h6d1e7e05d89e9577h7j
   7:     0x7f813b365a50 - panicking::panic::h9595095b841fe7bal4j
   8:     0x7f813be31050 - middle::typeck::check::vtable::check_object_safety::h909babbc174b8351CBN
   9:     0x7f813be9e600 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_unsize_obligations::h7602815ae022d228GhX
  10:     0x7f813be9e570 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::h0590f015c52acbc0EgX
  11:     0x7f813be9e570 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::h0590f015c52acbc0EgX
  12:     0x7f813be79a80 - middle::typeck::check::FnCtxt<'a, 'tcx>::write_adjustment::h1396e48fc524a05dIdX
  13:     0x7f813be6a520 - middle::typeck::check::FnCtxt<'a, 'tcx>::mk_assignty::ha58af6f758d897bdxvX
  14:     0x7f813be6a210 - middle::typeck::check::demand::coerce::h48183cae82ca7869RPR
  15:     0x7f813becd000 - middle::typeck::check::check_expr_coercable_to_type::closure.132386
  16:     0x7f813bec3970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
  17:     0x7f813bec1dd0 - middle::typeck::check::check_argument_types::h1928dcb07649510889X
  18:     0x7f813bec1610 - middle::typeck::check::check_method_argument_types::h20978a60653d31e5k8X
  19:     0x7f813bec3970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
  20:     0x7f813bf17500 - middle::typeck::check::check_stmt::h0b590f51bdc43b8bWL0
  21:     0x7f813be8f1a0 - middle::typeck::check::check_block_with_expected::hbcf547bf91ace5705P0
  22:     0x7f813bec3970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
  23:     0x7f813be8f1a0 - middle::typeck::check::check_block_with_expected::hbcf547bf91ace5705P0
  24:     0x7f813be8a770 - middle::typeck::check::check_fn::hc80418f404e5c598pvV
  25:     0x7f813bece970 - middle::typeck::check::check_expr_with_unifier::check_expr_fn::h2ca30ae5f2e571b43dZ
  26:     0x7f813bec3970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
  27:     0x7f813bec1dd0 - middle::typeck::check::check_argument_types::h1928dcb07649510889X
  28:     0x7f813bec3970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
  29:     0x7f813be8f1a0 - middle::typeck::check::check_block_with_expected::hbcf547bf91ace5705P0
  30:     0x7f813be8a770 - middle::typeck::check::check_fn::hc80418f404e5c598pvV
  31:     0x7f813be8a4b0 - middle::typeck::check::check_bare_fn::h1dd0be1cd95d0c63EkV
  32:     0x7f813be861c0 - middle::typeck::check::check_item::hfa9ed324eb120d1cNEV
  33:     0x7f813be89c30 - visit::Visitor::visit_mod::h4776340902026008023
  34:     0x7f813be88760 - visit::walk_item::h1837381033057518270
  35:     0x7f813be89f80 - middle::typeck::check::check_item_types::h7314688a92a7a43fOjV
  36:     0x7f813b985590 - util::common::time::h1086293170624038403
  37:     0x7f813c15cb90 - middle::typeck::check_crate::h707090d761adfc72A3n
  38:     0x7f813c1c6950 - driver::driver::phase_3_run_analysis_passes::h2dc7f682b53f78f9lNA
  39:     0x7f813c1c1200 - driver::driver::compile_input::hb25c14dfa369b7d96tA
  40:     0x7f813c2438b0 - driver::run_compiler::h3e5318d61e864690KgE
  41:     0x7f813c2437a0 - driver::run::closure.145379
  42:     0x7f813b99e370 - task::TaskBuilder<S>::try_future::closure.103636
  43:     0x7f813b99e160 - task::TaskBuilder<S>::spawn_internal::closure.103607
  44:     0x7f813b6691a0 - task::NativeSpawner.Spawner::spawn::closure.8435
  45:     0x7f813b377e30 - rust_try_inner
  46:     0x7f813b377e20 - rust_try
  47:     0x7f813b31c5e0 - unwind::try::h8c75b93d8c87f5c4xGd
  48:     0x7f813b31c470 - task::Task::run::h3855d187b4c0788fnMc
  49:     0x7f813b668ee0 - task::NativeSpawner.Spawner::spawn::closure.8373
  50:     0x7f813b31dcd0 - thread::thread_start::he45c6d58df77cc88C7c
  51:     0x7f8136189ea0 - start_thread
  52:     0x7f813afe5999 - __clone
  53:                0x0 - <unknown>

Could not compile `raft_rs`.

To learn more, run the command again with --verbose.
rustc --version=verbose
rustc 0.13.0-nightly (221fc1e3c 2014-10-31 02:27:15 +0000)
binary: rustc
commit-hash: 221fc1e3cdcc208e1bb7debcc2de27d47c847747
commit-date: 2014-10-31 02:27:15 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly
added a commit that references this issue on Oct 31, 2014
waterlink

waterlink commented on Oct 31, 2014

@waterlink

And after playing around with my suspect code I was able to avoid this bug by replacing type annotations of my arguments with parametric types instead of traits. This commit shows it: johnmq/raft-rs@6ba292f .

Basically that means that this bug is related somehow to trait rules changes. If this helps somehow..

stepancheg

stepancheg commented on Nov 2, 2014

@stepancheg
Contributor

Minimal example:

use std::default::Default;

pub trait Message {
    fn new() -> Self { panic!(); }
}

fn new_instance<M : 'static + Message>() -> Box<Message + 'static> {
    let m: M = Default::default();
    box m as Box<Message>
}

fn main() {}
added a commit that references this issue on Nov 2, 2014
cf77564

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @stepancheg@alexcrichton@hotgloupi@waterlink@nrc

      Issue actions

        ICE: 'rustc' panicked at 'assertion failed: *start <= *end' in slice.rs:396 · Issue #18490 · rust-lang/rust