about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2019-04-28Float 'incomplete_features' out to a const for visibility.Mazdak Farrokhzad-6/+9
2019-04-26Rollup merge of #60289 - tmandry:allow-features-include-std, r=cramertjMazdak Farrokhzad-17/+17
Make `-Z allow-features` work for stdlib features r? @cramertj
2019-04-25Make `-Z allow-features` work for stdlib featuresTyler Mandry-17/+17
2019-04-25Add feature-gate for f16c target featuregnzlbg-0/+1
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-3/+1
This also fully stabilizes two-phase borrows on all editions
2019-04-20Check async in trait methodsvarkor-0/+3
2019-04-20Fix additional variadic typosvarkor-1/+1
2019-04-20Fix typo in variadic C function warningvarkor-1/+1
2019-04-20Feature gate async fn methodsvarkor-19/+13
2019-04-17whitelist rtm x86 cpu featuretyler-0/+1
2019-04-15Preallocate BUILTIN_ATTRIBUTES symbols and use a hash map instead of loopingJohn Kåre Alsaker-392/+492
2019-04-15Make check_name genericJohn Kåre Alsaker-12/+12
2019-04-15Use a proc macro to declare preallocated symbolsJohn Kåre Alsaker-14/+14
2019-04-11Reword tracking issue noteEsteban Küber-2/+5
2019-04-10Tweak unstable diagnostic outputEsteban Küber-23/+41
2019-03-29Whitelist rustc_layout_scalar_valid_range_{start,end} so incr comp does not ↵Felix S. Klock II-0/+14
flag them as unused.
2019-03-29Whitelist `rustc_on_unimplemented` to avoid erroneous flagging as an unused ↵Felix S. Klock II-1/+1
attribute.
2019-03-26Rollup merge of #59150 - estebank:type-ascription, r=varkorMazdak Farrokhzad-2/+6
Expand suggestions for type ascription parse errors Fix #51222. CC #48016, #47666, #54516, #34255.
2019-03-22Hide "type ascription is experimental error" unless it's the only oneEsteban Küber-2/+6
In order to minimize the verbosity of common syntax errors that are parsed as type ascription, hide the feature gate error unless there are no other errors being emitted by the parser.
2019-03-17Make meta-item API compatible with `LocalInternedString::get` soundness fixVadim Petrochenkov-8/+8
2019-03-16Refactor away `NestedMetaItemKind`Vadim Petrochenkov-9/+9
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields
2019-03-16syntax: Do not accidentally treat multi-segment meta-items as single-segmentVadim Petrochenkov-17/+16
2019-03-16Rollup merge of #59169 - tmandry:allow-features-flag, r=cramertjkennytm-1/+10
Add `-Z allow_features=...` flag Adds a compiler option to allow only whitelisted features. For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies. This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
2019-03-15rustc: rename item_path to def_path (except the module in ty).Eduard-Mihai Burtescu-1/+1
2019-03-14Add `-Z allow_features=...` flagTyler Mandry-1/+10
2019-03-09Rollup merge of #58762 - petrochenkov:unwind, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Mention `unwind(aborts)` in diagnostics for `#[unwind]` Simplify input validation for `#[unwind]`, add tests cc https://github.com/rust-lang/rust/issues/58760 r? @Mark-Simulacrum
2019-02-28Auto merge of #57760 - dlrobertson:varargs1, r=alexregbors-0/+12
Support defining C compatible variadic functions ## Summary Add support for defining C compatible variadic functions in unsafe rust with `extern "C"` according to [RFC 2137]. ## Details ### Parsing When parsing a user defined function that is `unsafe` and `extern "C"` allow variadic signatures and inject a "spoofed" `VaList` in the new functions signature. This allows the user to interact with the variadic arguments via a `VaList` instead of manually using `va_start` and `va_end` (See [RFC 2137] for details). ### Codegen When running codegen for a variadic function, remove the "spoofed" `VaList` from the function signature and inject `va_start` when the arg local references are created for the function and `va_end` on return. ## TODO - [x] Get feedback on injecting `va_start/va_end` in MIR vs codegen - [x] Properly inject `va_end` - It seems like it should be possible to inject `va_end` on the `TerminatorKind::Return`. I just need to figure out how to get the `LocalRef` here. - [x] Properly call Rust defined C variadic functions in Rust - The spoofed `VaList` causes problems here. Related to: #44930 r? @ghost [RFC 2137]: https://github.com/rust-lang/rfcs/blob/master/text/2137-variadic.md
2019-02-27Add c_variadic language feature itemDan Robertson-0/+12
2019-02-27Rollup merge of #58761 - Mark-Simulacrum:add-feature-gate-unwind, r=CentrilMazdak Farrokhzad-2/+2
Add tracking issue for the unwind attribute cc https://github.com/rust-lang/rust/issues/58760
2019-02-27Rollup merge of #58678 - doctorn:refuse-async-fn-2015-edition, r=varkorMazdak Farrokhzad-1/+1
Deny `async fn` in 2015 edition This commit prevents code using `async fn` from being compiled in Rust 2015 edition. Compiling code of the form: ```rust async fn foo() {} ``` Will now result in the error: ``` error[E0670]: `async fn` is not permitted in the 2015 edition --> async.rs:1:1 | 1 | async fn foo() {} | ^^^^^ error: aborting due to error For more information about an error, try `rustc --explain E0670`. ``` This resolves #58652 and also resolves #53714. r? @varkor
2019-02-27Mention `unwind(aborts)` in diagnostics for `#[unwind]`Vadim Petrochenkov-1/+1
Simplify input validation for `#[unwind]`, add tests
2019-02-26Add tracking issue for the unwind attribute.Mark Rousskov-2/+2
2019-02-25Stabilize `unrestricted_attribute_tokens`Vadim Petrochenkov-11/+7
2019-02-24Deny `async fn` in 2015 editionNathan Corbyn-1/+1
Fix style issues and update diagnostic messages Update src/librustc_passes/diagnostics.rs Co-Authored-By: doctorn <me@nathancorbyn.com> Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition Deny nested `async fn` in Rust 2015 edition
2019-02-23Correct error messagegnzlbg-1/+1
2019-02-23Implement ffi_returns_twice attributegnzlbg-0/+8
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