about summary refs log tree commit diff
path: root/src/lib/option.rs
AgeCommit message (Collapse)AuthorLines
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-93/+0
2011-11-23Rollback return-by-referenceMarijn Haverbeke-1/+1
It's proving too inflexible, so I'm ripping out the extra complexity in the hope that regions will, at some point, provide something similar. Closes #918
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-10-27Make option::is_some option::is_none pureBrian Anderson-2/+2
2011-10-25Begin documenting std and add doc generation using naturaldocsBrian Anderson-3/+58
Naturaldocs isn't really that great but it seems easier to get something working than with doxygen, for which we would need to convert rust code to something C++ish. We probably want to just write a rustdoc utility at some point.
2011-10-25Update our code to new type parameter kind syntaxMarijn Haverbeke-8/+8
Closes #1067
2011-10-07Give up on providing a by-value version of map, convert fold over toMarijn Haverbeke-5/+0
passing pointers by ref Issue #1008
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-0/+5
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-09-16Revert "Revert "Make option::get return the option contents by reference" ↵Patrick Walton-2/+2
due to memory corruption" This reverts commit d1c27ba9e06e08e1dc27b493144e467d0efd526c.
2011-09-15Revert "Make option::get return the option contents by reference" due to ↵Patrick Walton-2/+2
memory corruption This reverts commit fc0bf125168ec3df75bc57c250a62d3ea225a546.
2011-09-15Make option::get return the option contents by referenceMarijn Haverbeke-2/+2
I can't believe this actually works!
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-7/+7
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-08-20ReformatBrian Anderson-4/+1
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-16Port the stdlib to the decl foo<T> syntax.Erick Tryzelaar-8/+8
2011-08-16Port the stdlib to the typaram foo<T> syntax.Erick Tryzelaar-7/+7
2011-08-12Change a bunch of places in the stdlib to use blocks.Michael Sullivan-5/+3
2011-08-09Do some cleanup in stdlib.Michael Sullivan-11/+13
2011-07-29Enable kind checking on typarams, fix kind constraints in library and comp.Graydon Hoare-9/+9
2011-07-27Reformat for new syntaxMarijn Haverbeke-19/+12
2011-06-16stdlib: Add option::is_someBrian Anderson-0/+4
2011-06-15Fix a bunch of compile-command lines to use RBUILDGraydon Hoare-1/+1
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-37/+15
2011-05-31stdlib: Remove unneeded type params from alt patternsBrian Anderson-10/+10
2011-05-22stdlib: Use if/alt expressions in std::optionBrian Anderson-18/+16
2011-05-17rustc: Have typechecking no longer rebuild the ASTPatrick Walton-0/+9
2011-05-12Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke-0/+60
This should be a snapshot transition.
2011-05-06Rename std modules to be camelcasedMarijn Haverbeke-60/+0
(Have fun mergining your stuff with this.)
2011-04-19Handle nested items correctly in typestate_checkTim Chevalier-4/+8
Summary says it all. Actually, only nested objects and functions are handled, but that's better than before. The fold that I was using before to traverse a crate wasn't working correctly, because annotations have to reflect the number of local variables of the nearest enclosing function (in turn, because annotations are represented as bit vectors). The fold was traversing the AST in the wrong order, first filling in the annotations correctly, but then re-traversing them with the bit vector length for any outer nested functions, and so on. Remedying this required writing a lot of tedious boilerplate code because I scrapped the idea of using a fold altogether. I also made typestate_check handle unary, field, alt, and fail. Also, some miscellaneous changes: * added annotations to blocks in typeck * fix pprust so it can handle spawn * added more logging functions in util.common * fixed _vec.or * added maybe and from_maybe in option * removed fold_block field from ast_fold, since it was never used
2011-04-06Continued sketching out code for checking states against preconditions.Tim Chevalier-0/+7
It's still sketchy. I added a typestate annotation field to statements tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate that's different from that of its child node. This necessitated trivial changes to a bunch of other files all over to the compiler. I also added a few small standard library functions, some of which I didn't actually end up using but which I thought might be useful anyway.
2011-03-17Add an option.is_none() methodPatrick Walton-0/+7
2010-11-18rustboot: Don't use walk to traverse statements in type.ml; fixes redundant ↵Patrick Walton-0/+2
checking, improves diagnostics. Also report untyped slots.
2010-11-05Move the option type to its own modulePatrick Walton-0/+40
2010-11-05Revert "Move the option type to its own module"Patrick Walton-40/+0
2010-11-05Move the option type to its own modulePatrick Walton-0/+40