about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
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
2013-07-14Clean up various warnings throughout the codebaseAlex Crichton-1/+2
2013-07-14Allow non-uppercase-statics by defaultAlex Crichton-2/+0
I think of this as a stylistic opinion which shouldn't necessarily be enforced by default on all users of rust, but that's just my opinion.
2013-07-13Rename print!()/println!() to printf!()/printfln!()Kevin Ballard-8/+14
The new names make it obvious that these generate formatted output. Add a one-argument case that uses %? to format, just like the other format-using macros (e.g. info!()).
2013-07-13Add print! and println! macros. Closes #7653.Birunthan Mohanathas-0/+12
2013-07-12auto merge of #7725 : msullivan/rust/default-methods, r=pcwaltonbors-9/+12
r?
2013-07-12auto merge of #7736 : thestinger/rust/doc, r=thestingerbors-18/+8
2b96408 r=sanxiyn documents conversion, size hints and double-ended iterators and adds more of the traits to the prelude
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-18/+8
2013-07-12auto merge of #7706 : sanxiyn/rust/qualification-lint, r=pcwaltonbors-0/+1
Fix #2551. Lint is off by default because I didn't bother to fix all of std and extra.
2013-07-11auto merge of #7695 : cmr/rust/assert_eq_msg, r=pnkfelixbors-1/+2
This changes it from ``` left: true does not equal right: false ``` to ``` assertion failed: `(left == right) && (right == left)` (left: `true`, right: `false`) ```
2013-07-11auto merge of #7677 : alexcrichton/rust/tls-gc, r=pcwaltonbors-4/+4
cc #6004 and #3273 This is a rewrite of TLS to get towards not requiring `@` when using task local storage. Most of the rewrite is straightforward, although there are two caveats: 1. Changing `local_set` to not require `@` is blocked on #7673 2. The code in `local_pop` is some of the most unsafe code I've written. A second set of eyes should definitely scrutinize it... The public-facing interface currently hasn't changed, although it will have to change because `local_data::get` cannot return `Option<T>`, nor can it return `Option<&T>` (the lifetime isn't known). This will have to be changed to be given a closure which yield `&T` (or as an Option). I didn't do this part of the api rewrite in this pull request as I figured that it could wait until when `@` is fully removed. This also doesn't deal with the issue of using something other than functions as keys, but I'm looking into using static slices (as mentioned in the issues).
2013-07-11Get cross crate static default methods working. Closes #7569.Michael Sullivan-9/+12
2013-07-11Remove all external requirements of `@` from TLSAlex Crichton-2/+2
Closes #6004