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
type baz<'r> = |a:&str|:'r;structFoo<'a>{pubbar:Option<baz<'a>>,}fnmain(){let foo = Foo{bar:Some(|_| {}),// No panic if set to `None`.};}
The error is as follows:
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: !ty::type_needs_infer(ty)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/typeck/mod.rs:287
The text was updated successfully, but these errors were encountered:
IvanUkhov
changed the title
Compiler panic when initializing a struct containing an option containing a closure
Compiler panic when using a struct containing an option containing a closure
Nov 15, 2014
Hello,
The following code makes the compiler panic:
The error is as follows:
The stack backtrace is as follows:
The bug seems to be related to #14038 and #18919.
Regards,
Ivan
The text was updated successfully, but these errors were encountered: