about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2018-07-09Implement #[alloc_error_handler]Simon Sapin-0/+8
This to-be-stable attribute is equivalent to `#[lang = "oom"]`. It is required when using the alloc crate without the std crate. It is called by `handle_alloc_error`, which is in turned called by "infallible" allocations APIs such as `Vec::push`.
2018-07-06Auto merge of #52018 - flip1995:rfc2103, r=oli-obkbors-0/+2
Implementation of tool lints. Tracking issue: #44690
2018-07-05rustc: Update tracking issue for wasm_import_moduleAlex Crichton-1/+1
It's now https://github.com/rust-lang/rust/issues/52090
2018-07-04Implementation of tool lintsflip1995-0/+2
2018-06-30Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertjbors-1/+1
Lowering cleanups [1/N]
2018-06-28Rollup merge of #51799 - mark-i-m:lower_case_feature_gate, r=mark-i-mkennytm-4/+4
Lower case some feature gate error messages
2018-06-27Generate `DefId`s for the impl trait of `async` functionsOliver Schneider-1/+1
2018-06-26lower case some feature gate messagesmark-4/+4
2018-06-26inclusive range syntax lint (`...` → `..=`)Zack M. Davis-1/+2
Our implementation ends up changing the `PatKind::Range` variant in the AST to take a `Spanned<RangeEnd>` instead of just a `RangeEnd`, because the alternative would be to try to infer the span of the range operator from the spans of the start and end subexpressions, which is both hideous and nontrivial to get right (whereas getting the change to the AST right was a simple game of type tennis). This is concerning #51043.
2018-06-26Auto merge of #49469 - Nokel81:allow-irrefutable-let-patterns, r=nikomatsakisbors-0/+3
Implementation of RFC 2086 - Allow Irrefutable Let patterns This is the set of changes for RFC2086. Tracking issue #44495. Rendered [here](https://github.com/rust-lang/rfcs/pull/2086)
2018-06-21async await desugaring and testsTaylor Cramer-3/+9
2018-06-21Parse async fn header.Without Boats-18/+23
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-20Remove methods from ast::GenericParam and ast::Genericsvarkor-2/+2
2018-06-17Auto merge of #51425 - QuietMisdreavus:thats-def-a-namespace-there, ↵bors-1/+1
r=petrochenkov refactor: create multiple HIR items for imports When lowering `use` statements into HIR, they get a `Def` of the thing they're pointing at. This is great for things that need to know what was just pulled into scope. However, this is a bit misleading, because a `use` statement can pull things from multiple namespaces if their names collide. This is a problem for rustdoc, because if there are a module and a function with the same name (for example) then it will only document the module import, because that's that the lowered `use` statement points to. The current version of this PR does the following: * Whenever the resolver comes across a `use` statement, it loads the definitions into a new `import_map` instead of the existing `def_map`. This keeps the resolutions per-namespace so that all the target definitions are available. * When lowering `use` statements, it looks up the resolutions in the `import_map` and creates multiple `Item`s if there is more than one resolution. * To ensure the `NodeId`s are properly tracked in the lowered module, they need to be created in the AST, and pulled out as needed if multiple resolutions are available. Fixes https://github.com/rust-lang/rust/issues/34843
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-1/+1
2018-06-12Stabilize #[repr(transparent)]Simon Sapin-8/+2
Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318 Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-11Stabilize the #[global_allocator] attributeSimon Sapin-7/+3
Fixes https://github.com/rust-lang/rust/issues/27389
2018-06-08Rollup merge of #51298 - Dylan-DPC:stabilise/termination-test, r=nikomatsakisMark Rousskov-3/+2
Stabilize unit tests with non-`()` return type References #48854
2018-06-08rename `irrefutable_let_pattern` to `irrefutable_let_patterns`Niko Matsakis-1/+1
2018-06-08Rollup merge of #51283 - ↵kennytm-1/+1
kennytm:fix-51279-preempt-the-warning-song-and-dance, r=nikomatsakis Deny #[cfg] and #[cfg_attr] on generic parameters. Fix #51279. Attributes on generic parameters are not expanded, meaning `#[cfg]`, `#[cfg_attr]` and attribute proc macros are entirely ignored on them. This PR makes using the first two attributes an error, because if they are correctly expanded will affect the AST and change code behavior. I'm beta-nominating this, because generic parameter attributes are stabilizing in 1.27, and if we did not reserve their usage, we may never be able to repurpose the meaning of these attributes in the Rust 2015 edition.
2018-06-05flag changed to nonedylan_DPC-1/+1
2018-06-05Implementation of RFC 2086 - Allow Irrefutable Let patternsSebastian Malton-0/+3
2018-06-04Put doc keyword behind feature flagGuillaume Gomez-0/+8
2018-06-04Merge branch 'master' into stabilise/termination-testDylan DPC-0/+8
2018-06-03implement #[panic_implementation]Jorge Aparicio-0/+9
2018-06-02fixed feature gate to right placedylan_DPC-2/+2
2018-06-02Stabilize unit tests with non-`()` return typedylan_DPC-3/+3
2018-06-02Deny #[cfg] and #[cfg_attr] on generic parameters.kennytm-1/+1
2018-05-27Ensure every unstable feature has a tracking issue.kennytm-22/+24
2018-05-27Auto merge of #51066 - est31:master, r=sfacklerbors-1/+1
Point to the current box syntax tracking issue The issue was used for both box syntax as well as placement new. It got closed due to placement new being unapproved. So a new one got created for box syntax, yet neither the unstable book nor feature_gate.rs got updated. We are doing this now. r? @aidanhs
2018-05-26Point to the current box syntax tracking issueest31-1/+1
The issue was used for both box syntax as well as placement new. It got closed due to placement new being unapproved. So a new one got created for box syntax, yet neither the unstable book nor feature_gate.rs got updated. We are doing this now.
2018-05-26Auto merge of #51052 - nikomatsakis:obsolete-arrow, r=petrochenkovbors-0/+3
restore emplacement syntax (obsolete) Fix https://github.com/rust-lang/rust/issues/50832 r? @petrochenkov
2018-05-25Implement outlives requirements inference for dyn and projections.toidiu-0/+6
Add tests, documentation and attr for feature.
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+3
2018-05-22Allow let bindings in const fn and constantsOliver Schneider-0/+3
2018-05-21Remove rustc_serialize_exclude_nullManish Goregaokar-5/+0
2018-05-20Auto merge of #50820 - alexcrichton:no-modules, r=petrochenkovbors-0/+1
rustc: Disallow modules and macros in expansions This commit feature gates generating modules and macro definitions in procedural macro expansions. Custom derive is exempt from this check as it would be a large retroactive breaking change (#50587). It's hoped that we can hopefully stem the bleeding to figure out a better solution here before opening up the floodgates. The restriction here is specifically targeted at surprising hygiene results [1] that result in non-"copy/paste" behavior. Hygiene and procedural macros is intended to be avoided as much as possible for Macros 1.2 by saying everything is "as if you copy/pasted the code", but modules and macros are sort of weird exceptions to this rule that aren't fully fleshed out. [1]: https://github.com/rust-lang/rust/issues/50504#issuecomment-387734625 cc #50504
2018-05-18rustc: Disallow modules and macros in expansionsAlex Crichton-0/+1
This commit feature gates generating modules and macro definitions in procedural macro expansions. Custom derive is exempt from this check as it would be a large retroactive breaking change (#50587). It's hoped that we can hopefully stem the bleeding to figure out a better solution here before opening up the floodgates. The restriction here is specifically targeted at surprising hygiene results [1] that result in non-"copy/paste" behavior. Hygiene and procedural macros is intended to be avoided as much as possible for Macros 1.2 by saying everything is "as if you copy/pasted the code", but modules and macros are sort of weird exceptions to this rule that aren't fully fleshed out. [1]: https://github.com/rust-lang/rust/issues/50504#issuecomment-387734625 cc #50504
2018-05-17Rename trans to codegen everywhere.Irina Popa-2/+2
2018-05-16Add feature gate label_break_valueest31-0/+9
2018-05-15Feature gate trivial boundsMatthew Jasper-0/+3
2018-05-13stabilize :lifetimeAlex Burka-6/+2
2018-05-13Macros: Add a 'literal' fragment specifierDan Aloni-0/+6
Implements RFC 1576. See: https://github.com/rust-lang/rfcs/blob/master/text/1576-macros-literal-matcher.md Changes are mostly in libsyntax, docs, and tests. Feature gate is enabled for 1.27.0. Many thanks to Vadim Petrochenkov for following through code reviews and suggestions. Example: ````rust macro_rules! test_literal { ($l:literal) => { println!("literal: {}", $l); }; ($e:expr) => { println!("expr: {}", $e); }; } fn main() { let a = 1; test_literal!(a); test_literal!(2); test_literal!(-3); } ``` Output: ``` expr: 1 literal: 2 literal: -3 ```
2018-05-12rustc: Allow an edition's feature on that editionAlex Crichton-41/+46
This commit fixes a hard error where the `#![feature(rust_2018_preview)]` feature was forbidden to be mentioned when the `--edition 2018` flag was passed. This instead silently accepts that feature gate despite it not being necessary. It's intended that this will help ease the transition into the 2018 edition as users will, for the time being, start off with the `rust_2018_preview` feature and no longer immediately need to remove it. Closes #50662
2018-05-10Remove `nll` from `rust_2018_preview`Alex Crichton-1/+1
NLL isn't quite ready yet so gonna hold off on inserting it into the preview.
2018-05-04Make extern_absolute_paths only work on the new editionManish Goregaokar-2/+4
2018-05-04Make --edition imply the preview flagManish Goregaokar-0/+6
2018-05-04Add catch and proc macros to the edition (fixes #50443)Manish Goregaokar-2/+2
2018-05-02fix testsflip1995-2/+2
2018-05-02make it compile againflip1995-8/+24