mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-25 19:35:06 +00:00
Add even more docs
This commit is contained in:
parent
188b0f96f9
commit
dc1577d58d
22 changed files with 13 additions and 36 deletions
|
@ -1,4 +1,4 @@
|
||||||
//! FIXME: write short doc here
|
//! See [`Name`].
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
|
|
@ -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 parser::{Token, TokenSource};
|
||||||
use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T};
|
use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! FIXME: write short doc here
|
//! Conversions between [`SyntaxNode`] and [`tt::TokenTree`].
|
||||||
|
|
||||||
use parser::{FragmentKind, ParseError, TreeSink};
|
use parser::{FragmentKind, ParseError, TreeSink};
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
|
@ -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};
|
use crate::{subtree_source::SubtreeTokenSource, ExpandError, ExpandResult};
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
//! node or an error, rules like `opt_where_clause` may produce nothing.
|
//! node or an error, rules like `opt_where_clause` may produce nothing.
|
||||||
//! Non-opt rules typically start with `assert!(p.at(FIRST_TOKEN))`, the
|
//! Non-opt rules typically start with `assert!(p.at(FIRST_TOKEN))`, the
|
||||||
//! caller is responsible for branching on the first token.
|
//! caller is responsible for branching on the first token.
|
||||||
|
|
||||||
mod attributes;
|
mod attributes;
|
||||||
mod expressions;
|
mod expressions;
|
||||||
mod items;
|
mod items;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn inner_attrs(p: &mut Parser) {
|
pub(super) fn inner_attrs(p: &mut Parser) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
mod atom;
|
mod atom;
|
||||||
|
|
||||||
pub(crate) use self::atom::{block_expr, match_arm_list};
|
pub(crate) use self::atom::{block_expr, match_arm_list};
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
// test expr_literals
|
// test expr_literals
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
mod consts;
|
mod consts;
|
||||||
mod adt;
|
mod adt;
|
||||||
mod traits;
|
mod traits;
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn strukt(p: &mut Parser, m: Marker) {
|
pub(super) fn strukt(p: &mut Parser, m: Marker) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn static_(p: &mut Parser, m: Marker) {
|
pub(super) fn static_(p: &mut Parser, m: Marker) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
// test trait_item
|
// test trait_item
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn use_(p: &mut Parser, m: Marker) {
|
pub(super) fn use_(p: &mut Parser, m: Marker) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
// test param_list
|
// test param_list
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) const PATH_FIRST: TokenSet =
|
pub(super) const PATH_FIRST: TokenSet =
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) const PATTERN_FIRST: TokenSet =
|
pub(super) const PATTERN_FIRST: TokenSet =
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn opt_generic_arg_list(p: &mut Parser, colon_colon_required: bool) {
|
pub(super) fn opt_generic_arg_list(p: &mut Parser, colon_colon_required: bool) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn opt_generic_param_list(p: &mut Parser) {
|
pub(super) fn opt_generic_param_list(p: &mut Parser) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//! FIXME: write short doc here
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(TokenSet::new(&[
|
pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(TokenSet::new(&[
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! FIXME: write short doc here
|
//! See [`Parser`].
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
|
|
|
@ -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]
|
#[macro_use]
|
||||||
mod generated;
|
mod generated;
|
||||||
|
|
|
@ -348,7 +348,7 @@ struct TidyDocs {
|
||||||
impl TidyDocs {
|
impl TidyDocs {
|
||||||
fn visit(&mut self, path: &Path, text: &str) {
|
fn visit(&mut self, path: &Path, text: &str) {
|
||||||
// Tests and diagnostic fixes don't need module level comments.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ impl TidyDocs {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
let poorly_documented = ["hir_expand", "mbe", "parser", "hir_ty"];
|
let poorly_documented = ["hir_ty"];
|
||||||
|
|
||||||
let mut has_fixmes =
|
let mut has_fixmes =
|
||||||
poorly_documented.iter().map(|it| (*it, false)).collect::<HashMap<&str, bool>>();
|
poorly_documented.iter().map(|it| (*it, false)).collect::<HashMap<&str, bool>>();
|
||||||
|
|
Loading…
Reference in a new issue