Mark Rousskov
8d6d0e71a6
Format librustc_feature
...
Use #[rustfmt::skip] on the tidy-parsed macro invocations
2019-12-24 17:44:51 -05:00
Mazdak Farrokhzad
371446cc50
Remove bindings_after_at
from INCOMPLETE_FEATURES
.
2019-12-23 14:47:20 +01:00
Mazdak Farrokhzad
5f92a56ed6
Introduce #![feature(bindings_after_at)]
.
...
Under the gate, `x @ Some(y)` is allowed.
This is subject to various restrictions for soundness.
2019-12-23 14:47:19 +01:00
bors
fc6b5d6efe
Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obk
...
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-15 01:28:28 +00:00
bors
6f829840f7
Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, 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-14 22:02:59 +00:00
Niko Matsakis
d286113024
Revert "Stabilize the never_type
, written !
."
...
This reverts commit 15c30ddd69
.
2019-12-14 09:01:09 -05:00
ecstatic-morse
0f0bfc9c22
Document Features::enabled
...
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-13 10:48:55 -08:00
Dylan MacKenzie
029725f139
Use correct nightly version for feature
2019-12-13 10:39:15 -08:00
Dylan MacKenzie
80581be2c0
Replace Index
impl with enabled
method
2019-12-13 10:39:15 -08:00
Dylan MacKenzie
2add77dffb
Improve message when active feature indexing panics
2019-12-13 10:39:14 -08:00
Dylan MacKenzie
57959b2bdc
Add feature gate for const_loop
2019-12-13 10:38:29 -08:00
Dylan MacKenzie
8f3021bd2c
Get active features dynamically by their Symbol
2019-12-13 10:38:29 -08:00
Oliver Scherer
d75c7530f3
Reuse the staged_api
feature for rustc_const_unstable
2019-12-13 11:27:01 +01:00
bors
de17464b14
Auto merge of #65881 - anp:implicit-caller-location, r=eddyb,oli-obk
...
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-07 21:14:39 +00:00
Mazdak Farrokhzad
2bd35c065c
Rollup merge of #66606 - christianpoveda:mut-refs-in-const-fn, r=oli-obk
...
Add feature gate for mut refs in const fn
r? @oli-obk
2019-12-06 23:26:54 +01:00
Adam Perry
ebaebd987f
Remove #[track_caller] from incomplete features list.
2019-12-05 21:08:13 -08:00
Mahmut Bulut
f1bacb2dca
Check intrinsics for callability in const fns
2019-12-03 10:20:15 +01:00
Christian Poveda
d24ae2577f
Rename feature gate
2019-12-02 09:03:41 -05:00
Christian Poveda
12ac49afc9
Add feature gate for &mut in const fns
2019-12-02 09:03:39 -05:00
Tomasz Miąsko
c703ff2655
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-01 09:03:35 +01:00
Mazdak Farrokhzad
ded177a06a
derive(Default) for Features
2019-11-30 07:44:50 +01:00
Mazdak Farrokhzad
3d080a4a77
introduce crate rustc_feature and move active, accepted, and removed to it
2019-11-30 00:25:40 +01:00