summary refs log tree commit diff
path: root/src/librustc_feature
AgeCommit message (Collapse)AuthorLines
2019-12-15Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obkbors-0/+14
Enable `loop` and `while` in constants behind a feature flag This PR is an initial implementation of #52000. It adds a `const_loop` feature gate, which allows `while` and `loop` expressions through both HIR and MIR const-checkers if enabled. `for` expressions remain forbidden by the HIR const-checker, since they desugar to a call to `IntoIterator::into_iter`, which will be rejected anyways. `while` loops also require [`#![feature(const_if_match)]`](https://github.com/rust-lang/rust/pull/66507), since they have a conditional built into them. The diagnostics from the HIR const checker will suggest this to the user. r? @oli-obk cc @rust-lang/wg-const-eval
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-2/+3
r=centril Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-2/+3
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-13Document `Features::enabled`ecstatic-morse-0/+3
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-13Use correct nightly version for featureDylan MacKenzie-1/+1
2019-12-13Replace `Index` impl with `enabled` methodDylan MacKenzie-6/+2
2019-12-13Improve message when active feature indexing panicsDylan MacKenzie-1/+1
2019-12-13Add feature gate for `const_loop`Dylan MacKenzie-0/+3
2019-12-13Get active features dynamically by their `Symbol`Dylan MacKenzie-0/+12
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+2
functions with a `const` modifier
2019-12-13Reuse the `staged_api` feature for `rustc_const_unstable`Oliver Scherer-8/+2
2019-12-07Auto merge of #65881 - anp:implicit-caller-location, r=eddyb,oli-obkbors-1/+0
Implement #[track_caller] attribute. (RFC 2091 4/N) Implements the `#[track_caller]` attribute in both const and codegen contexts. The const implementation walks up the stack to find the nearest untracked callsite. The codegen implementation adds an implicit argument to tracked function calls, and populates it with either a call to the previously-landed intrinsic or if the caller has `#[track_caller]` with a copy of the location passed to the current function. Also includes a little cleanup and a few comments in the other caller location areas. [Depends on: 65664](https://github.com/rust-lang/rust/pull/65664) [RFC 2091 text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) [Tracking issue](https://github.com/rust-lang/rust/issues/47809) [Tracking doc](https://paper.dropbox.com/doc/track_rfc_2091_impl-notes--Anf1NwnIb0xcRv31YLIadyj0Ag-rwCdRc2fi2yvRZ7syGZ9q#:uid=863513134494965680023183&h2=TODO-actually-pass-location-to)
2019-12-06Rollup merge of #66606 - christianpoveda:mut-refs-in-const-fn, r=oli-obkMazdak Farrokhzad-0/+3
Add feature gate for mut refs in const fn r? @oli-obk
2019-12-05Remove #[track_caller] from incomplete features list.Adam Perry-1/+0
2019-12-03Check intrinsics for callability in const fnsMahmut Bulut-4/+0
2019-12-02Rename feature gateChristian Poveda-1/+1
2019-12-02Add feature gate for &mut in const fnsChristian Poveda-0/+3
2019-12-02Rollup merge of #66245 - tmiasko:cfg-sanitize, r=oli-obkRalf Jung-0/+4
Conditional compilation for sanitizers Configure sanitize option when compiling with a sanitizer to make it possible to execute different code depending on whether given sanitizer is enabled or not.
2019-12-01rustc_plugin: Remove support for plugin argumentsVadim Petrochenkov-1/+1
2019-12-01Conditional compilation for sanitizersTomasz Miąsko-0/+4
Configure sanitize option when compiling with a sanitizer to make it possible to execute different code depending on whether given sanitizer is enabled or not.
2019-11-30derive(Default) for FeaturesMazdak Farrokhzad-12/+2
2019-11-30move GateIssue to rustc_feature & simplify emit_feature_errMazdak Farrokhzad-2/+32
2019-11-30update rustc_feature crate docsMazdak Farrokhzad-8/+6
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-0/+34
2019-11-30builtin_attrs.rs -> rustc_featureMazdak Farrokhzad-0/+603
2019-11-30move Stability to rustc_featureMazdak Farrokhzad-0/+8
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-0/+1008