diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-09 05:31:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-09 05:31:35 +0200 |
| commit | ae5bb7e289b41a9266e6e560d6415caf905ecfeb (patch) | |
| tree | 72b7859146805d664d0489a79907e7bb7a1ed465 /src/libsyntax | |
| parent | 27240fe77b3e69e15a9095874f6b5e65a967e67f (diff) | |
| parent | cca58d1321b6de3098884d4af7bbff57f0f65101 (diff) | |
| download | rust-ae5bb7e289b41a9266e6e560d6415caf905ecfeb.tar.gz rust-ae5bb7e289b41a9266e6e560d6415caf905ecfeb.zip | |
Rollup merge of #65037 - anp:track-caller, r=oli-obk
`#[track_caller]` feature gate (RFC 2091 1/N) RFC text: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md Tracking issue: https://github.com/rust-lang/rust/issues/47809 I started with @ayosec's commit to add the feature gate with tests and rebased it onto current master. I fixed up some tidy lints and added a test.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate/active.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate/builtin_attrs.rs | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate/active.rs b/src/libsyntax/feature_gate/active.rs index 19ef430318d..94f0995566f 100644 --- a/src/libsyntax/feature_gate/active.rs +++ b/src/libsyntax/feature_gate/active.rs @@ -525,6 +525,9 @@ declare_features! ( // Allows the use of raw-dylibs (RFC 2627). (active, raw_dylib, "1.40.0", Some(58713), None), + /// Enable accurate caller location reporting during panic (RFC 2091). + (active, track_caller, "1.40.0", Some(47809), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- @@ -540,4 +543,5 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[ sym::or_patterns, sym::let_chains, sym::raw_dylib, + sym::track_caller, ]; diff --git a/src/libsyntax/feature_gate/builtin_attrs.rs b/src/libsyntax/feature_gate/builtin_attrs.rs index c12d0ce06ff..ae23cc5cb93 100644 --- a/src/libsyntax/feature_gate/builtin_attrs.rs +++ b/src/libsyntax/feature_gate/builtin_attrs.rs @@ -324,6 +324,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ), gated!(ffi_returns_twice, Whitelisted, template!(Word), experimental!(ffi_returns_twice)), + gated!(track_caller, Whitelisted, template!(Word), experimental!(track_caller)), // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: |
