Closed
Description
This code will cause a compiler panic
#![crate_type = "lib"]
trait Foo for Sized? { }
trait Bar { }
impl<'a> Foo for Bar + 'a { }
link to run: http://is.gd/MC2wAS
message:
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: bounds.is_none()', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/metadata/encoder.rs:1231
This panic only occurs when building as a lib, whether by the #![crate_type = "lib"]
attribute or with the --crate-type lib
command line option. If you remove the crate_type attribute and add a fn main() {}
it does not panic.