target_features::Stability: tweak docs of requires_nightly()
* No method named `allow_toggle()` exists on the type, but based on the documentation of both `requires_nightly()` and `toggle_allowed()` it seems that `toggle_allowed()` is the intended method to mention. * Add `()` to the mention of `in_cfg()` to make it clear that a method is being referred to, and to match the presence of `()` in the mention of `toggle_allowed()`.
This commit is contained in:
parent
5c53093374
commit
f289ccf207
1 changed files with 2 additions and 2 deletions
|
|
@ -62,8 +62,8 @@ impl Stability {
|
|||
/// the feature gate to actually be enabled when using a nightly compiler.)
|
||||
///
|
||||
/// Before calling this, ensure the feature is even permitted for this use:
|
||||
/// - for `#[target_feature]`/`-Ctarget-feature`, check `allow_toggle()`
|
||||
/// - for `cfg(target_feature)`, check `in_cfg`
|
||||
/// - for `#[target_feature]`/`-Ctarget-feature`, check `toggle_allowed()`
|
||||
/// - for `cfg(target_feature)`, check `in_cfg()`
|
||||
pub fn requires_nightly(&self) -> Option<Symbol> {
|
||||
match *self {
|
||||
Stability::Unstable(nightly_feature) => Some(nightly_feature),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue