aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock1
-rw-r--r--crates/ra_hir/src/code_model.rs21
-rw-r--r--crates/ra_ide/Cargo.toml1
-rw-r--r--crates/ra_proc_macro_srv/src/tests/mod.rs2
-rw-r--r--crates/ra_syntax/src/lib.rs2
-rw-r--r--crates/ra_syntax/src/parsing.rs2
6 files changed, 13 insertions, 16 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c0a9494e5..459f82f3a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1163,7 +1163,6 @@ dependencies = [
1163 "ra_ide_db", 1163 "ra_ide_db",
1164 "ra_parser", 1164 "ra_parser",
1165 "ra_prof", 1165 "ra_prof",
1166 "ra_project_model",
1167 "ra_ssr", 1166 "ra_ssr",
1168 "ra_syntax", 1167 "ra_syntax",
1169 "ra_text_edit", 1168 "ra_text_edit",
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 839eb475e..56b2481e6 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -186,17 +186,18 @@ impl ModuleDef {
186 module.visibility_of(db, self) 186 module.visibility_of(db, self)
187 } 187 }
188 188
189 pub fn name(&self, db: &dyn HirDatabase) -> Option<Name> { 189 pub fn name(self, db: &dyn HirDatabase) -> Option<Name> {
190 match self { 190 match self {
191 ModuleDef::Module(m) => m.name(db), 191 ModuleDef::Adt(it) => Some(it.name(db)),
192 ModuleDef::Function(m) => Some(m.name(db)), 192 ModuleDef::Trait(it) => Some(it.name(db)),
193 ModuleDef::Adt(m) => Some(m.name(db)), 193 ModuleDef::Function(it) => Some(it.name(db)),
194 ModuleDef::EnumVariant(m) => Some(m.name(db)), 194 ModuleDef::EnumVariant(it) => Some(it.name(db)),
195 ModuleDef::Const(m) => m.name(db), 195 ModuleDef::TypeAlias(it) => Some(it.name(db)),
196 ModuleDef::Static(m) => m.name(db), 196 ModuleDef::Module(it) => it.name(db),
197 ModuleDef::Trait(m) => Some(m.name(db)), 197 ModuleDef::Const(it) => it.name(db),
198 ModuleDef::TypeAlias(m) => Some(m.name(db)), 198 ModuleDef::Static(it) => it.name(db),
199 ModuleDef::BuiltinType(m) => Some(m.as_name()), 199
200 ModuleDef::BuiltinType(it) => Some(it.as_name()),
200 } 201 }
201 } 202 }
202 203
diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml
index 642b71937..d0eb018d5 100644
--- a/crates/ra_ide/Cargo.toml
+++ b/crates/ra_ide/Cargo.toml
@@ -35,7 +35,6 @@ ra_prof = { path = "../ra_prof" }
35test_utils = { path = "../test_utils" } 35test_utils = { path = "../test_utils" }
36ra_assists = { path = "../ra_assists" } 36ra_assists = { path = "../ra_assists" }
37ra_ssr = { path = "../ra_ssr" } 37ra_ssr = { path = "../ra_ssr" }
38ra_project_model = { path = "../ra_project_model" }
39ra_hir_def = { path = "../ra_hir_def" } 38ra_hir_def = { path = "../ra_hir_def" }
40ra_tt = { path = "../ra_tt" } 39ra_tt = { path = "../ra_tt" }
41ra_parser = { path = "../ra_parser" } 40ra_parser = { path = "../ra_parser" }
diff --git a/crates/ra_proc_macro_srv/src/tests/mod.rs b/crates/ra_proc_macro_srv/src/tests/mod.rs
index 1057408e5..82cefbb29 100644
--- a/crates/ra_proc_macro_srv/src/tests/mod.rs
+++ b/crates/ra_proc_macro_srv/src/tests/mod.rs
@@ -6,7 +6,6 @@ use test_utils::assert_eq_text;
6use utils::*; 6use utils::*;
7 7
8#[test] 8#[test]
9#[ignore]
10fn test_derive_serialize_proc_macro() { 9fn test_derive_serialize_proc_macro() {
11 assert_expand( 10 assert_expand(
12 "serde_derive", 11 "serde_derive",
@@ -18,7 +17,6 @@ fn test_derive_serialize_proc_macro() {
18} 17}
19 18
20#[test] 19#[test]
21#[ignore]
22fn test_derive_serialize_proc_macro_failed() { 20fn test_derive_serialize_proc_macro_failed() {
23 assert_expand( 21 assert_expand(
24 "serde_derive", 22 "serde_derive",
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index bd83eb2d2..9b7664576 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -47,7 +47,7 @@ use crate::syntax_node::GreenNode;
47pub use crate::{ 47pub use crate::{
48 algo::InsertPosition, 48 algo::InsertPosition,
49 ast::{AstNode, AstToken}, 49 ast::{AstNode, AstToken},
50 parsing::{lex_single_syntax_kind, lex_single_valid_syntax_kind, parse_text, tokenize, Token}, 50 parsing::{lex_single_syntax_kind, lex_single_valid_syntax_kind, tokenize, Token},
51 ptr::{AstPtr, SyntaxNodePtr}, 51 ptr::{AstPtr, SyntaxNodePtr},
52 syntax_error::SyntaxError, 52 syntax_error::SyntaxError,
53 syntax_node::{ 53 syntax_node::{
diff --git a/crates/ra_syntax/src/parsing.rs b/crates/ra_syntax/src/parsing.rs
index 4ec0b8d59..0ed3c20ef 100644
--- a/crates/ra_syntax/src/parsing.rs
+++ b/crates/ra_syntax/src/parsing.rs
@@ -15,7 +15,7 @@ pub use lexer::*;
15pub(crate) use self::reparsing::incremental_reparse; 15pub(crate) use self::reparsing::incremental_reparse;
16use ra_parser::SyntaxKind; 16use ra_parser::SyntaxKind;
17 17
18pub fn parse_text(text: &str) -> (GreenNode, Vec<SyntaxError>) { 18pub(crate) fn parse_text(text: &str) -> (GreenNode, Vec<SyntaxError>) {
19 let (tokens, lexer_errors) = tokenize(&text); 19 let (tokens, lexer_errors) = tokenize(&text);
20 20
21 let mut token_source = TextTokenSource::new(text, &tokens); 21 let mut token_source = TextTokenSource::new(text, &tokens);