diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-07-22 12:09:34 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-07-22 16:32:13 +0300 |
| commit | 27b703dd409c875853394f9c7f8400cd34390088 (patch) | |
| tree | a738280454e046e2123ca9edf22aabe7fa3f1877 /src/libcore | |
| parent | 83dfe7b27cf2debecebedd3b038f9a1c2e05e051 (diff) | |
| download | rust-27b703dd409c875853394f9c7f8400cd34390088.tar.gz rust-27b703dd409c875853394f9c7f8400cd34390088.zip | |
add rustc_private as a proper language feature gate
At the moment, `rustc_private` as a (library) feature exists by accident: `char::is_xid_start`, `char::is_xid_continue` methods in libcore define it.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/char/methods.rs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/libcore/char/methods.rs b/src/libcore/char/methods.rs index e843303380a..99f88591eea 100644 --- a/src/libcore/char/methods.rs +++ b/src/libcore/char/methods.rs @@ -553,10 +553,12 @@ impl char { /// 'XID_Start' is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to `ID_Start` but modified for closure under `NFKx`. - #[unstable(feature = "rustc_private", - reason = "mainly needed for compiler internals", - issue = "27812")] - #[inline] + #[cfg_attr(bootstrap, + unstable(feature = "rustc_private", + reason = "mainly needed for compiler internals", + issue = "27812"))] + #[cfg_attr(not(bootstrap), + unstable(feature = "unicode_internals", issue = "0"))] pub fn is_xid_start(self) -> bool { derived_property::XID_Start(self) } @@ -567,9 +569,12 @@ impl char { /// 'XID_Continue' is a Unicode Derived Property specified in /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to 'ID_Continue' but modified for closure under NFKx. - #[unstable(feature = "rustc_private", - reason = "mainly needed for compiler internals", - issue = "27812")] + #[cfg_attr(bootstrap, + unstable(feature = "rustc_private", + reason = "mainly needed for compiler internals", + issue = "27812"))] + #[cfg_attr(not(bootstrap), + unstable(feature = "unicode_internals", issue = "0"))] #[inline] pub fn is_xid_continue(self) -> bool { derived_property::XID_Continue(self) |
