Add even more docs

This commit is contained in:
Aleksey Kladov 2021-05-22 17:20:22 +03:00
parent 188b0f96f9
commit dc1577d58d
22 changed files with 13 additions and 36 deletions

View File

@ -1,4 +1,4 @@
//! FIXME: write short doc here
//! See [`Name`].
use std::fmt;

View File

@ -1,4 +1,6 @@
//! FIXME: write short doc here
//! Our parser is generic over the source of tokens it parses.
//!
//! This module defines tokens sourced from declarative macros.
use parser::{Token, TokenSource};
use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T};

View File

@ -1,4 +1,4 @@
//! FIXME: write short doc here
//! Conversions between [`SyntaxNode`] and [`tt::TokenTree`].
use parser::{FragmentKind, ParseError, TreeSink};
use rustc_hash::FxHashMap;

View File

@ -1,4 +1,5 @@
//! FIXME: write short doc here
//! A "Parser" structure for token trees. We use this when parsing a declarative
//! macro definition into a list of patterns and templates.
use crate::{subtree_source::SubtreeTokenSource, ExpandError, ExpandResult};

View File

@ -27,6 +27,7 @@
//! node or an error, rules like `opt_where_clause` may produce nothing.
//! Non-opt rules typically start with `assert!(p.at(FIRST_TOKEN))`, the
//! caller is responsible for branching on the first token.
mod attributes;
mod expressions;
mod items;

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) fn inner_attrs(p: &mut Parser) {

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
mod atom;
pub(crate) use self::atom::{block_expr, match_arm_list};

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
// test expr_literals

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
mod consts;
mod adt;
mod traits;

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) fn strukt(p: &mut Parser, m: Marker) {

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) fn static_(p: &mut Parser, m: Marker) {

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
// test trait_item

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) fn use_(p: &mut Parser, m: Marker) {

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
// test param_list

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) const PATH_FIRST: TokenSet =

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) const PATTERN_FIRST: TokenSet =

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) fn opt_generic_arg_list(p: &mut Parser, colon_colon_required: bool) {

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) fn opt_generic_param_list(p: &mut Parser) {

View File

@ -1,5 +1,3 @@
//! FIXME: write short doc here
use super::*;
pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(TokenSet::new(&[

View File

@ -1,4 +1,4 @@
//! FIXME: write short doc here
//! See [`Parser`].
use std::cell::Cell;

View File

@ -1,4 +1,5 @@
//! FIXME: write short doc here
//! Defines [`SyntaxKind`] -- a fieldless enum of all possible syntactic
//! constructs of the Rust language.
#[macro_use]
mod generated;

View File

@ -348,7 +348,7 @@ struct TidyDocs {
impl TidyDocs {
fn visit(&mut self, path: &Path, text: &str) {
// Tests and diagnostic fixes don't need module level comments.
if is_exclude_dir(path, &["tests", "test_data", "fixes"]) {
if is_exclude_dir(path, &["tests", "test_data", "fixes", "grammar"]) {
return;
}
@ -392,7 +392,7 @@ fn finish(self) {
)
}
let poorly_documented = ["hir_expand", "mbe", "parser", "hir_ty"];
let poorly_documented = ["hir_ty"];
let mut has_fixmes =
poorly_documented.iter().map(|it| (*it, false)).collect::<HashMap<&str, bool>>();