summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-08-03make `for` parse as `foreach` doesDaniel Micay-6/+5
Closes #6997
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-52/+61
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-10/+22
2013-08-02librustc: Introduce a new visitor type based on traits and port syntax to it.Patrick Walton-918/+2070
This is preparation for removing `@fn`. This does *not* use default methods yet, because I don't know whether they work. If they do, a forthcoming PR will use them. This also changes the precedence of `as`.
2013-08-02auto merge of #8188 : huonw/rust/cfg-macro, r=pcwaltonbors-0/+48
Example: if cfg!(test) { calculation_to_run_only_when_testing(); } Closes #8130.
2013-08-02replace `range` with an external iteratorDaniel Micay-16/+10
2013-08-02Replace 'blk' -> 'block' in AstBuilder.OGINO Masanori-35/+35
I didn't rename variables because they are local and are not parts of the public interfaces. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-01auto merge of #8170 : brson/rust/nopipes, r=pcwaltonbors-1160/+3
The pipes compiler produced data types that encoded efficient and safe bounded message passing protocols between two endpoints. It was also capable of producing unbounded protocols. It was useful research but was arguably done before its proper time. I am removing it for the following reasons: * In practice we used it only for producing the `oneshot` protcol and the unbounded `stream` protocol and all communication in Rust use those. * The interface between the proto! macro and the standard library has a large surface area and was difficult to maintain through language and library changes. * It is now written in an old dialect of Rust and generates code which would likely be considered non-idiomatic. * Both the compiler and the runtime are difficult to understand, and likewise the relationship between the generated code and the library is hard to understand. Debugging is difficult. * The new scheduler implements `stream` and `oneshot` by hand in a way that will be significantly easier to maintain. This shouldn't be taken as an indication that 'channel protocols' for Rust are not worth pursuing again in the future. Concerned parties may include: @graydon, @pcwalton, @eholk, @bblum The most likely candidates for closing are #7666, #3018, #3020, #7021, #7667, #7303, #3658, #3295.
2013-08-01Remove the pipes compilerBrian Anderson-1160/+3
The pipes compiler produced data types that encoded efficient and safe bounded message passing protocols between two endpoints. It was also capable of producing unbounded protocols. It was useful research but was arguably done before its proper time. I am removing it for the following reasons: * In practice we used it only for producing the `oneshot` and `stream` unbounded protocols and all communication in Rust use those. * The interface between the proto! macro and the standard library has a large surface area and was difficult to maintain through language and library changes. * It is now written in an old dialect of Rust and generates code which would likely be considered non-idiomatic. * Both the compiler and the runtime are difficult to understand, and likewise the relationship between the generated code and the library is hard to understand. Debugging is difficult. * The new scheduler implements `stream` and `oneshot` by hand in a way that will be significantly easier to maintain. This shouldn't be taken as an indication that 'channel protocols' for Rust are not worth pursuing again in the future.
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-3/+3
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01syntax: implement cfg!() which evaluates to true/false where #[cfg] would ↵Huon Wilson-0/+48
keep/remove. Example: if cfg!(test) { calculation_to_run_only_when_testing(); }
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-152/+151
2013-07-31auto merge of #8162 : thestinger/rust/no-copy, r=brsonbors-115/+84
2013-08-01convert `pure` to a reserved keywordDaniel Micay-31/+31
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-26/+26
2013-07-31remove `copy` as a keywordDaniel Micay-70/+68
2013-07-31rm ancient error for lowercase kindsDaniel Micay-32/+3
3 of these kinds no longer even exist in the CamelCase form
2013-07-31auto merge of #8150 : dotdash/rust/assert_bloat, r=huonwbors-1/+1
Assertions without a message get a generated message that consists of a prefix plus the stringified expression that is being asserted. That prefix is currently a unique string, while a static string would be sufficient and needs less code.
2013-07-31Reduce code bloat from assert!()Björn Steinbrink-1/+1
Assertions without a message get a generated message that consists of a prefix plus the stringified expression that is being asserted. That prefix is currently a unique string, while a static string would be sufficient and needs less code.
2013-07-30rustc: fix a pp bug.Graydon Hoare-0/+1
2013-07-30syntax: implement foreach .. in .. { .. } via desugaring.Graydon Hoare-2/+193
2013-07-30syntax: add temporary 'foreach' keyword.Graydon Hoare-0/+3
2013-07-30syntax: add 'in' keywordGraydon Hoare-0/+3
2013-07-30Added str::char_offset_iter() and str::rev_char_offset_iter()Marvin Löbel-1/+1
Renamed bytes_iter to byte_iter to match other iterators Refactored str Iterators to use DoubleEnded Iterators and typedefs instead of wrapper structs Reordered the Iterator section Whitespace fixup Moved clunky `each_split_within` function to the one place in the tree where it's actually needed Replaced all block doccomments in str with line doccomments
2013-07-30auto merge of #8107 : michaelwoerister/rust/end_of_spanned, r=cmrbors-158/+153
Contiunation of naming cleanup in `libsyntax::ast`: ```rust ast::node_id => ast::NodeId ast::local_crate => ast::LOCAL_CRATE ast::crate_node_id => ast::CRATE_NODE_ID ast::blk_check_mode => ast::BlockCheckMode ast::ty_field => ast::TypeField ast::ty_method => ast::TypeMethod ``` Also moved span field directly into `TypeField` struct and cleaned up overlooked `ast::CrateConfig` renamings from last pull request. Cheers, Michael
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-158/+153
blk_check_mode, ty_field, ty_method}
2013-07-29auto merge of #8085 : mrordinaire/rust/percent-p, r=huonwbors-0/+2
pull request for #8011
2013-07-29Added %p directive to fmt!, which expects *T as argumentDo Nhat Minh-0/+2
2013-07-28Add support for `..base` on static struct initializers.Kevin Mehall-1/+1
2013-07-27auto merge of #8076 : omasanori/rust/cleanup, r=huonwbors-3/+0
A cleanup suggested on #7922.
2013-07-27auto merge of #8060 : Blei/rust/fix-obsolete-extern-visibility-span, r=pcwaltonbors-1/+1
2013-07-27Remove unnecessary #[path = "***/mod.rs"] lines.OGINO Masanori-3/+0
Fixes #7922. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-26syntax: fix span for obsolete extern visibility errorPhilipp Brüschweiler-1/+1
2013-07-26auto merge of #8037 : graydon/rust/issue-6416, r=cmrbors-9/+24
Errors only turn into failures in the parser when you force them.
2013-07-25auto merge of #8027 : ↵bors-1/+0
nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-1, r=pcwalton Small step towards #4846. r? @msullivan
2013-07-25syntax: Fix #6416 by aborting on errors after test parse.Graydon Hoare-9/+24
2013-07-24Generalize the `ty::substs` struct so that it can representNiko Matsakis-1/+0
multiple lifetime parameters, and not just one. Also add an option for erasing lifetimes, which makes trans code somewhat simpler and cleaner.
2013-07-24Disallow non-comma-delimited arguments to fmt! and bytes!Birunthan Mohanathas-6/+7
Closes #4982.
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-9/+7
2013-07-22auto merge of #7873 : sstewartgallus/rust/cleanup_syntax, r=alexcrichtonbors-100/+100
2013-07-22auto merge of #7940 : cmr/rust/comments, r=pnkfelixbors-8/+12
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-27/+25
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-185/+181
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22auto merge of #7926 : brson/rust/issue-4116, r=graydonbors-12/+25
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate an error when both are found.
2013-07-21auto merge of #7955 : thestinger/rust/snapshot, r=huonwbors-9/+0
2013-07-22new snapshotDaniel Micay-9/+0
2013-07-21auto merge of #7938 : crabtw/rust/foreign-vis, r=huonwbors-2/+2
2013-07-21Cleanup libsyntax a bitSteven Stewart-Gallus-100/+100
2013-07-21Merge pull request #7936 from thestinger/cleanupDaniel Micay-2/+0
rm obsolete no-op lints
2013-07-21syntax: Bless mod.rs. #4116Brian Anderson-12/+25
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate an error when both are found.