diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-07-23 12:51:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-23 12:51:18 -0400 |
| commit | f11ffd3a6a2b8dfef45e58dc6c6400f135fa6c35 (patch) | |
| tree | 782cc89cde897ec20e97da5b4f857971e7bdf4c5 /src/libcore | |
| parent | b2155dd7477c554259f04fabef178b0b2d00ccd8 (diff) | |
| parent | 7e612c19bee19b41796e8a4f4fe8a41714d7b3c7 (diff) | |
| download | rust-f11ffd3a6a2b8dfef45e58dc6c6400f135fa6c35.tar.gz rust-f11ffd3a6a2b8dfef45e58dc6c6400f135fa6c35.zip | |
Rollup merge of #62869 - matklad:feature-gate, r=Mark-Simulacrum
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. cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20to.20declare.20new.20langauge.20feature.3F I don't know if this is at all reasonable, but at least tests seem to pass locally. That probably means that we can remove/rename to something more resonable the feature in libcore in the next release?
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) |
