Closed
Description
trait Hack: std::ops::Add<Self, Output = Self> + Copy {}
fn takes_hack(x: &Hack<Output=i32>) {}```
(which can't work of course)
Gives:
thread 'rustc' panicked at 'assertion failed: !ty.needs_infer()', ../src/librustc_typeck/lib.rs:152
on playpen's nightly and on an older nightly:
1: 0x7f2a73cac30e - sys::backtrace::write::h1e294cdf8b83f011srs
2: 0x7f2a73cb44d4 - panicking::on_panic::h759b2622c5bddde1mdx
3: 0x7f2a73c76ade - rt::unwind::begin_unwind_inner::hdb2ee52cd09f11c10Sw
4: 0x7f2a73415651 - rt::unwind::begin_unwind::h16407102452406535252
5: 0x7f2a73519747 - collect::convert_item::hee80771e2831a06bVHx
6: 0x7f2a735164c7 - collect::collect_item_types::hb25670e75e1ace20iPw
7: 0x7f2a735636c9 - check_crate::h699f9ca48d981e0dRWC
8: 0x7f2a74211cc9 - driver::phase_3_run_analysis_passes::closure.15891
9: 0x7f2a7421060b - middle::ty::ctxt<'tcx>::create_and_enter::h14877326799551551326
10: 0x7f2a7420b5b1 - driver::phase_3_run_analysis_passes::h13027946853248993312
11: 0x7f2a741ea80c - driver::compile_input::h1bb41626855952a5Tba
12: 0x7f2a742d0e83 - run_compiler::hed8febc643a5bd02A7b
13: 0x7f2a742ce85e - boxed::F.FnBox<A>::call_box::h3262743521461286850
14: 0x7f2a742ce0a9 - rt::unwind::try::try_fn::h13012207966773460524
15: 0x7f2a73d2f9d8 - rust_try_inner
16: 0x7f2a73d2f9c5 - rust_try
17: 0x7f2a73c9f647 - rt::unwind::try::inner_try::hcf9d4b2ce436da47TOw
18: 0x7f2a742ce2bb - boxed::F.FnBox<A>::call_box::h5485760352730305604
19: 0x7f2a73cb3131 - sys::thread::Thread::new::thread_start::h6bca3390d26c61e4GYv