diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-22 15:20:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-22 15:20:42 +0100 |
commit | a99de65573d59d6398f472b0d42daabe9e8a5410 (patch) | |
tree | ffaa695301e2483e8a3ec360f0dcec79281ab2c1 /crates | |
parent | d56e52402eedbd738b5161cd1e5a8c152cb65e21 (diff) | |
parent | dc1577d58d0339b3d77739e33ae5e527ae6f6589 (diff) |
Merge #8923
8923: Add even more docs r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_expand/src/name.rs | 2 | ||||
-rw-r--r-- | crates/mbe/src/subtree_source.rs | 4 | ||||
-rw-r--r-- | crates/mbe/src/syntax_bridge.rs | 2 | ||||
-rw-r--r-- | crates/mbe/src/tt_iter.rs | 3 | ||||
-rw-r--r-- | crates/parser/src/grammar.rs | 1 | ||||
-rw-r--r-- | crates/parser/src/grammar/attributes.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/expressions.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/expressions/atom.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/items.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/adt.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/consts.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/traits.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/items/use_item.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/params.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/paths.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/patterns.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/type_args.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/type_params.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/grammar/types.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/parser.rs | 2 | ||||
-rw-r--r-- | crates/parser/src/syntax_kind.rs | 3 |
21 files changed, 11 insertions, 34 deletions
diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs index ef67ea2e9..b07fbf8b3 100644 --- a/crates/hir_expand/src/name.rs +++ b/crates/hir_expand/src/name.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! See [`Name`]. |
2 | 2 | ||
3 | use std::fmt; | 3 | use std::fmt; |
4 | 4 | ||
diff --git a/crates/mbe/src/subtree_source.rs b/crates/mbe/src/subtree_source.rs index a05cab0f3..bde370fdb 100644 --- a/crates/mbe/src/subtree_source.rs +++ b/crates/mbe/src/subtree_source.rs | |||
@@ -1,4 +1,6 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! Our parser is generic over the source of tokens it parses. |
2 | //! | ||
3 | //! This module defines tokens sourced from declarative macros. | ||
2 | 4 | ||
3 | use parser::{Token, TokenSource}; | 5 | use parser::{Token, TokenSource}; |
4 | use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; | 6 | use syntax::{lex_single_syntax_kind, SmolStr, SyntaxKind, SyntaxKind::*, T}; |
diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs index a7c8c13c6..b13168bd3 100644 --- a/crates/mbe/src/syntax_bridge.rs +++ b/crates/mbe/src/syntax_bridge.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! Conversions between [`SyntaxNode`] and [`tt::TokenTree`]. |
2 | 2 | ||
3 | use parser::{FragmentKind, ParseError, TreeSink}; | 3 | use parser::{FragmentKind, ParseError, TreeSink}; |
4 | use rustc_hash::FxHashMap; | 4 | use rustc_hash::FxHashMap; |
diff --git a/crates/mbe/src/tt_iter.rs b/crates/mbe/src/tt_iter.rs index 195b8cf30..99a8d250b 100644 --- a/crates/mbe/src/tt_iter.rs +++ b/crates/mbe/src/tt_iter.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! A "Parser" structure for token trees. We use this when parsing a declarative |
2 | //! macro definition into a list of patterns and templates. | ||
2 | 3 | ||
3 | use crate::{subtree_source::SubtreeTokenSource, ExpandError, ExpandResult}; | 4 | use crate::{subtree_source::SubtreeTokenSource, ExpandError, ExpandResult}; |
4 | 5 | ||
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 9bdf0b5fa..790908aea 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs | |||
@@ -27,6 +27,7 @@ | |||
27 | //! node or an error, rules like `opt_where_clause` may produce nothing. | 27 | //! node or an error, rules like `opt_where_clause` may produce nothing. |
28 | //! Non-opt rules typically start with `assert!(p.at(FIRST_TOKEN))`, the | 28 | //! Non-opt rules typically start with `assert!(p.at(FIRST_TOKEN))`, the |
29 | //! caller is responsible for branching on the first token. | 29 | //! caller is responsible for branching on the first token. |
30 | |||
30 | mod attributes; | 31 | mod attributes; |
31 | mod expressions; | 32 | mod expressions; |
32 | mod items; | 33 | mod items; |
diff --git a/crates/parser/src/grammar/attributes.rs b/crates/parser/src/grammar/attributes.rs index 124a10eb2..b8242cd2f 100644 --- a/crates/parser/src/grammar/attributes.rs +++ b/crates/parser/src/grammar/attributes.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) fn inner_attrs(p: &mut Parser) { | 3 | pub(super) fn inner_attrs(p: &mut Parser) { |
diff --git a/crates/parser/src/grammar/expressions.rs b/crates/parser/src/grammar/expressions.rs index 0d9dc9348..9d22e1950 100644 --- a/crates/parser/src/grammar/expressions.rs +++ b/crates/parser/src/grammar/expressions.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | mod atom; | 1 | mod atom; |
4 | 2 | ||
5 | pub(crate) use self::atom::{block_expr, match_arm_list}; | 3 | pub(crate) use self::atom::{block_expr, match_arm_list}; |
diff --git a/crates/parser/src/grammar/expressions/atom.rs b/crates/parser/src/grammar/expressions/atom.rs index 093a9890d..269f223e6 100644 --- a/crates/parser/src/grammar/expressions/atom.rs +++ b/crates/parser/src/grammar/expressions/atom.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | // test expr_literals | 3 | // test expr_literals |
diff --git a/crates/parser/src/grammar/items.rs b/crates/parser/src/grammar/items.rs index adec74ef3..1057ca8c2 100644 --- a/crates/parser/src/grammar/items.rs +++ b/crates/parser/src/grammar/items.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | mod consts; | 1 | mod consts; |
4 | mod adt; | 2 | mod adt; |
5 | mod traits; | 3 | mod traits; |
diff --git a/crates/parser/src/grammar/items/adt.rs b/crates/parser/src/grammar/items/adt.rs index 67c0c5697..386d3806c 100644 --- a/crates/parser/src/grammar/items/adt.rs +++ b/crates/parser/src/grammar/items/adt.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) fn strukt(p: &mut Parser, m: Marker) { | 3 | pub(super) fn strukt(p: &mut Parser, m: Marker) { |
diff --git a/crates/parser/src/grammar/items/consts.rs b/crates/parser/src/grammar/items/consts.rs index 12130df40..ed3bee4a4 100644 --- a/crates/parser/src/grammar/items/consts.rs +++ b/crates/parser/src/grammar/items/consts.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) fn static_(p: &mut Parser, m: Marker) { | 3 | pub(super) fn static_(p: &mut Parser, m: Marker) { |
diff --git a/crates/parser/src/grammar/items/traits.rs b/crates/parser/src/grammar/items/traits.rs index d3327271c..74f11b45a 100644 --- a/crates/parser/src/grammar/items/traits.rs +++ b/crates/parser/src/grammar/items/traits.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | // test trait_item | 3 | // test trait_item |
diff --git a/crates/parser/src/grammar/items/use_item.rs b/crates/parser/src/grammar/items/use_item.rs index 5cb8b08e7..2339d0c69 100644 --- a/crates/parser/src/grammar/items/use_item.rs +++ b/crates/parser/src/grammar/items/use_item.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) fn use_(p: &mut Parser, m: Marker) { | 3 | pub(super) fn use_(p: &mut Parser, m: Marker) { |
diff --git a/crates/parser/src/grammar/params.rs b/crates/parser/src/grammar/params.rs index 9e2f02d43..01ee26a53 100644 --- a/crates/parser/src/grammar/params.rs +++ b/crates/parser/src/grammar/params.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | // test param_list | 3 | // test param_list |
diff --git a/crates/parser/src/grammar/paths.rs b/crates/parser/src/grammar/paths.rs index b10f48fe1..e633646c3 100644 --- a/crates/parser/src/grammar/paths.rs +++ b/crates/parser/src/grammar/paths.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) const PATH_FIRST: TokenSet = | 3 | pub(super) const PATH_FIRST: TokenSet = |
diff --git a/crates/parser/src/grammar/patterns.rs b/crates/parser/src/grammar/patterns.rs index f1d1f9eaa..bd092e0af 100644 --- a/crates/parser/src/grammar/patterns.rs +++ b/crates/parser/src/grammar/patterns.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) const PATTERN_FIRST: TokenSet = | 3 | pub(super) const PATTERN_FIRST: TokenSet = |
diff --git a/crates/parser/src/grammar/type_args.rs b/crates/parser/src/grammar/type_args.rs index be36cad17..ed2322e52 100644 --- a/crates/parser/src/grammar/type_args.rs +++ b/crates/parser/src/grammar/type_args.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) fn opt_generic_arg_list(p: &mut Parser, colon_colon_required: bool) { | 3 | pub(super) fn opt_generic_arg_list(p: &mut Parser, colon_colon_required: bool) { |
diff --git a/crates/parser/src/grammar/type_params.rs b/crates/parser/src/grammar/type_params.rs index b1f979281..49d6fa6d0 100644 --- a/crates/parser/src/grammar/type_params.rs +++ b/crates/parser/src/grammar/type_params.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) fn opt_generic_param_list(p: &mut Parser) { | 3 | pub(super) fn opt_generic_param_list(p: &mut Parser) { |
diff --git a/crates/parser/src/grammar/types.rs b/crates/parser/src/grammar/types.rs index 6ae3e734f..72476c190 100644 --- a/crates/parser/src/grammar/types.rs +++ b/crates/parser/src/grammar/types.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
3 | use super::*; | 1 | use super::*; |
4 | 2 | ||
5 | pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(TokenSet::new(&[ | 3 | pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(TokenSet::new(&[ |
diff --git a/crates/parser/src/parser.rs b/crates/parser/src/parser.rs index 81e26e009..3f87d98a8 100644 --- a/crates/parser/src/parser.rs +++ b/crates/parser/src/parser.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! See [`Parser`]. |
2 | 2 | ||
3 | use std::cell::Cell; | 3 | use std::cell::Cell; |
4 | 4 | ||
diff --git a/crates/parser/src/syntax_kind.rs b/crates/parser/src/syntax_kind.rs index 9ea0e4f9b..4d4377422 100644 --- a/crates/parser/src/syntax_kind.rs +++ b/crates/parser/src/syntax_kind.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! Defines [`SyntaxKind`] -- a fieldless enum of all possible syntactic |
2 | //! constructs of the Rust language. | ||
2 | 3 | ||
3 | #[macro_use] | 4 | #[macro_use] |
4 | mod generated; | 5 | mod generated; |