summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2016-11-08Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakisbors-15/+2
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: https://github.com/rust-lang/rust/pull/36203 Closes https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis
2016-11-05Fix tests from the rollupAlex Crichton-1/+1
2016-11-05Merge branch 'selfgate' of https://github.com/petrochenkov/rust into rollupAlex Crichton-0/+3
2016-11-03Add feature gate for Self and associated types in struct expressions and ↵Vadim Petrochenkov-0/+3
patterns
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-15/+2
2016-10-31rustc: Add knowledge of Windows subsystems.Alex Crichton-0/+9
This commit is an implementation of [RFC 1665] which adds support for the `#![windows_subsystem]` attribute. This attribute allows specifying either the "windows" or "console" subsystems on Windows to the linker. [RFC 1665]: https://github.com/rust-lang/rfcs/blob/master/text/1665-windows-subsystem.md Previously all Rust executables were compiled as the "console" subsystem which meant that if you wanted a graphical application it would erroneously pop up a console whenever opened. When compiling an application, however, this is undesired behavior and the "windows" subsystem is used instead to have control over user interactions. This attribute is validated, but ignored on all non-Windows platforms. cc #37499
2016-10-27Auto merge of #37128 - nrc:depr-attr, r=@alexcrichtonbors-48/+116
Deprecate no_debug and custom_derive r? @nikomatsakis
2016-10-26Auto merge of #11994 - eddyb:struct-literal-field-shorthand, r=nrcbors-0/+11
Implement field shorthands in struct literal expressions. Implements #37340 in a straight-forward way: `Foo { x, y: f() }` parses as `Foo { x: x, y: f() }`. Because of the added `is_shorthand` to `ast::Field`, this is `[syntax-breaking]` (cc @Manishearth). * [x] Mark the fields as being a shorthand (the exact same way we do it in patterns), for pretty-printing. * [x] Gate the shorthand syntax with `#![feature(field_init_shorthand)]`. * [x] Don't parse numeric field as identifiers. * [x] Arbitrary field order tests.
2016-10-27review changesNick Cameron-8/+23
2016-10-27Implement field shorthands in struct literal expressions.Eduard Burtescu-0/+11
2016-10-27Deprecate custom_deriveNick Cameron-1/+6
Has a custom deprecation since deprecating features is not supported and is a pain to implement
2016-10-27deprecate no_debugNick Cameron-1/+1
2016-10-27Add possibility of deprecating attributesNick Cameron-44/+92
2016-10-26Fix typo, it bothered meJohn Hodge-1/+1
2016-10-19Rollup merge of #37265 - brson:bootstrap, r=alexcrichtonEduard-Mihai Burtescu-9/+6
Allow bootstrapping without a key. Fixes #36548 This will make it easier for packagers to bootstrap rustc when they happen to have a bootstrap compiler with a slightly different version number. It's not ok for anything other than the build system to set this environment variable. r? @alexcrichton
2016-10-19Rollup merge of #37117 - pnkfelix:may-dangle-attr, r=nikomatsakisEduard-Mihai Burtescu-0/+8
`#[may_dangle]` attribute `#[may_dangle]` attribute Second step of #34761. Last big hurdle before we can work in earnest towards Allocator integration (#32838) Note: I am not clear if this is *also* a syntax-breaking change that needs to be part of a breaking-batch.
2016-10-19Allow bootstrapping without a key. Fixes #36548Brian Anderson-9/+6
This will make it easier for packagers to bootstrap rustc when they happen to have a bootstrap compiler with a slightly different version number. It's not ok for anything other than the build system to set this environment variable.
2016-10-18Add invalid doc comment help messageGuillaume Gomez-2/+7
2016-10-12Stabilise `?`Nick Cameron-6/+2
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-11Add feature gate for `dropck_eyepatch` feature (RFC 1327).Felix S. Klock II-0/+8
2016-10-06rustc: Rename rustc_macro to proc_macroAlex Crichton-6/+6
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`, which reflects the general consensus of #35900. A follow up PR to Cargo will be required to purge the `rustc-macro` name as well.
2016-10-01Rollup merge of #34764 - pnkfelix:attrs-on-generic-formals, r=eddybManish Goregaokar-0/+21
First step for #34761
2016-09-28libsyntax: clearer names for some AST partsJonas Schievink-2/+2
This applies the HIR changes from the previous commits to the AST, and is thus a syntax-[breaking-change] Renames `PatKind::Vec` to `PatKind::Slice`, since these are called slice patterns, not vec patterns. Renames `TyKind::Vec`, which represents the type `[T]`, to `TyKind::Slice`. Renames `TyKind::FixedLengthVec` to `TyKind::Array`.
2016-09-26emit feature help in cheat modeTim Neumann-6/+5
2016-09-26make is_nightly_build a method on UnstableFeaturesTim Neumann-0/+7
2016-09-26add unstable_features to ParseSessTim Neumann-0/+18
2016-09-26make emit_feature_err take a ParseSessTim Neumann-11/+13
2016-09-23ICH: Add ability to test the ICH of exported metadata items.Michael Woerister-0/+10
2016-09-23Add attribute support to generic lifetime and type parameters.Felix S. Klock II-0/+21
I am using `ThinAttributes` rather than a vector for attributes attached to generics, since I expect almost all lifetime and types parameters to not carry any attributes.
2016-09-12crate-ify compiler-rt into compiler-builtinsJorge Aparicio-0/+10
libcompiler-rt.a is dead, long live libcompiler-builtins.rlib This commit moves the logic that used to build libcompiler-rt.a into a compiler-builtins crate on top of the core crate and below the std crate. This new crate still compiles the compiler-rt instrinsics using gcc-rs but produces an .rlib instead of a static library. Also, with this commit rustc no longer passes -lcompiler-rt to the linker. This effectively makes the "no-compiler-rt" field of target specifications a no-op. Users of `no_std` will have to explicitly add the compiler-builtins crate to their crate dependency graph *if* they need the compiler-rt intrinsics. Users of the `std` have to do nothing extra as the std crate depends on compiler-builtins. Finally, this a step towards lazy compilation of std with Cargo as the compiler-rt intrinsics can now be built by Cargo instead of having to be supplied by the user by some other method. closes #34400
2016-09-07add static_in_const feature gateAndre Bogus-0/+3
also updates tests and deletes the spurious .bk files I inadvertently added last time.
2016-09-05Rollup merge of #36245 - alexcrichton:add-back-accident, r=arielb1Manish Goregaokar-0/+1
Add back feature accidentally removed This feature was accidentally removed in https://github.com/rust-lang/rust/pull/35957.
2016-09-03Add back feature accidentally removedAlex Crichton-0/+1
This feature was accidentally removed in https://github.com/rust-lang/rust/pull/35957.
2016-09-03Translate union constantsVadim Petrochenkov-1/+1
Fix alignment for packed unions Add some missing privacy test Get rid of `unimplemented_unions` macro
2016-09-03Lower unions from AST to HIR and from HIR to typesVadim Petrochenkov-0/+9
Parse union items and add a feature for them
2016-09-02rustc: Implement custom derive (macros 1.1)Alex Crichton-6/+18
This commit is an implementation of [RFC 1681] which adds support to the compiler for first-class user-define custom `#[derive]` modes with a far more stable API than plugins have today. [RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md The main features added by this commit are: * A new `rustc-macro` crate-type. This crate type represents one which will provide custom `derive` implementations and perhaps eventually flower into the implementation of macros 2.0 as well. * A new `rustc_macro` crate in the standard distribution. This crate will provide the runtime interface between macro crates and the compiler. The API here is particularly conservative right now but has quite a bit of room to expand into any manner of APIs required by macro authors. * The ability to load new derive modes through the `#[macro_use]` annotations on other crates. All support added here is gated behind the `rustc_macro` feature gate, both for the library support (the `rustc_macro` crate) as well as the language features. There are a few minor differences from the implementation outlined in the RFC, such as the `rustc_macro` crate being available as a dylib and all symbols are `dlsym`'d directly instead of having a shim compiled. These should only affect the implementation, however, not the public interface. This commit also ended up touching a lot of code related to `#[derive]`, making a few notable changes: * Recognized derive attributes are no longer desugared to `derive_Foo`. Wasn't sure how to keep this behavior and *not* expose it to custom derive. * Derive attributes no longer have access to unstable features by default, they have to opt in on a granular level. * The `derive(Copy,Clone)` optimization is now done through another "obscure attribute" which is just intended to ferry along in the compiler that such an optimization is possible. The `derive(PartialEq,Eq)` optimization was also updated to do something similar. --- One part of this PR which needs to be improved before stabilizing are the errors and exact interfaces here. The error messages are relatively poor quality and there are surprising spects of this such as `#[derive(PartialEq, Eq, MyTrait)]` not working by default. The custom attributes added by the compiler end up becoming unstable again when going through a custom impl. Hopefully though this is enough to start allowing experimentation on crates.io! syntax-[breaking-change]
2016-09-01Add `item_like_imports` feature.Jeffrey Seyfried-1/+4
2016-08-31Add a tracking issue to the feature gate of the sysv64 ABICensoredUsername-1/+1
2016-08-30Feature gate the sysv64 abi as feature(abi_sysv64) and add testsCensoredUsername-7/+16
2016-08-28Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrcJeffrey Seyfried-1/+1
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28Rollup merge of #35850 - SergioBenitez:master, r=nrcJeffrey Seyfried-13/+38
Implement RFC#1559: allow all literals in attributes Implemented rust-lang/rfcs#1559, tracked by #34981.
2016-08-27Change Constness to Spanned<Constness>Keith Yeung-4/+4
2016-08-26Stabilize type-macrosDaniele Baracchi-3/+2
Closes #27245
2016-08-25Refactor away `AttrMetaMethods`.Jeffrey Seyfried-1/+1
2016-08-25Refactor away `AttrNestedMetaItemMethods`.Jeffrey Seyfried-1/+1
2016-08-25Implement RFC#1559: allow all literals in attributes.Sergio Benitez-13/+38
2016-08-24Remove drop flags from structs and enums implementing Drop.Eduard Burtescu-9/+2
2016-08-24Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit.Eduard Burtescu-5/+0
2016-08-16Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakisbors-1/+18
Implement the `!` type This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-15Auto merge of #35340 - michaelwoerister:incr-comp-cli-args, r=nikomatsakisbors-1/+1
Take commandline arguments into account for incr. comp. Implements the conservative strategy described in https://github.com/rust-lang/rust/issues/33727. From now one, every time a new commandline option is added, one has to specify if it influences the incremental compilation cache. I've tried to implement this as automatic as possible: One just has to added either the `[TRACKED]` or the `[UNTRACKED]` marker next to the field. The `Options`, `CodegenOptions`, and `DebuggingOptions` definitions in `session::config` show plenty of examples. The PR removes some cruft from `session::config::Options`, mostly unnecessary copies of flags also present in `DebuggingOptions` or `CodeGenOptions` in the same struct. One notable removal is the `cfg` field that contained the values passed via `--cfg` commandline arguments. I chose to remove it because (1) its content is only a subset of what later is stored in `hir::Crate::config` and it's pretty likely that reading the cfgs from `Options` would not be what you wanted, and (2) we could not incorporate it into the dep-tracking hash of the `Options` struct because of how the test framework works, leaving us with a piece of untracked but vital data. It is now recommended (just as before) to access the crate config via the `krate()` method in the HIR map. Because the `cfg` field is not present in the `Options` struct any more, some methods in the `CompilerCalls` trait now take the crate config as an explicit parameter -- which might constitute a breaking change for plugin authors.