rust/src/comp/middle
Tim Chevalier 971b5d5151 Started adding support for return checking and non-returning function annotations
* Reorganized typestate into several modules.

* Made typestate check that any function with a non-nil return type
  returns a value. For now, the check is a warning and not an error
  (see next item).

* Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and
  fail that don't locally return a value that can be inspected. "bot"
  is distinct from "nil". There is no concrete syntax for _|_, while
  the concrete syntax for the nil type is ().

* Added support to the parser for a ! annotation on functions whose
  result type is _|_. Such a function is required to have either a
  fail or a call to another ! function that is reached in all control
  flow paths. The point of this annotation is to mark functions like
  unimpl() and span_err(), so that an alt with a call to err() in one
  case isn't a false positive for the return-value checker. I haven't
  actually annotated anything with it yet.

* Random bugfixes:

* * Fixed bug in trans::trans_binary that was throwing away the
    cleanups for nested subexpressions of an and or or
    (tests: box-inside-if and box-inside-if2).

** In typeck, unify the expected type arguments of a tag with the
   actual specified arguments.
2011-05-16 16:59:25 -07:00
..
tstate Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
fold.rs Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
metadata.rs Noticed that metadata::Encode::enc_sty didn't have a case for ty_task, so I added one (though this wasn't causing the problem I was seeing... 2011-05-16 16:13:11 -07:00
resolve.rs Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
trans.rs Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
ty.rs Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
type_glue.rs Slight adjustments to shape, rename to type_glue.rs. 2011-05-13 13:29:50 -07:00
typeck.rs Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
typestate_check.rs rustc: Write nil types into the node type table wherever plain_ann() is used 2011-05-13 17:55:07 -07:00
walk.rs Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00