summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-1/+1
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-3/+3
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-2/+2
2015-10-13Test and gate empty structures and variants betterVadim Petrochenkov-18/+20
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-1/+1
2015-10-10Auto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1bors-0/+9
implement RFC 1238: nonparametric dropck. cc #28498 cc @nikomatsakis
2015-10-09Auto merge of #28857 - nrc:lowering, r=nikomatsakisbors-1/+1
r? @nikomatsakis
2015-10-09Auto merge of #28919 - huonw:placement-tracking-issue, r=alexcrichtonbors-2/+2
cc #28244
2015-10-09Point `placement_in_syntax`/`box_syntax` lang features at tracking issue #27779.Huon Wilson-2/+2
cc #28244.
2015-10-09Fix stabilityNick Cameron-1/+1
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-2/+1
2015-10-06Add RFC 1238's `unsafe_destructor_blind_to_params` (UGEH) where needed.Felix S. Klock II-4/+4
I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to bootstrap; but of course that alone was not sufficient for `make check`. Later I added `unsafe_destructor_blind_to_params` to collections, in particular `LinkedList` and `RawTable` (the backing representation for `HashMap` and `HashSet`), to get the regression tests exercising cyclic structure from PR #27185 building. ---- Note that the feature is `dropck_parametricity` (which is not the same as the attribute's name). We will almost certainly vary our strategy here in the future, so it makes some sense to have a not-as-ugly name for the feature gate. (The attribute name was deliberately selected to be ugly looking.)
2015-10-06Non-parametric dropck; instead trust an unsafe attribute (RFC 1238).Felix S. Klock II-0/+9
Implement cannot-assume-parametricity (CAP) from RFC 1238, and add the UGEH attribute. ---- Note that we check for the attribute attached to the dtor method, not the Drop impl. (This is just to match the specification of RFC and the tests; I am not wedded to this approach.)
2015-09-26Auto merge of #28642 - petrochenkov:name3, r=nrcbors-6/+6
This PR removes random remaining `Ident`s outside of libsyntax and performs general cleanup In particular, interfaces of `Name` and `Ident` are tidied up, `Name`s and `Ident`s being small `Copy` aggregates are always passed to functions by value, and `Ident`s are never used as keys in maps, because `Ident` comparisons are tricky. Although this PR closes https://github.com/rust-lang/rust/issues/6993 there's still work related to it: - `Name` can be made `NonZero` to compress numerous `Option<Name>`s and `Option<Ident>`s but it requires const unsafe functions. - Implementation of `PartialEq` on `Ident` should be eliminated and replaced with explicit hygienic, non-hygienic or member-wise comparisons. - Finally, large parts of AST can potentially be converted to `Name`s in the same way as HIR to clearly separate identifiers used in hygienic and non-hygienic contexts. r? @nrc
2015-09-26Auto merge of #28612 - gandro:targetvendor, r=alexcrichtonbors-0/+7
This adds a new target property, `target_vendor`. It is to be be used as a matcher for conditional compilation. The vendor is part of the [autoconf target triple](http://llvm.org/docs/doxygen/html/classllvm_1_1Triple.html#details): `<arch><sub>-<vendor>-<os>-<env>`. `arch`, `target_os` and `target_env` are already supported by Rust. This change was suggested in PR #28593. It enables conditional compilation based on the vendor. This is needed for the rumprun target, which needs to match against both, target_os and target_vendor. The default value for `target_vendor` is "unknown", "apple" and "pc" are other common values. Matching against the `target_vendor` is introduced behind the feature gate `#![feature(cfg_target_vendor)]`. This is the first time I messed around with rustc internals. I just added the my code where I found the existing `target_*` variables, hopefully I haven't missed anything. Please review with care. :) r? @alexcrichton
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-6/+6
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24Remove the deprecated box(PLACE) syntax.Eduard Burtescu-3/+3
2015-09-24rustc: Add target_vendor for target triplesSebastian Wicki-0/+7
This adds a new target property, `target_vendor` which can be used as a matcher for conditional compilation. The vendor is part of the autoconf target triple: <arch><sub>-<vendor>-<os>-<env> The default value for `target_vendor` is "unknown". Matching against the `target_vendor` with `#[cfg]` is currently feature gated as `cfg_target_vendor`.
2015-09-20Replace `ast::Mac_` enum with structAndrew Paseltiner-1/+1
Closes #28527.
2015-09-19Feature-gate `#[no_debug]` and `#[omit_gdb_pretty_printer_section]`Andrew Paseltiner-2/+13
Closes #28091.
2015-09-18Overloaded augmented assignmentsJorge Aparicio-0/+6
2015-09-18Add feature gateVadim Petrochenkov-1/+20
2015-09-13Add an attribute to mark function as unwindingBjörn Steinbrink-0/+4
2015-09-08Auto merge of #28246 - huonw:lang-tracking-issues, r=alexcrichtonbors-90/+117
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-09-08Allow tracking issues for lang features.Huon Wilson-90/+117
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-09-06add MIR code (unused thus far)Niko Matsakis-3/+10
2015-09-03Add an intital HIR and lowering stepNick Cameron-0/+2
2015-08-31Auto merge of #28007 - Ms2ger:FnKind, r=nrcbors-6/+6
There is no longer a need for that pattern, since enums are now qualified.
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-26Rename FnKind variants and stop re-exporting them from the visit module.Ms2ger-6/+6
There is no longer a need for that pattern, since enums are now qualified.
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/+13
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-0/+60
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-0/+20
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-10syntax: Add a new unstable #[linked_from] attributeAlex Crichton-0/+5
To correctly reexport statically included libraries from a DLL on Windows, the compiler will soon need to have knowledge about what symbols are statically included and which are not. To solve this problem a new unstable `#[linked_from]` attribute is being added and recognized on `extern` blocks to indicate which native library the symbols are coming from. The compiler then keeps track of what the set of FFI symbols are that are included statically. This information will be used in a future commit to configure how we invoke the linker on Windows.
2015-08-10Auto merge of #27338 - alexcrichton:remove-morestack, r=brsonbors-1/+3
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow) r? @brson
2015-08-10Remove morestack supportAlex Crichton-1/+3
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-08-06Auto merge of #27296 - jroesch:type-macros, r=huonwbors-0/+6
This pull request implements the functionality for [RFC 873](https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md). This is currently just an update of @freebroccolo's branch from January, the corresponding commits are linked in each commit message. @nikomatsakis and I had talked about updating the macro language to support a lifetime fragment specifier, and it is possible to do that work on this branch as well. If so we can (collectively) talk about it next week during the pre-RustCamp work week.
2015-08-04Address final nitsJared Roesch-2/+4
2015-08-04Add feature gateJared Roesch-2/+6
2015-08-03syntax: Implement #![no_core]Alex Crichton-0/+5
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-29Feature gate associated type defaultsBrian Anderson-1/+8
There are multiple issues with them as designed and implemented. cc #27364
2015-07-29FormattingBrian Anderson-1/+2
2015-07-28remove `get_ident` and `get_name`, make `as_str` soundOliver Schneider-1/+1
2015-07-25Add omitted trailing commaJared Roesch-1/+1
2015-07-25Add feature gateJared Roesch-2/+7
2015-07-24Add static_recursion feature gate.Eli Friedman-0/+6
2015-07-22Add feature-gates for desugaring-based `box` and placement-`in`.Felix S. Klock II-1/+56
update test/compile-fail/feature-gate-box-expr.rs to reflect new feature gates. Part of what lands with Issue 22181.
2015-07-22Hack for "unsafety hygiene" -- `push_unsafe!` and `pop_unsafe!`.Felix S. Klock II-0/+11
Even after expansion, the generated expressions still track depth of such pushes (i.e. how often you have "pushed" without a corresponding "pop"), and we add a rule that in a context with a positive `push_unsafe!` depth, it is effectively an `unsafe` block context. (This way, we can inject code that uses `unsafe` features, but still contains within it a sub-expression that should inherit the outer safety checking setting, outside of the injected code.) This is a total hack; it not only needs a feature-gate, but probably should be feature-gated forever (if possible). ignore-pretty in test/run-pass/pushpop-unsafe-okay.rs