about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2015-09-03Add an intital HIR and lowering stepNick Cameron-41/+5
2015-09-01Auto merge of #28137 - nrc:remove-non-multi, r=huonwbors-151/+2
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-09-01Remove the Modifier and Decorator kinds of syntax extensions.Nick Cameron-151/+2
This is a [breaking-change] for syntax extension authors. The fix is to use MultiModifier or MultiDecorator, which have the same functionality but are more flexible. Users of syntax extensions are unaffected.
2015-08-31Closures are not generated code.Nick Cameron-6/+1
2015-08-31Auto merge of #28007 - Ms2ger:FnKind, r=nrcbors-27/+25
There is no longer a need for that pattern, since enums are now qualified.
2015-08-30Auto merge of #28106 - marcusklaas:continue, r=eddybbors-1/+0
Fixes https://github.com/rust-lang/rust/issues/28105.
2015-08-30Assign correct span to continue expressionMarcus Klaas-1/+0
Fixes https://github.com/rust-lang/rust/issues/28105.
2015-08-30Make a macro a const fn and remove outdated NBTobias Bucher-2/+0
2015-08-29Auto merge of #28077 - jonas-schievink:attr-gateage, r=huonwbors-117/+125
This allows marking attributes as whitelisted/crate-only independent of their feature gate status. Closes #24213
2015-08-29Allow #[derive()] to generate unsafe trait implsMichael Layzell-1/+23
2015-08-29Handle gateage of built-in attributes seperatelyJonas Schievink-117/+125
This allows marking attributes as whitelisted/crate-only independent of their feature gate status. Closes #24213
2015-08-28Rollup merge of #28033 - Manishearth:compilerexpn, r=eddybManish Goregaokar-64/+80
We were using them for every expansion, instead of using `Name`. Also converted `CompilerExpansion` into an enum so its nicer to use and takes up less space. Will profile later, but this should be a small improvement in memory usage. r? @eddyb
2015-08-28Move ExpnInfo to NameManish Goregaokar-32/+33
2015-08-27Enumify CompilerExpansion in ExpnInfoManish Goregaokar-53/+68
2015-08-26Rename FnKind variants and stop re-exporting them from the visit module.Ms2ger-27/+25
There is no longer a need for that pattern, since enums are now qualified.
2015-08-24Remove #[start] as well as #[main] in --testWilliam Throwe-9/+6
Fixes #11766.
2015-08-24Move main removal to its own pass in --test modeWilliam Throwe-39/+56
This handles the case where the #[main] function is buried deeper in the ast than we search for #[test] functions. I'm not sure why one would want to do that, but since it works in standard compilation it should also work for tests.
2015-08-24Mark main-like functions allow(dead_code) in testsWilliam Throwe-15/+34
Fixes #12327.
2015-08-24Move entry point identification logic to libsyntaxWilliam Throwe-0/+43
Identifying entry points will be useful in --test mode, which is handled in libsyntax.
2015-08-24Auto merge of #27239 - apasel422:issue-19102, r=huonwbors-1/+7
closes #19102
2015-08-24Auto merge of #27857 - Manishearth:improve-fnkind, r=pnkfelixbors-7/+6
Since enums are namespaced now, should we also remove the `Fk` prefixes from `FnKind` and remove the reexport? (The reexport must be removed because otherwise it clashes with glob imports containing `ItemFn`). IMO writing `FnKind::Method` is much clearer than `FkMethod`.
2015-08-24move def-id to rustc crateNiko Matsakis-38/+1
2015-08-22Auto merge of #27913 - birkenfeld:remove_suffix_len, r=alexcrichtonbors-27/+0
The methods gave wrong results for TyIs and TyUs, whose suffix len should be 5 nowadays. But since they were only used for parsing, and unneeded for that since 606a309d, remove them rather than fixing. I hope this is ok to do, since all of rustc is considered unstable...
2015-08-21Auto merge of #27613 - GSam:binop, r=nrcbors-3/+30
In the case where there are no paren in the AST, the pretty printer doesn't correctly print binary operations where precedence is concerned. Parenthesis may be missing due to some kind of expansion or manipulation of the AST. Example: Pretty printer prints Expr(*, Expr(+, 1, 1), 2) as 1 + 1 * 2, as opposed to (1 + 1) * 2 r? @nrc
2015-08-20syntax: remove suffix_len methods from LitIntTypesGeorg Brandl-27/+0
The methods gave wrong results for TyIs and TyUs, whose suffix len should be 5 nowadays. But since they were only used for parsing, and unneeded for that since 606a309d, remove them rather than fixing.
2015-08-19Auto merge of #27849 - jonas-schievink:macro-errors, r=nikomatsakisbors-46/+50
And some small indentation/code style fixes in the macro parser.
2015-08-17Clean up simd_cast translation.Huon Wilson-0/+24
2015-08-17Rename `simd_basics` feature gate to `repr_simd`.Huon Wilson-6/+3
2015-08-17Create "platform-intrinsic" ABI for SIMD/platform intrinsics.Huon Wilson-4/+15
This is purposely separate to the "rust-intrinsic" ABI, because these intrinsics are theoretically going to become stable, and should be fine to be independent of the compiler/language internals since they're intimately to the platform.
2015-08-17feature gate `cfg(target_feature)`.Huon Wilson-23/+107
This is theoretically a breaking change, but GitHub search turns up no uses of it, and most non-built-in cfg's are passed via cargo features, which look like `feature = "..."`, and hence can't overlap.
2015-08-17Implement `repr(simd)` as an alias for `#[simd]`.Huon Wilson-2/+25
2015-08-16FnFnBlock -> FkClosureManish Goregaokar-5/+5
2015-08-16Impl Eq/PartialEq on FnKind, improve docsManish Goregaokar-3/+2
2015-08-16Auto merge of #27818 - alexcrichton:tag-all-the-issues, r=aturonbors-5/+4
This commit turns `#[unstable]` attributes missing an `issue` annotation into a hard error. This will require the libs team to ensure that there's a tracking issue for all unstable features in the standard library. All existing unstable features have had issues created and they've all been updated. Yay! Closes #26868
2015-08-16Auto merge of #27851 - nikomatsakis:cleanup-ty-decoder, r=eddybbors-45/+11
Just a little code cleanup I was doing as part of another refactoring (which may turn out not to be needed). The main thrust of this is to cleanup the interface to `tydecode.rs` to be less ridiculously repetitive. I also purged the generic "def-id conversion" parameter in favor of a trait object, just to reduce code duplication a bit and make the signatures a bit less messy. I measured the bootstrapping time to build stage2 with these changes, it was identical. (But it'd be easy enough to restore the unboxed closure if we wanted it.)
2015-08-15Add issue for the rustc_private feature everywhereAlex Crichton-1/+1
2015-08-15syntax: Require issues for unstable featuresAlex Crichton-4/+3
This turns an `#[unstable]` tag without an `issue` annotation into a hard error to ensure that we've always got a tracking issue for unstable features in the standard library.
2015-08-15Slightly improved macro diagnostics + Indentation fixesJonas Schievink-46/+50
2015-08-15Auto merge of #27827 - w00ns:for-loop-expn-issue-27639, r=alexcrichtonbors-10/+1
Fixes #27639
2015-08-15Fix issue with for loop expansionw00ns-10/+1
2015-08-15Auto merge of #27841 - jonas-schievink:still-repeating-span, r=alexcrichtonbors-1/+1
Current behaviour demo: http://is.gd/l3FEgo (The span is printed at the start of the source code) This patch moves the span to the use of `$i` in the macro rhs (as the code comment already claims)
2015-08-14move InlinedItem into librustc, where it belongsNiko Matsakis-45/+11
2015-08-15Fix span of invalid metavariable repetitionJonas Schievink-1/+1
2015-08-14rustc: Allow changing the default allocatorAlex Crichton-0/+4
This commit is an implementation of [RFC 1183][rfc] which allows swapping out the default allocator on nightly Rust. No new stable surface area should be added as a part of this commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1183 Two new attributes have been added to the compiler: * `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to indicate that it requires an allocator crate to be in scope. * `#![allocator]` - this is a indicator that the crate is an allocator which can satisfy the `needs_allocator` attribute above. The ABI of the allocator crate is defined to be a set of symbols that implement the standard Rust allocation/deallocation functions. The symbols are not currently checked for exhaustiveness or typechecked. There are also a number of restrictions on these crates: * An allocator crate cannot transitively depend on a crate that is flagged as needing an allocator (e.g. allocator crates can't depend on liballoc). * There can only be one explicitly linked allocator in a final image. * If no allocator is explicitly requested one will be injected on behalf of the compiler. Binaries and Rust dylibs will use jemalloc by default where available and staticlibs/other dylibs will use the system allocator by default. Two allocators are provided by the distribution by default, `alloc_system` and `alloc_jemalloc` which operate as advertised. Closes #27389
2015-08-14Auto merge of #27641 - nikomatsakis:soundness-rfc-1214, r=nrcbors-1/+13
This PR implements the majority of RFC 1214. In particular, it implements: - the new outlives relation - comprehensive WF checking For the most part, new code receives warnings, not errors, though 3 regressions were found via a crater run. There are some deviations from RFC 1214. Most notably: - we still consider implied bounds from fn ret; this intersects other soundness issues that I intend to address in detail in a follow-up RFC. Fixing this without breaking a lot of code probably requires rewriting compare-method somewhat (which is probably a good thing). - object types do not check trait bounds for fear of encountering `Self`; this was left as an unresolved question in RFC 1214, but ultimately feels inconsistent. Both of those two issues are highlighted in the tracking issue, https://github.com/rust-lang/rust/issues/27579. #27579 also includes a testing matrix with new tests that I wrote -- these probably duplicate some existing tests, I tried to check but wasn't quite sure what to look for. I tried to be thorough in testing the WF relation, at least, but would welcome suggestions for missing tests. r? @nrc (or perhaps someone else?)
2015-08-13Auto merge of #27684 - alexcrichton:remove-deprecated, r=aturonbors-8/+18
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-12Introduce a "origin/cause" for new requirements (or bugfixes...) introduced ↵Niko Matsakis-0/+12
by RFC 1214, and issue a warning (and explanatory note) when we encounter such a thing.
2015-08-12Add two new kinds of predicates, WellFormed and ObjectSafe.Niko Matsakis-1/+1
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-8/+18
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-12Auto merge of #27691 - jonas-schievink:for-macro, r=alexcrichtonbors-1/+1
Closes #27004