summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
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.
2013-07-21Doc for ast::PathCorey Richardson-8/+12
2013-07-21syntax: print visibilities of foreign itemsJyun-Yan You-2/+2
2013-07-20auto merge of #7902 : huonw/rust/attr++, r=cmr,pcwaltonbors-438/+441
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spans, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-6/+19
Place `pub` or `priv` on individual items instead.
2013-07-20rm obsolete no-op lintsDaniel Micay-2/+0
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-438/+441
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-18librustc: Forbid `&` pointers (other than `&'static`) inside `@` boxes.Patrick Walton-3/+2
This makes custom borrowing implementations for custom smart pointers sound.
2013-07-18Silence various warnings in bootstrap build.Felix S. Klock II-8/+1
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-26/+25
bootstrapping on Windows.
2013-07-17librustc: Change repeated vector expressions to use implicit copyability.Patrick Walton-3/+11
2013-07-17test: Fix tests.Patrick Walton-1/+1
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-34/+36
2013-07-17librustc: Remove `copy` expressions from the language.Patrick Walton-26/+2
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-804/+1024
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-121/+112
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-84/+81
2013-07-17Clean-up tests after debug!/std-macros change.Huon Wilson-1/+2
The entire testsuite is converted to using info! rather than debug! because some depend on the code within the debug! being trans'd.
2013-07-16syntax: make a macros-injection pass; conditionally define debug! to a noop ↵Huon Wilson-42/+59
based on cfg(debug). Macros can be conditionally defined because stripping occurs before macro expansion, but, the built-in macros were only added as part of the actual expansion process and so couldn't be stripped to have definitions conditional on cfg flags. debug! is defined conditionally in terms of the debug config, expanding to nothing unless the --cfg debug flag is passed (to be precise it expands to `if false { normal_debug!(...) }` so that they are still type checked, and to avoid unused variable lints).
2013-07-14Don't re-parse terminfo (twice!) on every compiler diagnosticKevin Ballard-2/+19
Stuff the term::Terminal into TLS to avoid re-parsing for every single message we want to color. Fixes #6827.
2013-07-14Highlight rustc's warnings/errors in bold instead of bright whiteKevin Ballard-14/+15
Clang actually highlights using bold, not using bright white. Match clang on this so our diagnostics are still readable on terminals with a white background.
2013-07-14Make TLS keys actually take up spaceAlex Crichton-4/+9
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
2013-07-14Purge the last remnants of the old TLS apiAlex Crichton-32/+27
Closes #3273