]> git.lizzy.rs Git - rust.git/commit
auto merge of #6427 : catamorphism/rust/issue-6319, r=nikomatsakis
authorbors <bors@rust-lang.org>
Sun, 12 May 2013 17:34:38 +0000 (10:34 -0700)
committerbors <bors@rust-lang.org>
Sun, 12 May 2013 17:34:38 +0000 (10:34 -0700)
commit638b394a37a89f29ac366f5f052aacca175e30c2
treec92323ef12688dbaa875bdc907156b1da08a03a3
parent36771ef60997b5882ad391839b5f7854d077cc42
parentcdb52c02015805beac9dc7931880a482409e7162
auto merge of #6427 : catamorphism/rust/issue-6319, r=nikomatsakis

r? @nikomatsakis In #6319, several people mentioned they ran into a "computing
fictitious type" ICE in trans. This turns out to be because some
of my recent changes to typeck::check::_match resulted in type errors
getting reported with ty_err as the expected type, which meant the errors
were suppressed, and typechecking incorrectly succeeded (since the errors
weren't recorded).

Changed the error messages in these cases not to use an expected type at all,
rather, printing out a string describing the type that was expected (which is
what the code originally did). The result is a bit repetitive and the
proliferation of error-reporting functions in typeck::infer is a bit annoying,
but I thought it was important to fix this now; more cleanup can happen later.
src/librustc/middle/typeck/check/_match.rs