summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2018-04-27Feature gate where clauses on associated typesMatthew Jasper-2/+6
2018-04-21Revert stabilization of `feature(never_type)`.Felix S. Klock II-0/+7
This commit is just covering the feature gate itself and the tests that made direct use of `!` and thus need to opt back into the feature. A follow on commit brings back the other change that motivates the revert: Namely, going back to the old rules for falling back to `()`.
2018-04-20Remove `underscore_lifetimes` and `match_default_bindings` from active ↵kennytm-6/+0
feature list These are already stabilized in 1.26.
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-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
2018-03-14Implement import renaming with `_` (RFC 2166)Vadim Petrochenkov-0/+18
2018-03-14stabilise feature(never_type)Andrew Cann-6/+2
Replace feature(never_type) with feature(exhaustive_patterns). feature(exhaustive_patterns) only covers the pattern-exhaustives checks that used to be covered by feature(never_type)
2018-03-08Make it possible to ungate features by epochManish Goregaokar-4/+16
2018-03-08Allow mentioning an optional epoch on featuresManish Goregaokar-185/+186
2018-03-08Stabilize const_indexing featureOliver Schneider-3/+2
2018-03-05Turn features() into a query.Michael Woerister-0/+7
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-8/+0
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
2018-03-01Rollup merge of #48500 - petrochenkov:parpat, r=nikomatsakisManish Goregaokar-0/+7
Support parentheses in patterns under feature gate This is a prerequisite for any other extensions to pattern syntax - `|` with multiple patterns, type ascription, `..PAT` in slice patterns. Closes https://github.com/rust-lang/rfcs/issues/554
2018-02-28Rollup merge of #48380 - nikomatsakis:issue-48251-master, r=acrichtoManish Goregaokar-1/+1
Fixes #47311. r? @nrc
2018-03-01Support parentheses in patterns under feature gateVadim Petrochenkov-0/+7
Improve recovery for trailing comma after `..`
2018-02-24Rollup merge of #48490 - petrochenkov:orpat, r=eddybManish Goregaokar-0/+9
Implement multiple patterns with `|` in `if let` and `while let` (RFC 2175) cc https://github.com/rust-lang/rust/issues/48215
2018-02-24Rollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakisManish Goregaokar-69/+1
Error on nested impl Trait and path projections from impl Trait cc #34511 r? @nikomatsakis
2018-02-24Implement multiple patterns with `|` in `if let` and `while let`Vadim Petrochenkov-0/+9
2018-02-23Rollup merge of #48429 - toidiu:patch-1, r=nikomatsakisManish Goregaokar-1/+1
update tracking issue for nll Point to the new tracing issue for nll For reference https://github.com/rust-lang/rust/issues/44928
2018-02-22update tracking issue for nlltoidiu-1/+1
Point to the new tracing issue for nll
2018-02-20make `#[unwind]` attribute specify expectations more clearlyNiko Matsakis-1/+1
You can now choose between the following: - `#[unwind(allowed)]` - `#[unwind(aborts)]` Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though I think we should change this eventually.
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-2/+2