Skip to content

fail: print_type shouldn't see a ty_infer #2175

Description

@jdm
fn main() {
        let v = [];
        let mut i = 0;
        v.each {|x| i = i + 1; }
}

yields

#0  upcall_fail (expr=0x102b1ebf0 "print_type shouldn't see a ty_infer", file=0x1005c6bf0 "../src/librustsyntax/print/pprust.rs", line=385) at ../src/rt/rust_upcall.cpp:130
#1  0x000000010051541e in print::pprust::print_type::_40f9364acb2e29cf ()
#2  0x0000000100514b0a in print::pprust::to_str3548::_2ea226c1c51d6827 ()
#3  0x0000000100514a09 in print::pprust::ty_to_str::_381315eb53c8cdbb ()
#4  0x0000000100fc9a97 in middle::tstate::ck::check_states_against_conditions::_f6c9a5dc26d64dd1 ()
#5  0x0000000100fcb787 in middle::tstate::ck::check_fn_states::_f6c9a5dc26d64dd1 ()
#6  0x0000000100fcbf34 in middle::tstate::ck::fn_states::_eb311fc189ead655 ()
#7  0x0000000100cd5267 in visit::visit_expr3370::_4918fd88449fd53a ()
#8  0x00000001011fef18 in __morestack ()

Interestingly enough, using v.iter yields a program that builds without incident.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions