diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-08 14:53:55 +0100 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-02-10 23:42:32 +0000 |
| commit | c3e182cf43aea2c010a1915eb37293a458df2228 (patch) | |
| tree | 225aa2dfceff56d10c0b31f6966fbf7ec5da8180 /src/libsyntax/attr | |
| parent | 0b7af2668a80fb2fa720a06ca44aff4dd1e9de38 (diff) | |
| download | rust-c3e182cf43aea2c010a1915eb37293a458df2228.tar.gz rust-c3e182cf43aea2c010a1915eb37293a458df2228.zip | |
rustc: doc comments
Diffstat (limited to 'src/libsyntax/attr')
| -rw-r--r-- | src/libsyntax/attr/builtin.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs index 6f7761b54fc..520984b8091 100644 --- a/src/libsyntax/attr/builtin.rs +++ b/src/libsyntax/attr/builtin.rs @@ -163,7 +163,7 @@ pub struct RustcDeprecation { pub suggestion: Option<Symbol>, } -/// Check if `attrs` contains an attribute like `#![feature(feature_name)]`. +/// Checks if `attrs` contains an attribute like `#![feature(feature_name)]`. /// This will not perform any "sanity checks" on the form of the attributes. pub fn contains_feature_attr(attrs: &[Attribute], feature_name: &str) -> bool { attrs.iter().any(|item| { @@ -177,7 +177,7 @@ pub fn contains_feature_attr(attrs: &[Attribute], feature_name: &str) -> bool { }) } -/// Find the first stability attribute. `None` if none exists. +/// Finds the first stability attribute. `None` if none exists. pub fn find_stability(sess: &ParseSess, attrs: &[Attribute], item_sp: Span) -> Option<Stability> { find_stability_generic(sess, attrs.iter(), item_sp) @@ -580,7 +580,7 @@ pub struct Deprecation { pub note: Option<Symbol>, } -/// Find the deprecation attribute. `None` if none exists. +/// Finds the deprecation attribute. `None` if none exists. pub fn find_deprecation(sess: &ParseSess, attrs: &[Attribute], item_sp: Span) -> Option<Deprecation> { find_deprecation_generic(sess, attrs.iter(), item_sp) diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 0c3aedae715..a4f5449ec54 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -85,7 +85,7 @@ impl NestedMetaItem { self.span } - /// Returns true if this list item is a MetaItem with a name of `name`. + /// Returns `true` if this list item is a MetaItem with a name of `name`. pub fn check_name(&self, name: &str) -> bool { self.meta_item().map_or(false, |meta_item| meta_item.check_name(name)) } @@ -272,7 +272,7 @@ impl MetaItem { } impl Attribute { - /// Extract the MetaItem from inside this Attribute. + /// Extracts the MetaItem from inside this Attribute. pub fn meta(&self) -> Option<MetaItem> { let mut tokens = self.tokens.trees().peekable(); Some(MetaItem { @@ -328,7 +328,7 @@ impl Attribute { }) } - /// Convert self to a normal #[doc="foo"] comment, if it is a + /// Converts self to a normal #[doc="foo"] comment, if it is a /// comment like `///` or `/** */`. (Returns self unchanged for /// non-sugared doc attributes.) pub fn with_desugared_doc<T, F>(&self, f: F) -> T where |
