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