diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-30 11:46:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-30 11:46:13 +0100 |
commit | ebfba461123928363da55e75195d76314c51fa7e (patch) | |
tree | a1eecf37856e82e6a858de330ffdec9e1a0327f5 /crates | |
parent | 733f1d8b709788225bd06f8c0aee1819db92620b (diff) | |
parent | a47bca636cec350cf29c296dafd0c1bec51cd654 (diff) |
Merge #1937
1937: Added test for check doc strings in directory crates/ r=andreevlex a=andreevlex
#1856
Co-authored-by: Alexander Andreev <[email protected]>
Diffstat (limited to 'crates')
170 files changed, 413 insertions, 29 deletions
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs index 5f564be0b..189cad7d0 100644 --- a/crates/ra_assists/src/assist_ctx.rs +++ b/crates/ra_assists/src/assist_ctx.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_db::FileRange; | 4 | use ra_db::FileRange; |
3 | use ra_fmt::{leading_indent, reindent}; | 5 | use ra_fmt::{leading_indent, reindent}; |
diff --git a/crates/ra_assists/src/assists/add_derive.rs b/crates/ra_assists/src/assists/add_derive.rs index 8f2c6266e..77ecc33c9 100644 --- a/crates/ra_assists/src/assists/add_derive.rs +++ b/crates/ra_assists/src/assists/add_derive.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{self, AstNode, AttrsOwner}, | 5 | ast::{self, AstNode, AttrsOwner}, |
diff --git a/crates/ra_assists/src/assists/add_explicit_type.rs b/crates/ra_assists/src/assists/add_explicit_type.rs index 78f0f7f28..8c83dc987 100644 --- a/crates/ra_assists/src/assists/add_explicit_type.rs +++ b/crates/ra_assists/src/assists/add_explicit_type.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{db::HirDatabase, HirDisplay, Ty}; | 3 | use hir::{db::HirDatabase, HirDisplay, Ty}; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{self, AstNode, LetStmt, NameOwner}, | 5 | ast::{self, AstNode, LetStmt, NameOwner}, |
diff --git a/crates/ra_assists/src/assists/add_impl.rs b/crates/ra_assists/src/assists/add_impl.rs index 4b61f4031..94801fbc9 100644 --- a/crates/ra_assists/src/assists/add_impl.rs +++ b/crates/ra_assists/src/assists/add_impl.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use format_buf::format; | 3 | use format_buf::format; |
2 | use hir::db::HirDatabase; | 4 | use hir::db::HirDatabase; |
3 | use join_to_string::join; | 5 | use join_to_string::join; |
diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs index 6fd1c3753..565b96fb5 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{db::HirDatabase, HasSource}; | 3 | use hir::{db::HirDatabase, HasSource}; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{self, edit, make, AstNode, NameOwner}, | 5 | ast::{self, edit, make, AstNode, NameOwner}, |
diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs index 419e93330..02c58e7c6 100644 --- a/crates/ra_assists/src/assists/auto_import.rs +++ b/crates/ra_assists/src/assists/auto_import.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{self, db::HirDatabase}; | 3 | use hir::{self, db::HirDatabase}; |
2 | use ra_text_edit::TextEditBuilder; | 4 | use ra_text_edit::TextEditBuilder; |
3 | 5 | ||
diff --git a/crates/ra_assists/src/assists/change_visibility.rs b/crates/ra_assists/src/assists/change_visibility.rs index 60c74debc..df92c6b67 100644 --- a/crates/ra_assists/src/assists/change_visibility.rs +++ b/crates/ra_assists/src/assists/change_visibility.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{self, NameOwner, VisibilityOwner}, | 5 | ast::{self, NameOwner, VisibilityOwner}, |
diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs index db82db89a..7335cce09 100644 --- a/crates/ra_assists/src/assists/fill_match_arms.rs +++ b/crates/ra_assists/src/assists/fill_match_arms.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::iter; | 3 | use std::iter; |
2 | 4 | ||
3 | use hir::{db::HirDatabase, Adt, HasSource}; | 5 | use hir::{db::HirDatabase, Adt, HasSource}; |
diff --git a/crates/ra_assists/src/assists/flip_binexpr.rs b/crates/ra_assists/src/assists/flip_binexpr.rs index b55b36a8e..c51035282 100644 --- a/crates/ra_assists/src/assists/flip_binexpr.rs +++ b/crates/ra_assists/src/assists/flip_binexpr.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::ast::{AstNode, BinExpr, BinOp}; | 4 | use ra_syntax::ast::{AstNode, BinExpr, BinOp}; |
3 | 5 | ||
diff --git a/crates/ra_assists/src/assists/flip_comma.rs b/crates/ra_assists/src/assists/flip_comma.rs index 5ee7561bc..e31cc5e7d 100644 --- a/crates/ra_assists/src/assists/flip_comma.rs +++ b/crates/ra_assists/src/assists/flip_comma.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{algo::non_trivia_sibling, Direction, T}; | 4 | use ra_syntax::{algo::non_trivia_sibling, Direction, T}; |
3 | 5 | ||
diff --git a/crates/ra_assists/src/assists/inline_local_variable.rs b/crates/ra_assists/src/assists/inline_local_variable.rs index eedb29199..9bd64decc 100644 --- a/crates/ra_assists/src/assists/inline_local_variable.rs +++ b/crates/ra_assists/src/assists/inline_local_variable.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{self, AstNode, AstToken}, | 5 | ast::{self, AstNode, AstToken}, |
diff --git a/crates/ra_assists/src/assists/introduce_variable.rs b/crates/ra_assists/src/assists/introduce_variable.rs index 470ffe120..43378c4b0 100644 --- a/crates/ra_assists/src/assists/introduce_variable.rs +++ b/crates/ra_assists/src/assists/introduce_variable.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use format_buf::format; | 3 | use format_buf::format; |
2 | use hir::db::HirDatabase; | 4 | use hir::db::HirDatabase; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_assists/src/assists/merge_match_arms.rs b/crates/ra_assists/src/assists/merge_match_arms.rs index 3b6a99895..17baa98f9 100644 --- a/crates/ra_assists/src/assists/merge_match_arms.rs +++ b/crates/ra_assists/src/assists/merge_match_arms.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{Assist, AssistCtx, AssistId, TextRange, TextUnit}; | 3 | use crate::{Assist, AssistCtx, AssistId, TextRange, TextUnit}; |
2 | use hir::db::HirDatabase; | 4 | use hir::db::HirDatabase; |
3 | use ra_syntax::ast::{AstNode, MatchArm}; | 5 | use ra_syntax::ast::{AstNode, MatchArm}; |
diff --git a/crates/ra_assists/src/assists/move_bounds.rs b/crates/ra_assists/src/assists/move_bounds.rs index 39ff51233..f791d22b0 100644 --- a/crates/ra_assists/src/assists/move_bounds.rs +++ b/crates/ra_assists/src/assists/move_bounds.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{self, edit, make, AstNode, NameOwner, TypeBoundsOwner}, | 5 | ast::{self, edit, make, AstNode, NameOwner, TypeBoundsOwner}, |
diff --git a/crates/ra_assists/src/assists/move_guard.rs b/crates/ra_assists/src/assists/move_guard.rs index 699221e33..51aea6334 100644 --- a/crates/ra_assists/src/assists/move_guard.rs +++ b/crates/ra_assists/src/assists/move_guard.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast, | 5 | ast, |
diff --git a/crates/ra_assists/src/assists/raw_string.rs b/crates/ra_assists/src/assists/raw_string.rs index 965a64c98..388ee7e97 100644 --- a/crates/ra_assists/src/assists/raw_string.rs +++ b/crates/ra_assists/src/assists/raw_string.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::db::HirDatabase; | 3 | use hir::db::HirDatabase; |
2 | use ra_syntax::{ast::AstNode, ast::Literal, TextRange, TextUnit}; | 4 | use ra_syntax::{ast::AstNode, ast::Literal, TextRange, TextUnit}; |
3 | 5 | ||
diff --git a/crates/ra_assists/src/assists/remove_dbg.rs b/crates/ra_assists/src/assists/remove_dbg.rs index 870133fda..1a7e2b305 100644 --- a/crates/ra_assists/src/assists/remove_dbg.rs +++ b/crates/ra_assists/src/assists/remove_dbg.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{Assist, AssistCtx, AssistId}; | 3 | use crate::{Assist, AssistCtx, AssistId}; |
2 | use hir::db::HirDatabase; | 4 | use hir::db::HirDatabase; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_assists/src/assists/replace_if_let_with_match.rs b/crates/ra_assists/src/assists/replace_if_let_with_match.rs index 401835c57..749ff338a 100644 --- a/crates/ra_assists/src/assists/replace_if_let_with_match.rs +++ b/crates/ra_assists/src/assists/replace_if_let_with_match.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use format_buf::format; | 3 | use format_buf::format; |
2 | use hir::db::HirDatabase; | 4 | use hir::db::HirDatabase; |
3 | use ra_fmt::extract_trivial_expression; | 5 | use ra_fmt::extract_trivial_expression; |
diff --git a/crates/ra_assists/src/assists/split_import.rs b/crates/ra_assists/src/assists/split_import.rs index 2c1edddb9..19d429daf 100644 --- a/crates/ra_assists/src/assists/split_import.rs +++ b/crates/ra_assists/src/assists/split_import.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::iter::successors; | 3 | use std::iter::successors; |
2 | 4 | ||
3 | use hir::db::HirDatabase; | 5 | use hir::db::HirDatabase; |
diff --git a/crates/ra_assists/src/marks.rs b/crates/ra_assists/src/marks.rs index a29f9f658..c20e4db9e 100644 --- a/crates/ra_assists/src/marks.rs +++ b/crates/ra_assists/src/marks.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! See test_utils/src/marks.rs | ||
2 | |||
1 | test_utils::marks!( | 3 | test_utils::marks!( |
2 | introduce_var_in_comment_is_not_applicable | 4 | introduce_var_in_comment_is_not_applicable |
3 | test_introduce_var_expr_stmt | 5 | test_introduce_var_expr_stmt |
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index ffc9e16bb..939f72037 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{collections::HashSet, error::Error, path::Path}; | 3 | use std::{collections::HashSet, error::Error, path::Path}; |
2 | 4 | ||
3 | use rustc_hash::FxHashMap; | 5 | use rustc_hash::FxHashMap; |
diff --git a/crates/ra_cli/src/analysis_bench.rs b/crates/ra_cli/src/analysis_bench.rs index 01b96ec58..727f1e62b 100644 --- a/crates/ra_cli/src/analysis_bench.rs +++ b/crates/ra_cli/src/analysis_bench.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ | 3 | use std::{ |
2 | path::{Path, PathBuf}, | 4 | path::{Path, PathBuf}, |
3 | sync::Arc, | 5 | sync::Arc, |
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs index 6b1e44a2c..a8a110bd9 100644 --- a/crates/ra_cli/src/analysis_stats.rs +++ b/crates/ra_cli/src/analysis_stats.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{collections::HashSet, fmt::Write, path::Path, time::Instant}; | 3 | use std::{collections::HashSet, fmt::Write, path::Path, time::Instant}; |
2 | 4 | ||
3 | use ra_db::SourceDatabase; | 5 | use ra_db::SourceDatabase; |
diff --git a/crates/ra_cli/src/help.rs b/crates/ra_cli/src/help.rs index 2a74b8733..d3c4c7d0b 100644 --- a/crates/ra_cli/src/help.rs +++ b/crates/ra_cli/src/help.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | pub const GLOBAL_HELP: &str = "ra-cli | 3 | pub const GLOBAL_HELP: &str = "ra-cli |
2 | 4 | ||
3 | USAGE: | 5 | USAGE: |
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 8b91ba3e9..e6c76087e 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod analysis_stats; | 3 | mod analysis_stats; |
2 | mod analysis_bench; | 4 | mod analysis_bench; |
3 | mod help; | 5 | mod help; |
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index a1ace61b6..52f892891 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -1,10 +1,11 @@ | |||
1 | /// This module specifies the input to rust-analyzer. In some sense, this is | 1 | //! This module specifies the input to rust-analyzer. In some sense, this is |
2 | /// **the** most important module, because all other fancy stuff is strictly | 2 | //! **the** most important module, because all other fancy stuff is strictly |
3 | /// derived from this input. | 3 | //! derived from this input. |
4 | /// | 4 | //! |
5 | /// Note that neither this module, nor any other part of the analyzer's core do | 5 | //! Note that neither this module, nor any other part of the analyzer's core do |
6 | /// actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how | 6 | //! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how |
7 | /// actual IO is done and lowered to input. | 7 | //! actual IO is done and lowered to input. |
8 | |||
8 | use relative_path::{RelativePath, RelativePathBuf}; | 9 | use relative_path::{RelativePath, RelativePathBuf}; |
9 | use rustc_hash::FxHashMap; | 10 | use rustc_hash::FxHashMap; |
10 | 11 | ||
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index fd7afcbb6..e3a7e8e3c 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | pub(crate) mod src; | 3 | pub(crate) mod src; |
2 | pub(crate) mod docs; | 4 | pub(crate) mod docs; |
3 | 5 | ||
diff --git a/crates/ra_hir/src/code_model/docs.rs b/crates/ra_hir/src/code_model/docs.rs index 99edc5814..9675e397f 100644 --- a/crates/ra_hir/src/code_model/docs.rs +++ b/crates/ra_hir/src/code_model/docs.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::sync::Arc; | 3 | use std::sync::Arc; |
2 | 4 | ||
3 | use ra_syntax::ast; | 5 | use ra_syntax::ast; |
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs index dc964e156..fdae26906 100644 --- a/crates/ra_hir/src/code_model/src.rs +++ b/crates/ra_hir/src/code_model/src.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_syntax::{ | 3 | use ra_syntax::{ |
2 | ast::{self, AstNode}, | 4 | ast::{self, AstNode}, |
3 | SyntaxNode, | 5 | SyntaxNode, |
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index deed1c62f..73d7d6fb6 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::sync::Arc; | 3 | use std::sync::Arc; |
2 | 4 | ||
3 | use ra_db::{salsa, SourceDatabase}; | 5 | use ra_db::{salsa, SourceDatabase}; |
diff --git a/crates/ra_hir/src/diagnostics.rs b/crates/ra_hir/src/diagnostics.rs index 60da33695..9acdaf8ed 100644 --- a/crates/ra_hir/src/diagnostics.rs +++ b/crates/ra_hir/src/diagnostics.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{any::Any, fmt}; | 3 | use std::{any::Any, fmt}; |
2 | 4 | ||
3 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr, TextRange}; | 5 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr, TextRange}; |
diff --git a/crates/ra_hir/src/either.rs b/crates/ra_hir/src/either.rs index 439e6ec87..83583ef8b 100644 --- a/crates/ra_hir/src/either.rs +++ b/crates/ra_hir/src/either.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | 3 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
2 | pub enum Either<A, B> { | 4 | pub enum Either<A, B> { |
3 | A(A), | 5 | A(A), |
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index b1bec2a68..d238741ba 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | pub(crate) mod lower; | 3 | pub(crate) mod lower; |
2 | pub(crate) mod scope; | 4 | pub(crate) mod scope; |
3 | pub(crate) mod validation; | 5 | pub(crate) mod validation; |
diff --git a/crates/ra_hir/src/expr/lower.rs b/crates/ra_hir/src/expr/lower.rs index 6d6f60506..50ea429ea 100644 --- a/crates/ra_hir/src/expr/lower.rs +++ b/crates/ra_hir/src/expr/lower.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_arena::Arena; | 3 | use ra_arena::Arena; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | ast::{ | 5 | ast::{ |
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index de0983a7e..5496822e7 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::sync::Arc; | 3 | use std::sync::Arc; |
2 | 4 | ||
3 | use ra_arena::{impl_arena_id, Arena, RawId}; | 5 | use ra_arena::{impl_arena_id, Arena, RawId}; |
diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index f06e5ec07..1aa853c3e 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::sync::Arc; | 3 | use std::sync::Arc; |
2 | 4 | ||
3 | use ra_syntax::ast; | 5 | use ra_syntax::ast; |
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs index 7b6d9b240..a012f33f7 100644 --- a/crates/ra_hir/src/from_source.rs +++ b/crates/ra_hir/src/from_source.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::{FileId, FilePosition}; | 3 | use ra_db::{FileId, FilePosition}; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | algo::find_node_at_offset, | 5 | algo::find_node_at_offset, |
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index bcbcd3dd7..a3b65cc79 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ | 3 | use std::{ |
2 | hash::{Hash, Hasher}, | 4 | hash::{Hash, Hasher}, |
3 | sync::Arc, | 5 | sync::Arc, |
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index c66a1c6a6..8cf74ddc7 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use rustc_hash::FxHashMap; | 3 | use rustc_hash::FxHashMap; |
2 | use std::sync::Arc; | 4 | use std::sync::Arc; |
3 | 5 | ||
diff --git a/crates/ra_hir/src/lang_item.rs b/crates/ra_hir/src/lang_item.rs index dbba433fe..6c4e8ffbd 100644 --- a/crates/ra_hir/src/lang_item.rs +++ b/crates/ra_hir/src/lang_item.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use rustc_hash::FxHashMap; | 3 | use rustc_hash::FxHashMap; |
2 | use std::sync::Arc; | 4 | use std::sync::Arc; |
3 | 5 | ||
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index a9de9fb6b..00031deba 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -1,5 +1,3 @@ | |||
1 | #![recursion_limit = "512"] | ||
2 | |||
3 | //! HIR (previously known as descriptors) provides a high-level object oriented | 1 | //! HIR (previously known as descriptors) provides a high-level object oriented |
4 | //! access to Rust code. | 2 | //! access to Rust code. |
5 | //! | 3 | //! |
@@ -7,6 +5,8 @@ | |||
7 | //! to a particular crate instance. That is, it has cfg flags and features | 5 | //! to a particular crate instance. That is, it has cfg flags and features |
8 | //! applied. So, the relation between syntax and HIR is many-to-one. | 6 | //! applied. So, the relation between syntax and HIR is many-to-one. |
9 | 7 | ||
8 | #![recursion_limit = "512"] | ||
9 | |||
10 | macro_rules! impl_froms { | 10 | macro_rules! impl_froms { |
11 | ($e:ident: $($v:ident $(($($sv:ident),*))?),*) => { | 11 | ($e:ident: $($v:ident $(($($sv:ident),*))?),*) => { |
12 | $( | 12 | $( |
diff --git a/crates/ra_hir/src/marks.rs b/crates/ra_hir/src/marks.rs index 0fed46802..79af24b20 100644 --- a/crates/ra_hir/src/marks.rs +++ b/crates/ra_hir/src/marks.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! See test_utils/src/marks.rs | ||
2 | |||
1 | test_utils::marks!( | 3 | test_utils::marks!( |
2 | bogus_paths | 4 | bogus_paths |
3 | name_res_works_for_broken_modules | 5 | name_res_works_for_broken_modules |
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs index cb405091e..50feb98fb 100644 --- a/crates/ra_hir/src/mock.rs +++ b/crates/ra_hir/src/mock.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{panic, sync::Arc}; | 3 | use std::{panic, sync::Arc}; |
2 | 4 | ||
3 | use parking_lot::Mutex; | 5 | use parking_lot::Mutex; |
diff --git a/crates/ra_hir/src/name.rs b/crates/ra_hir/src/name.rs index d50867f5d..1e0b8c350 100644 --- a/crates/ra_hir/src/name.rs +++ b/crates/ra_hir/src/name.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt; | 3 | use std::fmt; |
2 | 4 | ||
3 | use ra_syntax::{ast, SmolStr}; | 5 | use ra_syntax::{ast, SmolStr}; |
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 65929c522..a568fdabd 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::FileId; | 3 | use ra_db::FileId; |
2 | use ra_syntax::{ast, SmolStr}; | 4 | use ra_syntax::{ast, SmolStr}; |
3 | use rustc_hash::FxHashMap; | 5 | use rustc_hash::FxHashMap; |
diff --git a/crates/ra_hir/src/nameres/per_ns.rs b/crates/ra_hir/src/nameres/per_ns.rs index 964da2794..0da6789de 100644 --- a/crates/ra_hir/src/nameres/per_ns.rs +++ b/crates/ra_hir/src/nameres/per_ns.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{MacroDef, ModuleDef}; | 3 | use crate::{MacroDef, ModuleDef}; |
2 | 4 | ||
3 | #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] | 5 | #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] |
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index 0e27dd2db..606bd1a95 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ops::Index, sync::Arc}; | 3 | use std::{ops::Index, sync::Arc}; |
2 | 4 | ||
3 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; | 5 | use ra_arena::{impl_arena_id, map::ArenaMap, Arena, RawId}; |
diff --git a/crates/ra_hir/src/path.rs b/crates/ra_hir/src/path.rs index 158c853d4..394617e1a 100644 --- a/crates/ra_hir/src/path.rs +++ b/crates/ra_hir/src/path.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{iter, sync::Arc}; | 3 | use std::{iter, sync::Arc}; |
2 | 4 | ||
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 6e89bfc76..088335e66 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -1,10 +1,10 @@ | |||
1 | /// Lookup hir elements using positions in the source code. This is a lossy | 1 | //! Lookup hir elements using positions in the source code. This is a lossy |
2 | /// transformation: in general, a single source might correspond to several | 2 | //! transformation: in general, a single source might correspond to several |
3 | /// modules, functions, etc, due to macros, cfgs and `#[path=]` attributes on | 3 | //! modules, functions, etc, due to macros, cfgs and `#[path=]` attributes on |
4 | /// modules. | 4 | //! modules. |
5 | /// | 5 | //! |
6 | /// So, this modules should not be used during hir construction, it exists | 6 | //! So, this modules should not be used during hir construction, it exists |
7 | /// purely for "IDE needs". | 7 | //! purely for "IDE needs". |
8 | use std::sync::Arc; | 8 | use std::sync::Arc; |
9 | 9 | ||
10 | use ra_db::FileId; | 10 | use ra_db::FileId; |
diff --git a/crates/ra_hir/src/source_id.rs b/crates/ra_hir/src/source_id.rs index 04574876d..a4dd99598 100644 --- a/crates/ra_hir/src/source_id.rs +++ b/crates/ra_hir/src/source_id.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ | 3 | use std::{ |
2 | hash::{Hash, Hasher}, | 4 | hash::{Hash, Hasher}, |
3 | marker::PhantomData, | 5 | marker::PhantomData, |
diff --git a/crates/ra_hir/src/ty/display.rs b/crates/ra_hir/src/ty/display.rs index 63ec9d7e1..7910429d7 100644 --- a/crates/ra_hir/src/ty/display.rs +++ b/crates/ra_hir/src/ty/display.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt; | 3 | use std::fmt; |
2 | 4 | ||
3 | use crate::db::HirDatabase; | 5 | use crate::db::HirDatabase; |
diff --git a/crates/ra_hir/src/ty/op.rs b/crates/ra_hir/src/ty/op.rs index 1b30a5b9b..bcfa3a6a2 100644 --- a/crates/ra_hir/src/ty/op.rs +++ b/crates/ra_hir/src/ty/op.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::{InferTy, Ty, TypeCtor}; | 3 | use super::{InferTy, Ty, TypeCtor}; |
2 | use crate::{ | 4 | use crate::{ |
3 | expr::{BinaryOp, CmpOp}, | 5 | expr::{BinaryOp, CmpOp}, |
diff --git a/crates/ra_hir/src/ty/primitive.rs b/crates/ra_hir/src/ty/primitive.rs index 2c60fefd6..8966f9d1d 100644 --- a/crates/ra_hir/src/ty/primitive.rs +++ b/crates/ra_hir/src/ty/primitive.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt; | 3 | use std::fmt; |
2 | 4 | ||
3 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] | 5 | #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] |
diff --git a/crates/ra_ide_api/src/assists.rs b/crates/ra_ide_api/src/assists.rs index e3d1ac529..e00589733 100644 --- a/crates/ra_ide_api/src/assists.rs +++ b/crates/ra_ide_api/src/assists.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::{FilePosition, FileRange}; | 3 | use ra_db::{FilePosition, FileRange}; |
2 | 4 | ||
3 | use crate::{db::RootDatabase, SourceChange, SourceFileEdit}; | 5 | use crate::{db::RootDatabase, SourceChange, SourceFileEdit}; |
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index d5e116526..7d18be483 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::SourceDatabase; | 3 | use ra_db::SourceDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | algo::find_node_at_offset, | 5 | algo::find_node_at_offset, |
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 981851829..09913787b 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{fmt, sync::Arc, time}; | 3 | use std::{fmt, sync::Arc, time}; |
2 | 4 | ||
3 | use ra_db::{ | 5 | use ra_db::{ |
diff --git a/crates/ra_ide_api/src/completion.rs b/crates/ra_ide_api/src/completion.rs index 0ad414831..abe1f36ce 100644 --- a/crates/ra_ide_api/src/completion.rs +++ b/crates/ra_ide_api/src/completion.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod completion_item; | 3 | mod completion_item; |
2 | mod completion_context; | 4 | mod completion_context; |
3 | mod presentation; | 5 | mod presentation; |
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index 9e64c8659..28c8324d0 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{Adt, Ty, TypeCtor}; | 3 | use hir::{Adt, Ty, TypeCtor}; |
2 | 4 | ||
3 | use crate::completion::completion_item::CompletionKind; | 5 | use crate::completion::completion_item::CompletionKind; |
diff --git a/crates/ra_ide_api/src/completion/complete_fn_param.rs b/crates/ra_ide_api/src/completion/complete_fn_param.rs index 6639b6fff..844a63f6c 100644 --- a/crates/ra_ide_api/src/completion/complete_fn_param.rs +++ b/crates/ra_ide_api/src/completion/complete_fn_param.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_syntax::{ | 3 | use ra_syntax::{ |
2 | algo::visit::{visitor_ctx, VisitorCtx}, | 4 | algo::visit::{visitor_ctx, VisitorCtx}, |
3 | ast, AstNode, | 5 | ast, AstNode, |
diff --git a/crates/ra_ide_api/src/completion/complete_keyword.rs b/crates/ra_ide_api/src/completion/complete_keyword.rs index c527a9f63..3f121d45c 100644 --- a/crates/ra_ide_api/src/completion/complete_keyword.rs +++ b/crates/ra_ide_api/src/completion/complete_keyword.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_syntax::{ | 3 | use ra_syntax::{ |
2 | algo::visit::{visitor, Visitor}, | 4 | algo::visit::{visitor, Visitor}, |
3 | ast::{self, LoopBodyOwner}, | 5 | ast::{self, LoopBodyOwner}, |
diff --git a/crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs b/crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs index 0cbe4abf7..d808b2357 100644 --- a/crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs +++ b/crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::completion::{CompletionContext, Completions}; | 3 | use crate::completion::{CompletionContext, Completions}; |
2 | 4 | ||
3 | pub(super) fn complete_macro_in_item_position(acc: &mut Completions, ctx: &CompletionContext) { | 5 | pub(super) fn complete_macro_in_item_position(acc: &mut Completions, ctx: &CompletionContext) { |
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index e9fec54d8..e01197fe4 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{Adt, Either, PathResolution}; | 3 | use hir::{Adt, Either, PathResolution}; |
2 | use ra_syntax::AstNode; | 4 | use ra_syntax::AstNode; |
3 | use test_utils::tested_by; | 5 | use test_utils::tested_by; |
diff --git a/crates/ra_ide_api/src/completion/complete_pattern.rs b/crates/ra_ide_api/src/completion/complete_pattern.rs index c17b5b7ee..513ad6e5f 100644 --- a/crates/ra_ide_api/src/completion/complete_pattern.rs +++ b/crates/ra_ide_api/src/completion/complete_pattern.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::completion::{CompletionContext, Completions}; | 3 | use crate::completion::{CompletionContext, Completions}; |
2 | 4 | ||
3 | /// Completes constats and paths in patterns. | 5 | /// Completes constats and paths in patterns. |
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide_api/src/completion/complete_postfix.rs index 3970d1af3..445a02676 100644 --- a/crates/ra_ide_api/src/completion/complete_postfix.rs +++ b/crates/ra_ide_api/src/completion/complete_postfix.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{ | 3 | use crate::{ |
2 | completion::{ | 4 | completion::{ |
3 | completion_context::CompletionContext, | 5 | completion_context::CompletionContext, |
diff --git a/crates/ra_ide_api/src/completion/complete_record_literal.rs b/crates/ra_ide_api/src/completion/complete_record_literal.rs index ed4029964..4406695d5 100644 --- a/crates/ra_ide_api/src/completion/complete_record_literal.rs +++ b/crates/ra_ide_api/src/completion/complete_record_literal.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::Substs; | 3 | use hir::Substs; |
2 | 4 | ||
3 | use crate::completion::{CompletionContext, Completions}; | 5 | use crate::completion::{CompletionContext, Completions}; |
diff --git a/crates/ra_ide_api/src/completion/complete_record_pattern.rs b/crates/ra_ide_api/src/completion/complete_record_pattern.rs index 70716b3d6..d20fa796c 100644 --- a/crates/ra_ide_api/src/completion/complete_record_pattern.rs +++ b/crates/ra_ide_api/src/completion/complete_record_pattern.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::Substs; | 3 | use hir::Substs; |
2 | 4 | ||
3 | use crate::completion::{CompletionContext, Completions}; | 5 | use crate::completion::{CompletionContext, Completions}; |
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs index cb70a1f21..515a6285c 100644 --- a/crates/ra_ide_api/src/completion/complete_scope.rs +++ b/crates/ra_ide_api/src/completion/complete_scope.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_assists::auto_import_text_edit; | 3 | use ra_assists::auto_import_text_edit; |
2 | use ra_syntax::{ast, AstNode, SmolStr}; | 4 | use ra_syntax::{ast, AstNode, SmolStr}; |
3 | use ra_text_edit::TextEditBuilder; | 5 | use ra_text_edit::TextEditBuilder; |
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide_api/src/completion/complete_snippet.rs index b06221c2a..2df79b6c3 100644 --- a/crates/ra_ide_api/src/completion/complete_snippet.rs +++ b/crates/ra_ide_api/src/completion/complete_snippet.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::completion::{ | 3 | use crate::completion::{ |
2 | completion_item::Builder, CompletionContext, CompletionItem, CompletionItemKind, | 4 | completion_item::Builder, CompletionContext, CompletionItem, CompletionItemKind, |
3 | CompletionKind, Completions, | 5 | CompletionKind, Completions, |
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide_api/src/completion/completion_context.rs index 57542152f..e9ad06965 100644 --- a/crates/ra_ide_api/src/completion/completion_context.rs +++ b/crates/ra_ide_api/src/completion/completion_context.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_syntax::{ | 3 | use ra_syntax::{ |
2 | algo::{find_covering_element, find_node_at_offset}, | 4 | algo::{find_covering_element, find_node_at_offset}, |
3 | ast, AstNode, Parse, SourceFile, | 5 | ast, AstNode, Parse, SourceFile, |
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs index d787bb69e..b1f0390ec 100644 --- a/crates/ra_ide_api/src/completion/completion_item.rs +++ b/crates/ra_ide_api/src/completion/completion_item.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt; | 3 | use std::fmt; |
2 | 4 | ||
3 | use hir::Documentation; | 5 | use hir::Documentation; |
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index b8aa433c1..48028a2f9 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | //! This modules takes care of rendering various definitions as completion items. | 1 | //! This modules takes care of rendering various definitions as completion items. |
2 | |||
2 | use hir::{Docs, HasSource, HirDisplay, ScopeDef, Ty, TypeWalk}; | 3 | use hir::{Docs, HasSource, HirDisplay, ScopeDef, Ty, TypeWalk}; |
3 | use join_to_string::join; | 4 | use join_to_string::join; |
4 | use ra_syntax::ast::NameOwner; | 5 | use ra_syntax::ast::NameOwner; |
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs index afd9022ce..ea0714add 100644 --- a/crates/ra_ide_api/src/db.rs +++ b/crates/ra_ide_api/src/db.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::sync::Arc; | 3 | use std::sync::Arc; |
2 | 4 | ||
3 | use ra_db::{ | 5 | use ra_db::{ |
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 4fa07e3dc..0435188c8 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::cell::RefCell; | 3 | use std::cell::RefCell; |
2 | 4 | ||
3 | use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink}; | 5 | use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink}; |
diff --git a/crates/ra_ide_api/src/display/function_signature.rs b/crates/ra_ide_api/src/display/function_signature.rs index 644a4532b..43f022ccd 100644 --- a/crates/ra_ide_api/src/display/function_signature.rs +++ b/crates/ra_ide_api/src/display/function_signature.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt::{self, Display}; | 3 | use std::fmt::{self, Display}; |
2 | 4 | ||
3 | use hir::{Docs, Documentation, HasSource}; | 5 | use hir::{Docs, Documentation, HasSource}; |
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide_api/src/display/navigation_target.rs index d3e774bd0..60ae802c0 100644 --- a/crates/ra_ide_api/src/display/navigation_target.rs +++ b/crates/ra_ide_api/src/display/navigation_target.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{AssocItem, FieldSource, HasSource, ModuleSource}; | 3 | use hir::{AssocItem, FieldSource, HasSource, ModuleSource}; |
2 | use ra_db::{FileId, SourceDatabase}; | 4 | use ra_db::{FileId, SourceDatabase}; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/display/short_label.rs b/crates/ra_ide_api/src/display/short_label.rs index b16d504e1..5d2bce3d2 100644 --- a/crates/ra_ide_api/src/display/short_label.rs +++ b/crates/ra_ide_api/src/display/short_label.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use format_buf::format; | 3 | use format_buf::format; |
2 | use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; | 4 | use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner}; |
3 | 5 | ||
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide_api/src/display/structure.rs index 38a56d752..8815df747 100644 --- a/crates/ra_ide_api/src/display/structure.rs +++ b/crates/ra_ide_api/src/display/structure.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::TextRange; | 3 | use crate::TextRange; |
2 | 4 | ||
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide_api/src/extend_selection.rs index e990eb0d1..33fefb541 100644 --- a/crates/ra_ide_api/src/extend_selection.rs +++ b/crates/ra_ide_api/src/extend_selection.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::SourceDatabase; | 3 | use ra_db::SourceDatabase; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | algo::find_covering_element, | 5 | algo::find_covering_element, |
diff --git a/crates/ra_ide_api/src/feature_flags.rs b/crates/ra_ide_api/src/feature_flags.rs index 9f82ac71c..d3ca7be03 100644 --- a/crates/ra_ide_api/src/feature_flags.rs +++ b/crates/ra_ide_api/src/feature_flags.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use rustc_hash::FxHashMap; | 3 | use rustc_hash::FxHashMap; |
2 | 4 | ||
3 | /// Feature flags hold fine-grained toggles for all *user-visible* features of | 5 | /// Feature flags hold fine-grained toggles for all *user-visible* features of |
diff --git a/crates/ra_ide_api/src/folding_ranges.rs b/crates/ra_ide_api/src/folding_ranges.rs index 79fadcc5d..4eeb76d14 100644 --- a/crates/ra_ide_api/src/folding_ranges.rs +++ b/crates/ra_ide_api/src/folding_ranges.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use rustc_hash::FxHashSet; | 3 | use rustc_hash::FxHashSet; |
2 | 4 | ||
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index bc8863dad..567d4a674 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::{FileId, SourceDatabase}; | 3 | use ra_db::{FileId, SourceDatabase}; |
2 | use ra_syntax::{ | 4 | use ra_syntax::{ |
3 | algo::{ | 5 | algo::{ |
diff --git a/crates/ra_ide_api/src/goto_type_definition.rs b/crates/ra_ide_api/src/goto_type_definition.rs index 72884e5ca..059d80524 100644 --- a/crates/ra_ide_api/src/goto_type_definition.rs +++ b/crates/ra_ide_api/src/goto_type_definition.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::SourceDatabase; | 3 | use ra_db::SourceDatabase; |
2 | use ra_syntax::{ast, AstNode}; | 4 | use ra_syntax::{ast, AstNode}; |
3 | 5 | ||
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index 655bcdb16..200b57679 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{Adt, HasSource, HirDisplay}; | 3 | use hir::{Adt, HasSource, HirDisplay}; |
2 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/impls.rs b/crates/ra_ide_api/src/impls.rs index f57f9a21b..7fc1b1efa 100644 --- a/crates/ra_ide_api/src/impls.rs +++ b/crates/ra_ide_api/src/impls.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{db::HirDatabase, ApplicationTy, FromSource, Ty, TypeCtor}; | 3 | use hir::{db::HirDatabase, ApplicationTy, FromSource, Ty, TypeCtor}; |
2 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
3 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode}; | 5 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode}; |
diff --git a/crates/ra_ide_api/src/inlay_hints.rs b/crates/ra_ide_api/src/inlay_hints.rs index 16bdcf9d1..9b45575f8 100644 --- a/crates/ra_ide_api/src/inlay_hints.rs +++ b/crates/ra_ide_api/src/inlay_hints.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{db::RootDatabase, FileId}; | 3 | use crate::{db::RootDatabase, FileId}; |
2 | use hir::{HirDisplay, SourceAnalyzer, Ty}; | 4 | use hir::{HirDisplay, SourceAnalyzer, Ty}; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/join_lines.rs b/crates/ra_ide_api/src/join_lines.rs index a71e4ed7d..6f71b27db 100644 --- a/crates/ra_ide_api/src/join_lines.rs +++ b/crates/ra_ide_api/src/join_lines.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use itertools::Itertools; | 3 | use itertools::Itertools; |
2 | use ra_fmt::{compute_ws, extract_trivial_expression}; | 4 | use ra_fmt::{compute_ws, extract_trivial_expression}; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/line_index.rs b/crates/ra_ide_api/src/line_index.rs index 5fedad696..710890d27 100644 --- a/crates/ra_ide_api/src/line_index.rs +++ b/crates/ra_ide_api/src/line_index.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::TextUnit; | 3 | use crate::TextUnit; |
2 | use rustc_hash::FxHashMap; | 4 | use rustc_hash::FxHashMap; |
3 | use superslice::Ext; | 5 | use superslice::Ext; |
diff --git a/crates/ra_ide_api/src/line_index_utils.rs b/crates/ra_ide_api/src/line_index_utils.rs index 534009b98..bd1e08feb 100644 --- a/crates/ra_ide_api/src/line_index_utils.rs +++ b/crates/ra_ide_api/src/line_index_utils.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{line_index::Utf16Char, LineCol, LineIndex}; | 3 | use crate::{line_index::Utf16Char, LineCol, LineIndex}; |
2 | use ra_syntax::{TextRange, TextUnit}; | 4 | use ra_syntax::{TextRange, TextUnit}; |
3 | use ra_text_edit::{AtomTextEdit, TextEdit}; | 5 | use ra_text_edit::{AtomTextEdit, TextEdit}; |
diff --git a/crates/ra_ide_api/src/marks.rs b/crates/ra_ide_api/src/marks.rs index c3752cc54..3f4ba248b 100644 --- a/crates/ra_ide_api/src/marks.rs +++ b/crates/ra_ide_api/src/marks.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! See test_utils/src/marks.rs | ||
2 | |||
1 | test_utils::marks!( | 3 | test_utils::marks!( |
2 | inserts_parens_for_function_calls | 4 | inserts_parens_for_function_calls |
3 | goto_definition_works_for_macros | 5 | goto_definition_works_for_macros |
diff --git a/crates/ra_ide_api/src/matching_brace.rs b/crates/ra_ide_api/src/matching_brace.rs index e802d01e4..d1204fac0 100644 --- a/crates/ra_ide_api/src/matching_brace.rs +++ b/crates/ra_ide_api/src/matching_brace.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_syntax::{ast::AstNode, SourceFile, SyntaxKind, TextUnit, T}; | 3 | use ra_syntax::{ast::AstNode, SourceFile, SyntaxKind, TextUnit, T}; |
2 | 4 | ||
3 | pub fn matching_brace(file: &SourceFile, offset: TextUnit) -> Option<TextUnit> { | 5 | pub fn matching_brace(file: &SourceFile, offset: TextUnit) -> Option<TextUnit> { |
diff --git a/crates/ra_ide_api/src/mock_analysis.rs b/crates/ra_ide_api/src/mock_analysis.rs index 132f6f875..16870c7ae 100644 --- a/crates/ra_ide_api/src/mock_analysis.rs +++ b/crates/ra_ide_api/src/mock_analysis.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::sync::Arc; | 3 | use std::sync::Arc; |
2 | 4 | ||
3 | use relative_path::RelativePathBuf; | 5 | use relative_path::RelativePathBuf; |
diff --git a/crates/ra_ide_api/src/name_ref_kind.rs b/crates/ra_ide_api/src/name_ref_kind.rs index aff03464a..149585971 100644 --- a/crates/ra_ide_api/src/name_ref_kind.rs +++ b/crates/ra_ide_api/src/name_ref_kind.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::Either; | 3 | use hir::Either; |
2 | use ra_syntax::{ast, AstNode, AstPtr}; | 4 | use ra_syntax::{ast, AstNode, AstPtr}; |
3 | use test_utils::tested_by; | 5 | use test_utils::tested_by; |
diff --git a/crates/ra_ide_api/src/parent_module.rs b/crates/ra_ide_api/src/parent_module.rs index 3668da8d7..c85f1d0d0 100644 --- a/crates/ra_ide_api/src/parent_module.rs +++ b/crates/ra_ide_api/src/parent_module.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::{CrateId, FileId, FilePosition}; | 3 | use ra_db::{CrateId, FileId, FilePosition}; |
2 | 4 | ||
3 | use crate::{db::RootDatabase, NavigationTarget}; | 5 | use crate::{db::RootDatabase, NavigationTarget}; |
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide_api/src/references.rs index acca71f2a..84c2eb793 100644 --- a/crates/ra_ide_api/src/references.rs +++ b/crates/ra_ide_api/src/references.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use hir::{Either, ModuleSource}; | 3 | use hir::{Either, ModuleSource}; |
2 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
3 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode}; | 5 | use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SourceFile, SyntaxNode}; |
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs index 8cf58fe79..910883da7 100644 --- a/crates/ra_ide_api/src/runnables.rs +++ b/crates/ra_ide_api/src/runnables.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use itertools::Itertools; | 3 | use itertools::Itertools; |
2 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/status.rs b/crates/ra_ide_api/src/status.rs index dee2ea46a..f91f16c8e 100644 --- a/crates/ra_ide_api/src/status.rs +++ b/crates/ra_ide_api/src/status.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{fmt, iter::FromIterator, sync::Arc}; | 3 | use std::{fmt, iter::FromIterator, sync::Arc}; |
2 | 4 | ||
3 | use hir::MacroFile; | 5 | use hir::MacroFile; |
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index 3d7f91c1d..9ae2dc061 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use rustc_hash::{FxHashMap, FxHashSet}; | 3 | use rustc_hash::{FxHashMap, FxHashSet}; |
2 | 4 | ||
3 | use hir::{Mutability, Ty}; | 5 | use hir::{Mutability, Ty}; |
diff --git a/crates/ra_ide_api/src/syntax_tree.rs b/crates/ra_ide_api/src/syntax_tree.rs index e2bb120b4..4d0f0fc47 100644 --- a/crates/ra_ide_api/src/syntax_tree.rs +++ b/crates/ra_ide_api/src/syntax_tree.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::db::RootDatabase; | 3 | use crate::db::RootDatabase; |
2 | use ra_db::SourceDatabase; | 4 | use ra_db::SourceDatabase; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/test_utils.rs b/crates/ra_ide_api/src/test_utils.rs index 6e0d883b4..8adb214d4 100644 --- a/crates/ra_ide_api/src/test_utils.rs +++ b/crates/ra_ide_api/src/test_utils.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_syntax::{SourceFile, TextUnit}; | 3 | use ra_syntax::{SourceFile, TextUnit}; |
2 | use ra_text_edit::TextEdit; | 4 | use ra_text_edit::TextEdit; |
3 | 5 | ||
diff --git a/crates/ra_ide_api/src/typing.rs b/crates/ra_ide_api/src/typing.rs index 2d4491442..2f5782012 100644 --- a/crates/ra_ide_api/src/typing.rs +++ b/crates/ra_ide_api/src/typing.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_db::{FilePosition, SourceDatabase}; | 3 | use ra_db::{FilePosition, SourceDatabase}; |
2 | use ra_fmt::leading_indent; | 4 | use ra_fmt::leading_indent; |
3 | use ra_syntax::{ | 5 | use ra_syntax::{ |
diff --git a/crates/ra_ide_api/src/wasm_shims.rs b/crates/ra_ide_api/src/wasm_shims.rs index 592dddf44..088cc9be4 100644 --- a/crates/ra_ide_api/src/wasm_shims.rs +++ b/crates/ra_ide_api/src/wasm_shims.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #[cfg(not(feature = "wasm"))] | 3 | #[cfg(not(feature = "wasm"))] |
2 | pub use std::time::Instant; | 4 | pub use std::time::Instant; |
3 | 5 | ||
diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index 22fc97a97..30bcbd7a8 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use lsp_types::{ | 3 | use lsp_types::{ |
2 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, | 4 | CodeActionProviderCapability, CodeLensOptions, CompletionOptions, |
3 | DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, | 5 | DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, |
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs index a083bb311..d996b53de 100644 --- a/crates/ra_lsp_server/src/cargo_target_spec.rs +++ b/crates/ra_lsp_server/src/cargo_target_spec.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_ide_api::{FileId, RunnableKind}; | 3 | use ra_ide_api::{FileId, RunnableKind}; |
2 | use ra_project_model::{self, ProjectWorkspace, TargetKind}; | 4 | use ra_project_model::{self, ProjectWorkspace, TargetKind}; |
3 | 5 | ||
diff --git a/crates/ra_lsp_server/src/config.rs b/crates/ra_lsp_server/src/config.rs index cf53e7c4c..579d4c692 100644 --- a/crates/ra_lsp_server/src/config.rs +++ b/crates/ra_lsp_server/src/config.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use rustc_hash::FxHashMap; | 3 | use rustc_hash::FxHashMap; |
2 | 4 | ||
3 | use serde::{Deserialize, Deserializer}; | 5 | use serde::{Deserialize, Deserializer}; |
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index d78f77925..1318a1738 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use lsp_types::{ | 3 | use lsp_types::{ |
2 | self, CreateFile, DiagnosticSeverity, DocumentChangeOperation, DocumentChanges, Documentation, | 4 | self, CreateFile, DiagnosticSeverity, DocumentChangeOperation, DocumentChanges, Documentation, |
3 | Location, LocationLink, MarkupContent, MarkupKind, Position, Range, RenameFile, ResourceOp, | 5 | Location, LocationLink, MarkupContent, MarkupKind, Position, Range, RenameFile, ResourceOp, |
diff --git a/crates/ra_lsp_server/src/lib.rs b/crates/ra_lsp_server/src/lib.rs index fa3d88abd..7a71a90fb 100644 --- a/crates/ra_lsp_server/src/lib.rs +++ b/crates/ra_lsp_server/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #![recursion_limit = "512"] | 3 | #![recursion_limit = "512"] |
2 | mod caps; | 4 | mod caps; |
3 | mod cargo_target_spec; | 5 | mod cargo_target_spec; |
diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs index 852fae027..7d9a1d054 100644 --- a/crates/ra_lsp_server/src/main.rs +++ b/crates/ra_lsp_server/src/main.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use flexi_logger::{Duplicate, Logger}; | 3 | use flexi_logger::{Duplicate, Logger}; |
2 | use lsp_server::Connection; | 4 | use lsp_server::Connection; |
3 | 5 | ||
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 2059f9800..35c35d32b 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod handlers; | 3 | mod handlers; |
2 | mod subscriptions; | 4 | mod subscriptions; |
3 | pub(crate) mod pending_requests; | 5 | pub(crate) mod pending_requests; |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index ae57e57e9..10e271376 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{fmt::Write as _, io::Write as _}; | 3 | use std::{fmt::Write as _, io::Write as _}; |
2 | 4 | ||
3 | use lsp_server::ErrorCode; | 5 | use lsp_server::ErrorCode; |
diff --git a/crates/ra_lsp_server/src/main_loop/pending_requests.rs b/crates/ra_lsp_server/src/main_loop/pending_requests.rs index 7a99fc679..e7ea7aa5b 100644 --- a/crates/ra_lsp_server/src/main_loop/pending_requests.rs +++ b/crates/ra_lsp_server/src/main_loop/pending_requests.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::time::{Duration, Instant}; | 3 | use std::time::{Duration, Instant}; |
2 | 4 | ||
3 | use lsp_server::RequestId; | 5 | use lsp_server::RequestId; |
diff --git a/crates/ra_lsp_server/src/main_loop/subscriptions.rs b/crates/ra_lsp_server/src/main_loop/subscriptions.rs index bbeda723c..3856263b0 100644 --- a/crates/ra_lsp_server/src/main_loop/subscriptions.rs +++ b/crates/ra_lsp_server/src/main_loop/subscriptions.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_ide_api::FileId; | 3 | use ra_ide_api::FileId; |
2 | use rustc_hash::FxHashSet; | 4 | use rustc_hash::FxHashSet; |
3 | 5 | ||
diff --git a/crates/ra_lsp_server/src/markdown.rs b/crates/ra_lsp_server/src/markdown.rs index 3659edf8e..f51fc4ade 100644 --- a/crates/ra_lsp_server/src/markdown.rs +++ b/crates/ra_lsp_server/src/markdown.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | pub(crate) fn format_docs(src: &str) -> String { | 3 | pub(crate) fn format_docs(src: &str) -> String { |
2 | let mut processed_lines = Vec::new(); | 4 | let mut processed_lines = Vec::new(); |
3 | let mut in_code_block = false; | 5 | let mut in_code_block = false; |
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs index 0540f166e..d25fc5726 100644 --- a/crates/ra_lsp_server/src/req.rs +++ b/crates/ra_lsp_server/src/req.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use lsp_types::{Location, Position, Range, TextDocumentIdentifier, Url}; | 3 | use lsp_types::{Location, Position, Range, TextDocumentIdentifier, Url}; |
2 | use rustc_hash::FxHashMap; | 4 | use rustc_hash::FxHashMap; |
3 | use serde::{Deserialize, Serialize}; | 5 | use serde::{Deserialize, Serialize}; |
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index 232409c3b..b55046ec9 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ | 3 | use std::{ |
2 | path::{Path, PathBuf}, | 4 | path::{Path, PathBuf}, |
3 | sync::Arc, | 5 | sync::Arc, |
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index a0904323c..afdbee84e 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | /// `mbe` (short for Macro By Example) crate contains code for handling | 1 | //! `mbe` (short for Macro By Example) crate contains code for handling |
2 | /// `macro_rules` macros. It uses `TokenTree` (from `ra_tt` package) as the | 2 | //! `macro_rules` macros. It uses `TokenTree` (from `ra_tt` package) as the |
3 | /// interface, although it contains some code to bridge `SyntaxNode`s and | 3 | //! interface, although it contains some code to bridge `SyntaxNode`s and |
4 | /// `TokenTree`s as well! | 4 | //! `TokenTree`s as well! |
5 | 5 | ||
6 | mod parser; | 6 | mod parser; |
7 | mod mbe_expander; | 7 | mod mbe_expander; |
diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/ra_mbe/src/mbe_expander/matcher.rs index aff953102..0548e8512 100644 --- a/crates/ra_mbe/src/mbe_expander/matcher.rs +++ b/crates/ra_mbe/src/mbe_expander/matcher.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{ | 3 | use crate::{ |
2 | mbe_expander::{Binding, Bindings, Fragment}, | 4 | mbe_expander::{Binding, Bindings, Fragment}, |
3 | parser::{parse_pattern, Op, RepeatKind, Separator}, | 5 | parser::{parse_pattern, Op, RepeatKind, Separator}, |
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs index cf7458905..7ef45f6dc 100644 --- a/crates/ra_mbe/src/subtree_source.rs +++ b/crates/ra_mbe/src/subtree_source.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_parser::{Token, TokenSource}; | 3 | use ra_parser::{Token, TokenSource}; |
2 | use ra_syntax::{classify_literal, SmolStr, SyntaxKind, SyntaxKind::*, T}; | 4 | use ra_syntax::{classify_literal, SmolStr, SyntaxKind, SyntaxKind::*, T}; |
3 | use std::cell::{Cell, Ref, RefCell}; | 5 | use std::cell::{Cell, Ref, RefCell}; |
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 2d035307b..1b543c84b 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_parser::{ | 3 | use ra_parser::{ |
2 | FragmentKind::{self, *}, | 4 | FragmentKind::{self, *}, |
3 | ParseError, TreeSink, | 5 | ParseError, TreeSink, |
diff --git a/crates/ra_mbe/src/tt_iter.rs b/crates/ra_mbe/src/tt_iter.rs index c53f99d1e..319f1ee65 100644 --- a/crates/ra_mbe/src/tt_iter.rs +++ b/crates/ra_mbe/src/tt_iter.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #[derive(Debug, Clone)] | 3 | #[derive(Debug, Clone)] |
2 | pub(crate) struct TtIter<'a> { | 4 | pub(crate) struct TtIter<'a> { |
3 | pub(crate) inner: std::slice::Iter<'a, tt::TokenTree>, | 5 | pub(crate) inner: std::slice::Iter<'a, tt::TokenTree>, |
diff --git a/crates/ra_parser/src/grammar/attributes.rs b/crates/ra_parser/src/grammar/attributes.rs index 63ca9ca32..f3158ade3 100644 --- a/crates/ra_parser/src/grammar/attributes.rs +++ b/crates/ra_parser/src/grammar/attributes.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) fn inner_attributes(p: &mut Parser) { | 5 | pub(super) fn inner_attributes(p: &mut Parser) { |
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 80b085280..413ecb278 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod atom; | 3 | mod atom; |
2 | 4 | ||
3 | pub(crate) use self::atom::match_arm_list; | 5 | pub(crate) use self::atom::match_arm_list; |
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 457f42a26..a52bdb3ea 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | // test expr_literals | 5 | // test expr_literals |
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 4c67a5c2e..85f7eeb00 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod consts; | 3 | mod consts; |
2 | mod nominal; | 4 | mod nominal; |
3 | mod traits; | 5 | mod traits; |
diff --git a/crates/ra_parser/src/grammar/items/consts.rs b/crates/ra_parser/src/grammar/items/consts.rs index 310260689..742a7e056 100644 --- a/crates/ra_parser/src/grammar/items/consts.rs +++ b/crates/ra_parser/src/grammar/items/consts.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) fn static_def(p: &mut Parser, m: Marker) { | 5 | pub(super) fn static_def(p: &mut Parser, m: Marker) { |
diff --git a/crates/ra_parser/src/grammar/items/nominal.rs b/crates/ra_parser/src/grammar/items/nominal.rs index bede3b692..9d8fb8486 100644 --- a/crates/ra_parser/src/grammar/items/nominal.rs +++ b/crates/ra_parser/src/grammar/items/nominal.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) fn struct_def(p: &mut Parser, m: Marker, kind: SyntaxKind) { | 5 | pub(super) fn struct_def(p: &mut Parser, m: Marker, kind: SyntaxKind) { |
diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index 3742fd197..2c560e824 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | // test trait_item | 5 | // test trait_item |
diff --git a/crates/ra_parser/src/grammar/items/use_item.rs b/crates/ra_parser/src/grammar/items/use_item.rs index 63ac37e9e..e3b991c8c 100644 --- a/crates/ra_parser/src/grammar/items/use_item.rs +++ b/crates/ra_parser/src/grammar/items/use_item.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) fn use_item(p: &mut Parser, m: Marker) { | 5 | pub(super) fn use_item(p: &mut Parser, m: Marker) { |
diff --git a/crates/ra_parser/src/grammar/params.rs b/crates/ra_parser/src/grammar/params.rs index efc329243..c10b53316 100644 --- a/crates/ra_parser/src/grammar/params.rs +++ b/crates/ra_parser/src/grammar/params.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | // test param_list | 5 | // test param_list |
diff --git a/crates/ra_parser/src/grammar/paths.rs b/crates/ra_parser/src/grammar/paths.rs index 24b65128e..ca8e075a1 100644 --- a/crates/ra_parser/src/grammar/paths.rs +++ b/crates/ra_parser/src/grammar/paths.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) const PATH_FIRST: TokenSet = | 5 | pub(super) const PATH_FIRST: TokenSet = |
diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index aa9a6d18e..f5d12278c 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST | 5 | pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST |
diff --git a/crates/ra_parser/src/grammar/type_args.rs b/crates/ra_parser/src/grammar/type_args.rs index 8e97fe03c..7256c2697 100644 --- a/crates/ra_parser/src/grammar/type_args.rs +++ b/crates/ra_parser/src/grammar/type_args.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { | 5 | pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { |
diff --git a/crates/ra_parser/src/grammar/type_params.rs b/crates/ra_parser/src/grammar/type_params.rs index 7071c70ea..34406b5bd 100644 --- a/crates/ra_parser/src/grammar/type_params.rs +++ b/crates/ra_parser/src/grammar/type_params.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) fn opt_type_param_list(p: &mut Parser) { | 5 | pub(super) fn opt_type_param_list(p: &mut Parser) { |
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index 4e3522d48..d4ca94fca 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use super::*; | 3 | use super::*; |
2 | 4 | ||
3 | pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![ | 5 | pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![ |
diff --git a/crates/ra_parser/src/parser.rs b/crates/ra_parser/src/parser.rs index f8fba6860..dafd5247b 100644 --- a/crates/ra_parser/src/parser.rs +++ b/crates/ra_parser/src/parser.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::cell::Cell; | 3 | use std::cell::Cell; |
2 | 4 | ||
3 | use drop_bomb::DropBomb; | 5 | use drop_bomb::DropBomb; |
diff --git a/crates/ra_parser/src/syntax_kind.rs b/crates/ra_parser/src/syntax_kind.rs index 3efcfa403..8d6bd057b 100644 --- a/crates/ra_parser/src/syntax_kind.rs +++ b/crates/ra_parser/src/syntax_kind.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #[macro_use] | 3 | #[macro_use] |
2 | mod generated; | 4 | mod generated; |
3 | 5 | ||
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 8b43d93fe..96b5bce88 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | // Generated file, do not edit by hand, see `crate/ra_tools/src/codegen` | 1 | //! Generated file, do not edit by hand, see `crate/ra_tools/src/codegen` |
2 | 2 | ||
3 | #![allow(bad_style, missing_docs, unreachable_pub)] | 3 | #![allow(bad_style, missing_docs, unreachable_pub)] |
4 | #[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT_DEF`."] | 4 | #[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT_DEF`."] |
diff --git a/crates/ra_parser/src/token_set.rs b/crates/ra_parser/src/token_set.rs index 79121b35f..6dc061889 100644 --- a/crates/ra_parser/src/token_set.rs +++ b/crates/ra_parser/src/token_set.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::SyntaxKind; | 3 | use crate::SyntaxKind; |
2 | 4 | ||
3 | /// A bit-set of `SyntaxKind`s | 5 | /// A bit-set of `SyntaxKind`s |
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index d32a289be..885a98750 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod memory_usage; | 3 | mod memory_usage; |
2 | #[cfg(feature = "cpu_profiler")] | 4 | #[cfg(feature = "cpu_profiler")] |
3 | mod google_cpu_profiler; | 5 | mod google_cpu_profiler; |
diff --git a/crates/ra_prof/src/memory_usage.rs b/crates/ra_prof/src/memory_usage.rs index 8e8cb7299..ad005ea14 100644 --- a/crates/ra_prof/src/memory_usage.rs +++ b/crates/ra_prof/src/memory_usage.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt; | 3 | use std::fmt; |
2 | 4 | ||
3 | pub struct MemoryUsage { | 5 | pub struct MemoryUsage { |
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index 712d8818f..805eaa178 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::path::{Path, PathBuf}; | 3 | use std::path::{Path, PathBuf}; |
2 | 4 | ||
3 | use cargo_metadata::{CargoOpt, MetadataCommand}; | 5 | use cargo_metadata::{CargoOpt, MetadataCommand}; |
diff --git a/crates/ra_project_model/src/json_project.rs b/crates/ra_project_model/src/json_project.rs index 9a9eb9e1f..54ddca2cb 100644 --- a/crates/ra_project_model/src/json_project.rs +++ b/crates/ra_project_model/src/json_project.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::path::PathBuf; | 3 | use std::path::PathBuf; |
2 | 4 | ||
3 | use serde::Deserialize; | 5 | use serde::Deserialize; |
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index 4fa32dc34..5d3078598 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod cargo_workspace; | 3 | mod cargo_workspace; |
2 | mod json_project; | 4 | mod json_project; |
3 | mod sysroot; | 5 | mod sysroot; |
diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs index 0c27d4f4b..35d6df5cb 100644 --- a/crates/ra_project_model/src/sysroot.rs +++ b/crates/ra_project_model/src/sysroot.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ | 3 | use std::{ |
2 | env, | 4 | env, |
3 | path::{Path, PathBuf}, | 5 | path::{Path, PathBuf}, |
diff --git a/crates/ra_syntax/fuzz/fuzz_targets/parser.rs b/crates/ra_syntax/fuzz/fuzz_targets/parser.rs index 76a8b08d0..7bc4ef30d 100644 --- a/crates/ra_syntax/fuzz/fuzz_targets/parser.rs +++ b/crates/ra_syntax/fuzz/fuzz_targets/parser.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #![no_main] | 3 | #![no_main] |
2 | use libfuzzer_sys::fuzz_target; | 4 | use libfuzzer_sys::fuzz_target; |
3 | use ra_syntax::fuzz::check_parser; | 5 | use ra_syntax::fuzz::check_parser; |
diff --git a/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs b/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs index 45524d4c1..16598f5f1 100644 --- a/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs +++ b/crates/ra_syntax/fuzz/fuzz_targets/reparse.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #![no_main] | 3 | #![no_main] |
2 | use libfuzzer_sys::fuzz_target; | 4 | use libfuzzer_sys::fuzz_target; |
3 | use ra_syntax::fuzz::CheckReparse; | 5 | use ra_syntax::fuzz::CheckReparse; |
diff --git a/crates/ra_syntax/src/algo.rs b/crates/ra_syntax/src/algo.rs index f33d2ad4e..d55534ede 100644 --- a/crates/ra_syntax/src/algo.rs +++ b/crates/ra_syntax/src/algo.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | pub mod visit; | 3 | pub mod visit; |
2 | 4 | ||
3 | use std::ops::RangeInclusive; | 5 | use std::ops::RangeInclusive; |
diff --git a/crates/ra_syntax/src/algo/visit.rs b/crates/ra_syntax/src/algo/visit.rs index 87bd15cc0..4df275ba4 100644 --- a/crates/ra_syntax/src/algo/visit.rs +++ b/crates/ra_syntax/src/algo/visit.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{AstNode, SyntaxNode}; | 3 | use crate::{AstNode, SyntaxNode}; |
2 | 4 | ||
3 | use std::marker::PhantomData; | 5 | use std::marker::PhantomData; |
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index aaf03ce3f..3bb5571ee 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | // Generated file, do not edit by hand, see `crate/ra_tools/src/codegen` | 1 | //! Generated file, do not edit by hand, see `crate/ra_tools/src/codegen` |
2 | 2 | ||
3 | use crate::{ | 3 | use crate::{ |
4 | ast::{self, AstChildren, AstNode}, | 4 | ast::{self, AstChildren, AstNode}, |
diff --git a/crates/ra_syntax/src/fuzz.rs b/crates/ra_syntax/src/fuzz.rs index 698a624ec..7012df7f0 100644 --- a/crates/ra_syntax/src/fuzz.rs +++ b/crates/ra_syntax/src/fuzz.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{validation, AstNode, SourceFile, TextRange, TextUnit}; | 3 | use crate::{validation, AstNode, SourceFile, TextRange, TextUnit}; |
2 | use ra_text_edit::AtomTextEdit; | 4 | use ra_text_edit::AtomTextEdit; |
3 | use std::str::{self, FromStr}; | 5 | use std::str::{self, FromStr}; |
diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs index bdb01d40b..6d839208d 100644 --- a/crates/ra_syntax/src/parsing/lexer.rs +++ b/crates/ra_syntax/src/parsing/lexer.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{ | 3 | use crate::{ |
2 | SyntaxKind::{self, *}, | 4 | SyntaxKind::{self, *}, |
3 | TextUnit, | 5 | TextUnit, |
diff --git a/crates/ra_syntax/src/parsing/text_token_source.rs b/crates/ra_syntax/src/parsing/text_token_source.rs index 64cb20ae8..e793f93a4 100644 --- a/crates/ra_syntax/src/parsing/text_token_source.rs +++ b/crates/ra_syntax/src/parsing/text_token_source.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use ra_parser::Token as PToken; | 3 | use ra_parser::Token as PToken; |
2 | use ra_parser::TokenSource; | 4 | use ra_parser::TokenSource; |
3 | 5 | ||
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs index be6e51780..142164316 100644 --- a/crates/ra_syntax/src/parsing/text_tree_sink.rs +++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::mem; | 3 | use std::mem; |
2 | 4 | ||
3 | use ra_parser::{ParseError, TreeSink}; | 5 | use ra_parser::{ParseError, TreeSink}; |
diff --git a/crates/ra_syntax/src/ptr.rs b/crates/ra_syntax/src/ptr.rs index 992034ef0..31167cada 100644 --- a/crates/ra_syntax/src/ptr.rs +++ b/crates/ra_syntax/src/ptr.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{iter::successors, marker::PhantomData}; | 3 | use std::{iter::successors, marker::PhantomData}; |
2 | 4 | ||
3 | use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange}; | 5 | use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange}; |
diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index 5aefec768..d6eca2ad7 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::fmt; | 3 | use std::fmt; |
2 | 4 | ||
3 | use ra_parser::ParseError; | 5 | use ra_parser::ParseError; |
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index 16824f3c4..4f8935b2c 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod block; | 3 | mod block; |
2 | 4 | ||
3 | use rustc_lexer::unescape; | 5 | use rustc_lexer::unescape; |
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs index 3c9e96eb3..c85bbc1f4 100644 --- a/crates/ra_syntax/src/validation/block.rs +++ b/crates/ra_syntax/src/validation/block.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{ | 3 | use crate::{ |
2 | ast::{self, AstNode, AttrsOwner}, | 4 | ast::{self, AstNode, AttrsOwner}, |
3 | SyntaxError, | 5 | SyntaxError, |
diff --git a/crates/ra_text_edit/src/lib.rs b/crates/ra_text_edit/src/lib.rs index df673ba18..5f1b12222 100644 --- a/crates/ra_text_edit/src/lib.rs +++ b/crates/ra_text_edit/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod text_edit; | 3 | mod text_edit; |
2 | pub mod test_utils; | 4 | pub mod test_utils; |
3 | 5 | ||
diff --git a/crates/ra_text_edit/src/test_utils.rs b/crates/ra_text_edit/src/test_utils.rs index 2d6e7f216..d4c7840ff 100644 --- a/crates/ra_text_edit/src/test_utils.rs +++ b/crates/ra_text_edit/src/test_utils.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{AtomTextEdit, TextEdit}; | 3 | use crate::{AtomTextEdit, TextEdit}; |
2 | use proptest::prelude::*; | 4 | use proptest::prelude::*; |
3 | use text_unit::{TextRange, TextUnit}; | 5 | use text_unit::{TextRange, TextUnit}; |
diff --git a/crates/ra_text_edit/src/text_edit.rs b/crates/ra_text_edit/src/text_edit.rs index 8522f99bd..0381ea000 100644 --- a/crates/ra_text_edit/src/text_edit.rs +++ b/crates/ra_text_edit/src/text_edit.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::AtomTextEdit; | 3 | use crate::AtomTextEdit; |
2 | use text_unit::{TextRange, TextUnit}; | 4 | use text_unit::{TextRange, TextUnit}; |
3 | 5 | ||
diff --git a/crates/ra_tools/src/bin/pre-commit.rs b/crates/ra_tools/src/bin/pre-commit.rs index a628f64b2..16bbf9cb2 100644 --- a/crates/ra_tools/src/bin/pre-commit.rs +++ b/crates/ra_tools/src/bin/pre-commit.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::process::Command; | 3 | use std::process::Command; |
2 | 4 | ||
3 | use ra_tools::{project_root, run, run_rustfmt, Overwrite, Result}; | 5 | use ra_tools::{project_root, run, run_rustfmt, Overwrite, Result}; |
diff --git a/crates/ra_tools/src/boilerplate_gen.rs b/crates/ra_tools/src/boilerplate_gen.rs index 1d112c0af..39f1cae66 100644 --- a/crates/ra_tools/src/boilerplate_gen.rs +++ b/crates/ra_tools/src/boilerplate_gen.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use std::{ | 3 | use std::{ |
2 | collections::BTreeMap, | 4 | collections::BTreeMap, |
3 | fs, | 5 | fs, |
@@ -282,7 +284,7 @@ fn reformat(text: impl std::fmt::Display) -> Result<String> { | |||
282 | let output = rustfmt.wait_with_output()?; | 284 | let output = rustfmt.wait_with_output()?; |
283 | let stdout = String::from_utf8(output.stdout)?; | 285 | let stdout = String::from_utf8(output.stdout)?; |
284 | let preamble = "Generated file, do not edit by hand, see `crate/ra_tools/src/codegen`"; | 286 | let preamble = "Generated file, do not edit by hand, see `crate/ra_tools/src/codegen`"; |
285 | Ok(format!("// {}\n\n{}", preamble, stdout)) | 287 | Ok(format!("//! {}\n\n{}", preamble, stdout)) |
286 | } | 288 | } |
287 | 289 | ||
288 | #[derive(Deserialize, Debug)] | 290 | #[derive(Deserialize, Debug)] |
diff --git a/crates/ra_tools/src/help.rs b/crates/ra_tools/src/help.rs index 9eb4dfbe4..72dfabacd 100644 --- a/crates/ra_tools/src/help.rs +++ b/crates/ra_tools/src/help.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | pub const GLOBAL_HELP: &str = "tasks | 3 | pub const GLOBAL_HELP: &str = "tasks |
2 | 4 | ||
3 | USAGE: | 5 | USAGE: |
diff --git a/crates/ra_tools/src/lib.rs b/crates/ra_tools/src/lib.rs index 9ba23caaa..aa993a38a 100644 --- a/crates/ra_tools/src/lib.rs +++ b/crates/ra_tools/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod boilerplate_gen; | 3 | mod boilerplate_gen; |
2 | 4 | ||
3 | use std::{ | 5 | use std::{ |
diff --git a/crates/ra_tools/src/main.rs b/crates/ra_tools/src/main.rs index a951ce427..161871ccf 100644 --- a/crates/ra_tools/src/main.rs +++ b/crates/ra_tools/src/main.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | mod help; | 3 | mod help; |
2 | 4 | ||
3 | use core::fmt::Write; | 5 | use core::fmt::Write; |
diff --git a/crates/ra_tools/tests/cli.rs b/crates/ra_tools/tests/cli.rs index 91b19c8f8..609fd4d8b 100644 --- a/crates/ra_tools/tests/cli.rs +++ b/crates/ra_tools/tests/cli.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use walkdir::WalkDir; | ||
2 | |||
3 | use ra_tools::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify}; | 1 | use ra_tools::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify}; |
2 | use walkdir::WalkDir; | ||
4 | 3 | ||
5 | #[test] | 4 | #[test] |
6 | fn generated_grammar_is_fresh() { | 5 | fn generated_grammar_is_fresh() { |
@@ -36,7 +35,7 @@ fn no_todo() { | |||
36 | let text = std::fs::read_to_string(e.path()).unwrap(); | 35 | let text = std::fs::read_to_string(e.path()).unwrap(); |
37 | if text.contains("TODO") || text.contains("TOOD") { | 36 | if text.contains("TODO") || text.contains("TOOD") { |
38 | panic!( | 37 | panic!( |
39 | "\nTODO markers should not be commited to the master branch,\n\ | 38 | "\nTODO markers should not be committed to the master branch,\n\ |
40 | use FIXME instead\n\ | 39 | use FIXME instead\n\ |
41 | {}\n", | 40 | {}\n", |
42 | e.path().display(), | 41 | e.path().display(), |
diff --git a/crates/ra_tools/tests/docs.rs b/crates/ra_tools/tests/docs.rs new file mode 100644 index 000000000..ea3330175 --- /dev/null +++ b/crates/ra_tools/tests/docs.rs | |||
@@ -0,0 +1,63 @@ | |||
1 | use std::fs; | ||
2 | use std::io::prelude::*; | ||
3 | use std::io::BufReader; | ||
4 | use std::path::Path; | ||
5 | |||
6 | use walkdir::{DirEntry, WalkDir}; | ||
7 | |||
8 | use ra_tools::project_root; | ||
9 | |||
10 | fn is_exclude_dir(p: &Path) -> bool { | ||
11 | let exclude_dirs = ["tests", "test_data"]; | ||
12 | let mut cur_path = p; | ||
13 | while let Some(path) = cur_path.parent() { | ||
14 | if exclude_dirs.iter().any(|dir| path.ends_with(dir)) { | ||
15 | return true; | ||
16 | } | ||
17 | cur_path = path; | ||
18 | } | ||
19 | |||
20 | false | ||
21 | } | ||
22 | |||
23 | fn is_exclude_file(d: &DirEntry) -> bool { | ||
24 | let file_names = ["tests.rs"]; | ||
25 | |||
26 | d.file_name().to_str().map(|f_n| file_names.iter().any(|name| *name == f_n)).unwrap_or(false) | ||
27 | } | ||
28 | |||
29 | fn is_hidden(entry: &DirEntry) -> bool { | ||
30 | entry.file_name().to_str().map(|s| s.starts_with(".")).unwrap_or(false) | ||
31 | } | ||
32 | |||
33 | #[test] | ||
34 | fn no_docs_comments() { | ||
35 | let crates = project_root().join("crates"); | ||
36 | let iter = WalkDir::new(crates); | ||
37 | for f in iter.into_iter().filter_entry(|e| !is_hidden(e)) { | ||
38 | let f = f.unwrap(); | ||
39 | if f.file_type().is_dir() { | ||
40 | continue; | ||
41 | } | ||
42 | if f.path().extension().map(|it| it != "rs").unwrap_or(false) { | ||
43 | continue; | ||
44 | } | ||
45 | if is_exclude_dir(f.path()) { | ||
46 | continue; | ||
47 | } | ||
48 | if is_exclude_file(&f) { | ||
49 | continue; | ||
50 | } | ||
51 | let mut reader = BufReader::new(fs::File::open(f.path()).unwrap()); | ||
52 | let mut line = String::new(); | ||
53 | reader.read_line(&mut line).unwrap(); | ||
54 | if !line.starts_with("//!") { | ||
55 | panic!( | ||
56 | "\nMissing docs strings\n\ | ||
57 | module: {}\n\ | ||
58 | Need add doc for module\n", | ||
59 | f.path().display() | ||
60 | ) | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/crates/ra_tools/tests/main.rs b/crates/ra_tools/tests/main.rs new file mode 100644 index 000000000..56d1318d6 --- /dev/null +++ b/crates/ra_tools/tests/main.rs | |||
@@ -0,0 +1,2 @@ | |||
1 | mod cli; | ||
2 | mod docs; | ||
diff --git a/crates/ra_tt/src/buffer.rs b/crates/ra_tt/src/buffer.rs index 48c22a2d8..ef3f2323c 100644 --- a/crates/ra_tt/src/buffer.rs +++ b/crates/ra_tt/src/buffer.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | use crate::{Subtree, TokenTree}; | 3 | use crate::{Subtree, TokenTree}; |
2 | 4 | ||
3 | #[derive(Copy, Clone, Debug, Eq, PartialEq)] | 5 | #[derive(Copy, Clone, Debug, Eq, PartialEq)] |
diff --git a/crates/ra_tt/src/lib.rs b/crates/ra_tt/src/lib.rs index 2a48c66c4..20c251ff4 100644 --- a/crates/ra_tt/src/lib.rs +++ b/crates/ra_tt/src/lib.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | /// `tt` crate defines a `TokenTree` data structure: this is the interface (both | 1 | //! `tt` crate defines a `TokenTree` data structure: this is the interface (both |
2 | /// input and output) of macros. It closely mirrors `proc_macro` crate's | 2 | //! input and output) of macros. It closely mirrors `proc_macro` crate's |
3 | /// `TokenTree`. | 3 | //! `TokenTree`. |
4 | 4 | ||
5 | macro_rules! impl_froms { | 5 | macro_rules! impl_froms { |
6 | ($e:ident: $($v:ident), *) => { | 6 | ($e:ident: $($v:ident), *) => { |
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 816d01f09..c40943b63 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | //! FIXME: write short doc here | ||
2 | |||
1 | #[macro_use] | 3 | #[macro_use] |
2 | pub mod marks; | 4 | pub mod marks; |
3 | 5 | ||