about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2018-04-17Auto merge of #49664 - alexcrichton:stable-simd, r=BurntSushibors-11/+16
Stabilize x86/x86_64 SIMD This commit stabilizes the SIMD in Rust for the x86/x86_64 platforms. Notably this commit is stabilizing: * The `std::arch::{x86, x86_64}` modules and the intrinsics contained inside. * The `is_x86_feature_detected!` macro in the standard library * The `#[target_feature(enable = "...")]` attribute * The `#[cfg(target_feature = "...")]` matcher Stabilization of the module and intrinsics were primarily done in rust-lang-nursery/stdsimd#414 and the two attribute stabilizations are done in this commit. The standard library is also tweaked a bit with the new way that stdsimd is integrated. Note that other architectures like `std::arch::arm` are not stabilized as part of this commit, they will likely stabilize in the future after they've been implemented and fleshed out. Similarly the `std::simd` module is also not being stabilized in this commit, only `std::arch`. Finally, nothing related to `__m64` is stabilized in this commit either (MMX), only SSE and up types and intrinsics are stabilized. Closes #29717 Closes #44839 Closes #48556
2018-04-16Separately gate each target_feature featureAlex Crichton-0/+11
Use an explicit whitelist for what features are actually stable and can be enabled.
2018-04-17Remove `underscore_lifetimes` and `match_default_bindings` from active ↵kennytm-6/+0
feature list These are already stabilized in 1.26.
2018-04-16Stabilize x86/x86_64 SIMDAlex Crichton-11/+5
This commit stabilizes the SIMD in Rust for the x86/x86_64 platforms. Notably this commit is stabilizing: * The `std::arch::{x86, x86_64}` modules and the intrinsics contained inside. * The `is_x86_feature_detected!` macro in the standard library * The `#[target_feature(enable = "...")]` attribute * The `#[cfg(target_feature = "...")]` matcher Stabilization of the module and intrinsics were primarily done in rust-lang-nursery/stdsimd#414 and the two attribute stabilizations are done in this commit. The standard library is also tweaked a bit with the new way that stdsimd is integrated. Note that other architectures like `std::arch::arm` are not stabilized as part of this commit, they will likely stabilize in the future after they've been implemented and fleshed out. Similarly the `std::simd` module is also not being stabilized in this commit, only `std::arch`. Finally, nothing related to `__m64` is stabilized in this commit either (MMX), only SSE and up types and intrinsics are stabilized. Closes #29717 Closes #44839 Closes #48556
2018-04-12Implement inferring outlives requirements for references, structs, enum, ↵toidiu-0/+9
union, and projection types. added a feature gate and tests for these scenarios.
2018-04-11Implementation of `#[repr(packed(n))]` RFC 1399.Cameron Hart-4/+15
2018-04-09Auto merge of #49673 - ollie27:stab, r=sfacklerbors-1/+1
Correct a few stability attributes * `const_indexing` language feature was stabilized in 1.26.0 by #46882 * `Display` impls for `PanicInfo` and `Location` were stabilized in 1.26.0 by #47687 * `TrustedLen` is still unstable so its impls should be as well even though `RangeInclusive` was stabilized by #47813 * `!Send` and `!Sync` for `Args` and `ArgsOs` were stabilized in 1.26.0 by #48005 * `EscapeDefault` has been stable since 1.0.0 so should continue to show that even though it was moved to core in #48735 This could be backported to beta like #49612
2018-04-06Fix feature gating for crate/extern in pathsVadim Petrochenkov-2/+10
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-2/+2
2018-04-06Remove more duplicated spansVadim Petrochenkov-2/+2
2018-04-06Rename `PathSegment::identifier` to `ident`Vadim Petrochenkov-2/+2
2018-04-05Rollup merge of #49350 - abonander:macros-in-extern, r=petrochenkovAlex Crichton-0/+11
Expand macros in `extern {}` blocks This permits macro and proc-macro and attribute invocations (the latter only with the `proc_macro` feature of course) in `extern {}` blocks, gated behind a new `macros_in_extern` feature. A tracking issue is now open at #49476 closes #48747
2018-04-05Correct a few stability attributesOliver Middleton-1/+1
2018-04-05Auto merge of #49684 - kennytm:rollup, r=kennytmbors-6/+6
Rollup of 9 pull requests Successful merges: - #48658 (Add a generic CAS loop to std::sync::Atomic*) - #49253 (Take the original extra-filename passed to a crate into account when resolving it as a dependency) - #49345 (RFC 2008: Finishing Touches) - #49432 (Flush executables to disk after linkage) - #49496 (Add more vec![... ; n] optimizations) - #49563 (add a dist builder to build rust-std components for the THUMB targets) - #49654 (Host compiler documentation: Include private items) - #49667 (Add more features to rust_2018_preview) - #49674 (ci: Remove x86_64-gnu-incremental builder) Failed merges:
2018-04-05Stabilize attributes on generic parametersVadim Petrochenkov-18/+2
2018-04-04Add more features to rust_2018_previewManish Goregaokar-6/+6
2018-04-03expand macro invocations in `extern {}` blocksAustin Bonander-0/+11
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-7/+0
Closes #22181, #27779
2018-04-02Auto merge of #49252 - Manishearth:easy-feature-flag, r=nikomatsakisbors-13/+23
Easy edition feature flag We no longer gate features on epochs; instead we have a `#![feature(rust_2018_preview)]` that flips on a bunch of features (currently dyn_trait). Based on #49001 to avoid merge conflicts r? @nikomatsakis
2018-04-02Expand attribute macros on statements and expressions.Austin Bonander-1/+1
Retains the `stmt_expr_attributes` feature requirement for attributes on expressions. closes #41475 cc #38356
2018-03-29Add easy edition feature flagManish Goregaokar-13/+23
2018-03-29Stabilize underscore lifetimesTaylor Cramer-8/+5
2018-03-28Stabilize match_default_bindingsTaylor Cramer-3/+2
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-26Stabilize i128_typeMark Mansi-15/+2
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-3/+2
2018-03-26Stabilize universal_impl_traitTaylor Cramer-3/+2
2018-03-25Rollup merge of #49299 - SimonSapin:ubiquity, r=nikomatsakiskennytm-23/+3
Stabilize the copy_closures and clone_closures features In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do. Tracking issue: https://github.com/rust-lang/rust/issues/44490
2018-03-25Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakiskennytm-2/+4
Stabilize termination_trait, split out termination_trait_test For #48453. First time contribution, so I'd really appreciate any feedback on how this PR can be better. Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-23Merge branch '49001_epoch' of https://github.com/klnusbaum/rust into rollupAlex Crichton-10/+10
2018-03-23Merge branch 'master' of https://github.com/Lymia/rust into rollupAlex Crichton-0/+14
2018-03-23Stabilize the copy_closures and clone_closures featuresSimon Sapin-23/+3
In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do.
2018-03-22rustc: Add a `#[wasm_import_module]` attributeAlex Crichton-0/+7
This commit adds a new attribute to the Rust compiler specific to the wasm target (and no other targets). The `#[wasm_import_module]` attribute is used to specify the module that a name is imported from, and is used like so: #[wasm_import_module = "./foo.js"] extern { fn some_js_function(); } Here the import of the symbol `some_js_function` is tagged with the `./foo.js` module in the wasm output file. Wasm-the-format includes two fields on all imports, a module and a field. The field is the symbol name (`some_js_function` above) and the module has historically unconditionally been `"env"`. I'm not sure if this `"env"` convention has asm.js or LLVM roots, but regardless we'd like the ability to configure it! The proposed ES module integration with wasm (aka a wasm module is "just another ES module") requires that the import module of wasm imports is interpreted as an ES module import, meaning that you'll need to encode paths, NPM packages, etc. As a result, we'll need this to be something other than `"env"`! Unfortunately neither our version of LLVM nor LLD supports custom import modules (aka anything not `"env"`). My hope is that by the time LLVM 7 is released both will have support, but in the meantime this commit adds some primitive encoding/decoding of wasm files to the compiler. This way rustc postprocesses the wasm module that LLVM emits to ensure it's got all the imports we'd like to have in it. Eventually I'd ideally like to unconditionally require this attribute to be placed on all `extern { ... }` blocks. For now though it seemed prudent to add it as an unstable attribute, so for now it's not required (as that'd force usage of a feature gate). Hopefully it doesn't take too long to "stabilize" this! cc rust-lang-nursery/rust-wasm#29
2018-03-22rustc: Add a `#[wasm_custom_section]` attributeAlex Crichton-0/+8
This commit is an implementation of adding custom sections to wasm artifacts in rustc. The intention here is to expose the ability of the wasm binary format to contain custom sections with arbitrary user-defined data. Currently neither our version of LLVM nor LLD supports this so the implementation is currently custom to rustc itself. The implementation here is to attach a `#[wasm_custom_section = "foo"]` attribute to any `const` which has a type like `[u8; N]`. Other types of constants aren't supported yet but may be added one day! This should hopefully be enough to get off the ground with *some* custom section support. The current semantics are that any constant tagged with `#[wasm_custom_section]` section will be *appended* to the corresponding section in the final output wasm artifact (and this affects dependencies linked in as well, not just the final crate). This means that whatever is interpreting the contents must be able to interpret binary-concatenated sections (or each constant needs to be in its own custom section). To test this change the existing `run-make` test suite was moved to a `run-make-fulldeps` folder and a new `run-make` test suite was added which applies to all targets by default. This test suite currently only has one test which only runs for the wasm target (using a node.js script to use `WebAssembly` in JS to parse the wasm output).
2018-03-22Clarify description of raw_identifiers feature flag.Lymia Aluysia-1/+1
2018-03-20Revert "Stabilize termination_trait in 1.25, not 1.26"Tyler Mandry-2/+2
This reverts commit e5a55e74405dedf8bc0744300a8c506eea94bc18.
2018-03-20rename epoch to editionKurtis Nusbaum-10/+10
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-11/+5
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-19Stabilize termination_trait in 1.25, not 1.26Tyler Mandry-2/+2
2018-03-19Stabilize termination_traitTyler Mandry-3/+2
This stabilizes `main` with non-() return types; see #48453.
2018-03-19Split out termination_trait_test feature gateTyler Mandry-0/+3
2018-03-18Feature gate raw identifiers.Lymia Aluysia-0/+14
2018-03-18Auto merge of #48985 - scalexm:lowering, r=nikomatsakisbors-0/+7
MVP for chalkification r? @nikomatsakis
2018-03-18Auto merge of #48917 - petrochenkov:import, r=oli-obkbors-1/+1
syntax: Make imports in AST closer to the source and cleanup their parsing This is a continuation of https://github.com/rust-lang/rust/pull/45846 in some sense.
2018-03-17Add some docs + Fix rebaseVadim Petrochenkov-1/+1
2018-03-17syntax: Make `_` an identifierVadim Petrochenkov-1/+1
2018-03-16Auto merge of #49051 - kennytm:rollup, r=kennytmbors-0/+18
Rollup of 17 pull requests - Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972 - Failed merges:
2018-03-16Rollup merge of #48922 - petrochenkov:asunder, r=nikomatsakiskennytm-0/+18
Implement import renaming with `_` (RFC 2166) cc https://github.com/rust-lang/rust/issues/48216
2018-03-15Stabilize `dotdoteq_in_patterns` language feature.kennytm-8/+3
Stabilize `match 2 { 1..=3 => {} }`.
2018-03-15Stabilize `inclusive_range_syntax` language feature.kennytm-8/+2
Stabilize the syntax `a..=b` and `..=b`.
2018-03-14Add MVP for chalkificationscalexm-0/+7