about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-12-14 09:22:24 +0000
committerbors <bors@rust-lang.org>2014-12-14 09:22:24 +0000
commit3a9305ce823df267fb1afcce76ef06ca09e407ff (patch)
tree75b3af504a1218014bec477c86bd2910899b5b33 /src/libstd/sys/unix/stack_overflow.rs
parent10ac5b72f1974775bed499105c2a3cf18da98f32 (diff)
parentcfee5b7e881d6cfd65557ca98aff043d9b8fea49 (diff)
downloadrust-3a9305ce823df267fb1afcce76ef06ca09e407ff.tar.gz
rust-3a9305ce823df267fb1afcce76ef06ca09e407ff.zip
auto merge of #19690 : barosl/rust/struct-variant-as-a-function-ice, r=alexcrichton
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.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions