about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2011-05-20 14:15:39 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-05-20 16:57:37 -0700
commita08a376d6e4c0b8805d94dadd43a320b0f00b375 (patch)
tree2275100c990c9d774e61f784bbd5e8d98f8f5cbb /src/rt/rust_kernel.cpp
parent3dd2877975efd0dd9ed8debe202c8e9d48810f48 (diff)
downloadrust-a08a376d6e4c0b8805d94dadd43a320b0f00b375.tar.gz
rust-a08a376d6e4c0b8805d94dadd43a320b0f00b375.zip
Make controlflow part of a function type
Change ty_fn to have a controlflow field. A 'controlflow' is
essentially a bit of data that says whether or not this function
never returns to the caller (if it never returns, that means it calls
"fail" or another "never-returns" function on every control path).

Also add syntax for annotating functions that never return:

fn foo() -> ! {
   fail;
}

for example. Functions marked with ! implicitly have a result type of
ty_bot, which is a new type that this commit also adds.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions