rust/src/librustc/middle
Barosl Lee cfee5b7e88 Fix an ICE when trying to resolve a struct variant
Unlike a tuple variant constructor which can be called as a function, a
struct variant constructor is not a function, so cannot be called.

If the user tries to assign the constructor to a variable, an ICE
occurs, because there is no way to use it later. So we should stop the
constructor from being used like that.

A similar mechanism already exists for a normal struct, as it prohibits
a struct from being resolved. This commit does the same for a struct
variant.

This commit also includes some changes to the existing tests.

Fixes #19452.
2014-12-10 22:45:28 +09:00
..
borrowck librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
cfg librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
infer librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
traits auto merge of #19466 : nikomatsakis/rust/recursion-limit, r=eddyb 2014-12-09 14:02:45 +00:00
astconv_util.rs Remove one dependence on typeck from const_eval. 2014-12-04 10:04:51 -05:00
astencode.rs Move various data structures out of typeck and into ty. 2014-12-04 10:04:26 -05:00
check_const.rs Move various data structures out of typeck and into ty. 2014-12-04 10:04:26 -05:00
check_loop.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
check_match.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
check_rvalues.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
check_static_recursion.rs Move trans, back, driver, and back into a new crate, rustc_trans. Reduces memory usage significantly and opens opportunities for more parallel compilation. 2014-11-18 07:32:43 -05:00
check_static.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
const_eval.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
dataflow.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
dead.rs librustc: remove unnecessary as_slice() calls 2014-12-06 19:05:58 -05:00
def.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
dependency_format.rs Fallout from stabilization 2014-11-25 17:41:54 -08:00
effect.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
entry.rs Fallout from stabilization 2014-11-25 17:41:54 -08:00
expr_use_visitor.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
fast_reject.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
graph.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
intrinsicck.rs Replace some verbose match statements with their if let equivalent. 2014-11-29 16:41:21 -05:00
lang_items.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
liveness.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
mem_categorization.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
pat_util.rs Fallout from stabilization 2014-11-25 17:41:54 -08:00
privacy.rs Move various data structures out of typeck and into ty. 2014-12-04 10:04:26 -05:00
reachable.rs Move various data structures out of typeck and into ty. 2014-12-04 10:04:26 -05:00
recursion_limit.rs Add ability to configure recursion limit. 2014-12-08 15:51:38 -05:00
region.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
resolve_lifetime.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
resolve.rs Fix an ICE when trying to resolve a struct variant 2014-12-10 22:45:28 +09:00
stability.rs Replace some verbose match statements with their if let equivalent. 2014-11-29 16:41:21 -05:00
subst.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
ty_fold.rs Move various data structures out of typeck and into ty. 2014-12-04 10:04:26 -05:00
ty.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
weak_lang_items.rs Move trans, back, driver, and back into a new crate, rustc_trans. Reduces memory usage significantly and opens opportunities for more parallel compilation. 2014-11-18 07:32:43 -05:00