about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2019-02-13Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasperMazdak Farrokhzad-1/+1
Rename rustc_errors dependency in rust 2018 crates I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules. Related: rust-lang/cargo#5653 cc #58099 r? @Centril
2019-02-13Rollup merge of #58166 - euclio:deprecation-shorthand, r=petrochenkovMazdak Farrokhzad-3/+9
allow shorthand syntax for deprecation reason Fixes #48271. Created based on discussion in #56896.
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-4/+3
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-13Cleanup importsTaiki Endo-1/+1
2019-02-13Rename rustc_errors dependency in rust 2018 cratesTaiki Endo-1/+1
2019-02-11Consistent attribute argument suggestionOliver Scherer-1/+1
2019-02-11Ease the transition to requiring features by just warning if there's no ↵Oliver Scherer-1/+2
feature list while we could make this change (it's all unstable after all), there are crates.io crates that use the feature and that the compiler depends upon. We can instead roll out this feature while still supporting the old way.
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-11/+13
2019-02-10rustc: doc commentsAlexander Regueiro-4/+3
2019-02-07Add const_generics feature flagvarkor-2/+13
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07Auto merge of #57998 - niklasf:align-enum, r=nagisabors-0/+14
Allow #[repr(align(x))] on enums (#57996) Tracking issue: #57996 Implements an extension of [RFC 1358](https://github.com/rust-lang/rfcs/blob/master/text/1358-repr-align.md) behind a feature flag (`repr_align_enum`). Originally introduced here for structs: #39999. It seems like only HIR-level changes are required, since enums are already aware of their alignment (due to alignment of their limbs). cc @bitshifter
2019-02-07libsyntax => 2018Taiki Endo-13/+15
2019-02-05allow shorthand syntax for deprecation reasonAndy Russell-3/+9
2019-02-02fix stabilization order of uniform_paths.Mazdak Farrokhzad-2/+2
2019-01-30Add MOVBE featureJethro Beekman-0/+1
2019-01-30Allow #[repr(align(x))] on enums (#57996)Niklas Fiekas-0/+14
2019-01-26Rollup merge of #57407 - mehcode:stabilize-extern-crate-self, r=CentrilMazdak Farrokhzad-3/+2
Stabilize extern_crate_self Fixes #56409
2019-01-26Auto merge of #55641 - nagisa:optimize-attr, r=pnkfelixbors-0/+9
Implement optimize(size) and optimize(speed) attributes This PR implements both `optimize(size)` and `optimize(speed)` attributes. While the functionality itself works fine now, this PR is not yet complete: the code might be messy in places and, most importantly, the compiletest must be improved with functionality to run tests with custom optimization levels. Otherwise the new attribute cannot be tested properly. Oh, and not all of the RFC is implemented – attribute propagation is not implemented for example. # TODO * [x] Improve compiletest so that tests can be written; * [x] Assign a proper error number (E9999 currently, no idea how to allocate a number properly); * [ ] Perhaps reduce the duplication in LLVM attribute assignment code…
2019-01-25Resolve breakageSimonas Kazlauskas-1/+1
2019-01-25distinguish "no data" from "heterogeneous" for ABI purposesNiko Matsakis-0/+7
Also, add a testing infrastructure and tests that lets us dump layout.
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-0/+9
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+1
2019-01-16Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakisbors-143/+242
Implement basic input validation for built-in attributes Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax"). For some subset of attributes (found by crater run), errors are lowered to deprecation warnings. NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.
2019-01-14stabilize extern_crate_selfRyan Leckey-3/+2
2019-01-14Rollup merge of #57572 - Centril:unaccept-extern-in-path, r=petrochenkovMazdak Farrokhzad-24/+5
Unaccept `extern_in_paths` Based on completed fcp-close in https://github.com/rust-lang/rust/issues/55600, this removes `extern_in_path` (e.g. `extern::foo::bar`) from the language. The changes are primarily reversing https://github.com/rust-lang/rust/commit/32db83b16e06cb5cca72d0e6a648a8008eda0fac. Closes https://github.com/rust-lang/rust/issues/55600 r? @petrochenkov
2019-01-14Stabilize `cfg_target_vendor`, #29718Jethro Beekman-4/+2
2019-01-13remove extern_in_paths.Mazdak Farrokhzad-24/+5
2019-01-13Address review commentsVadim Petrochenkov-4/+11
2019-01-13Implement basic input validation for built-in attributesVadim Petrochenkov-143/+235
2019-01-13Update the const fn tracking issue to the new metabugvarkor-1/+1
2019-01-12Auto merge of #56759 - petrochenkov:prestabuni, r=nikomatsakisbors-3/+2
Stabilize `uniform_paths` Address all the things described in https://github.com/rust-lang/rust/issues/56417. Assign visibilities to `macro_rules` items - `pub` to `macro_export`-ed macros and `pub(crate)` to non-exported macros, these visibilities determine how far these macros can be reexported with `use`. Prohibit use of reexported inert attributes and "tool modules", after renaming (e.g. `use inline as imported_inline`) their respective tools and even compiler passes won't be able to recognize and properly check them. Also turn use of uniform paths in 2015 macros into an error, I'd prefer to neither remove nor stabilize them right away because I still want to make some experiments in this area (uniform path fallback was added to 2015 macros used on 2018 edition in https://github.com/rust-lang/rust/pull/56053#issuecomment-441405140). UPDATE: The last commit also stabilizes the feature `uniform_paths`. Closes https://github.com/rust-lang/rust/issues/53130 Closes https://github.com/rust-lang/rust/issues/55618 Closes https://github.com/rust-lang/rust/issues/56326 Closes https://github.com/rust-lang/rust/issues/56398 Closes https://github.com/rust-lang/rust/issues/56417 Closes https://github.com/rust-lang/rust/issues/56821 Closes https://github.com/rust-lang/rust/issues/57252 Closes https://github.com/rust-lang/rust/issues/57422
2019-01-12Stabilize `uniform_paths`Vadim Petrochenkov-3/+2
2019-01-12Auto merge of #57542 - Centril:rollup, r=Centrilbors-6/+6
Rollup of 26 pull requests Successful merges: - #56425 (Redo the docs for Vec::set_len) - #56906 (Issue #56905) - #57042 (Don't call `FieldPlacement::count` when count is too large) - #57175 (Stabilize `let` bindings and destructuring in constants and const fn) - #57192 (Change std::error::Error trait documentation to talk about `source` instead of `cause`) - #57296 (Fixed the link to the ? operator) - #57368 (Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache) - #57400 (Rustdoc: update Source Serif Pro and replace Heuristica italic) - #57417 (rustdoc: use text-based doctest parsing if a macro is wrapping main) - #57433 (Add link destination for `read-ownership`) - #57434 (Remove `CrateNum::Invalid`.) - #57441 (Supporting backtrace for x86_64-fortanix-unknown-sgx.) - #57450 (actually take a slice in this example) - #57459 (Reference tracking issue for inherent associated types in diagnostic) - #57463 (docs: Fix some 'second-edition' links) - #57466 (Remove outdated comment) - #57493 (use structured suggestion when casting a reference) - #57498 (make note of one more normalization that Paths do) - #57499 (note that FromStr does not work for borrowed types) - #57505 (Remove submodule step from README) - #57510 (Add a profiles section to the manifest) - #57511 (Fix undefined behavior) - #57519 (Correct RELEASES.md for 1.32.0) - #57522 (don't unwrap unexpected tokens in `format!`) - #57530 (Fixing a typographical error.) - #57535 (Stabilise irrefutable if-let and while-let patterns) Failed merges: r? @ghost
2019-01-12Rollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=CentrilMazdak Farrokhzad-3/+2
Stabilise irrefutable if-let and while-let patterns This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). This replaces https://github.com/rust-lang/rust/pull/55639, as we want to stabilise this in time for the beta cut-off. Closes https://github.com/rust-lang/rust/pull/55639. r? @Centril
2019-01-12move const_let accepted gate to avoid future conflict.Mazdak Farrokhzad-2/+2
2019-01-12Stabilise irrefutable if-let and while-let patternsvarkor-3/+2
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). Co-Authored-By: Sebastian Malton <sebastian@malton.name>
2019-01-11stabilize top level or-pats in if/while let.Mazdak Farrokhzad-9/+2
2019-01-09Clarify const_let commentOliver Scherer-1/+3
2019-01-09Stabilize `let` bindings and destructuring in constants and const fnOliver Scherer-3/+2
2019-01-08remove unwanted stage0 line, fix styledylan_DPC-1/+1
2019-01-08stabilise cfg_attrdylan_DPC-3/+2
2019-01-06tests: Do not use `-Z parse-only`, continue compilation to test recoveryVadim Petrochenkov-1/+0
2019-01-03Implement the re-rebalance coherence rfcGeorg Semmler-0/+3
2018-12-29Auto merge of #56225 - alexreg:type_alias_enum_variants, r=petrochenkovbors-1/+4
Implement RFC 2338, "Type alias enum variants" This PR implements [RFC 2338](https://github.com/rust-lang/rfcs/pull/2338), allowing one to write code like the following. ```rust #![feature(type_alias_enum_variants)] enum Foo { Bar(i32), Baz { i: i32 }, } type Alias = Foo; fn main() { let t = Alias::Bar(0); let t = Alias::Baz { i: 0 }; match t { Alias::Bar(_i) => {} Alias::Baz { i: _i } => {} } } ``` Since `Self` can be considered a type alias in this context, it also enables using `Self::Variant` as both a constructor and pattern. Fixes issues #56199 and #56611. N.B., after discussing the syntax for type arguments on enum variants with @petrochenkov and @eddyb (there are also a few comments on the [tracking issue](https://github.com/rust-lang/rust/issues/49683)), the consensus seems to be treat the syntax as follows, which ought to be backwards-compatible. ```rust Option::<u8>::None; // OK Option::None::<u8>; // OK, but lint in near future (hard error next edition?) Alias::<u8>::None; // OK Alias::None::<u8>; // Error ``` I do not know if this will need an FCP, but let's start one if so.
2018-12-29Rollup merge of #57159 - ids1024:closed-issue, r=Centrilkennytm-1/+1
Update references to closed issue Issue #28979 was closed with a link to #55467.
2018-12-27Update references to closed issueIan Douglas Scott-1/+1
Issue #28979 was closed with a link to #55467.
2018-12-27Do not abort compilation if expansion produces errorsVadim Petrochenkov-10/+9
Fix a number of uncovered deficiencies in diagnostics
2018-12-26Implemented variants on type aliases in both ctor and pattern position.Alexander Regueiro-1/+4
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-23stabilize min_const_unsafe_fn in 1.33.Mazdak Farrokhzad-3/+2