Prefer doc comments over //
-comments in compiler
This commit is contained in:
parent
0e9eee6811
commit
1d42936b18
83 changed files with 400 additions and 387 deletions
|
@ -26,9 +26,9 @@ use thin_vec::thin_vec;
|
|||
pub struct MarkedAttrs(GrowableBitSet<AttrId>);
|
||||
|
||||
impl MarkedAttrs {
|
||||
// We have no idea how many attributes there will be, so just
|
||||
// initiate the vectors with 0 bits. We'll grow them as necessary.
|
||||
pub fn new() -> Self {
|
||||
// We have no idea how many attributes there will be, so just
|
||||
// initiate the vectors with 0 bits. We'll grow them as necessary.
|
||||
MarkedAttrs(GrowableBitSet::new_empty())
|
||||
}
|
||||
|
||||
|
@ -174,9 +174,11 @@ impl MetaItem {
|
|||
self.ident().unwrap_or_else(Ident::empty).name
|
||||
}
|
||||
|
||||
// Example:
|
||||
// #[attribute(name = "value")]
|
||||
// ^^^^^^^^^^^^^^
|
||||
/// ```text
|
||||
/// Example:
|
||||
/// #[attribute(name = "value")]
|
||||
/// ^^^^^^^^^^^^^^
|
||||
/// ```
|
||||
pub fn name_value_literal(&self) -> Option<&Lit> {
|
||||
match &self.kind {
|
||||
MetaItemKind::NameValue(v) => Some(v),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue