From d6f9e8806a26c5998a691974ba8e3655a2186766 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Tue, 30 Jun 2020 21:37:42 +1200 Subject: Remove unintentional changes --- crates/ra_hir/src/code_model.rs | 21 +++++++++++---------- crates/ra_ide/Cargo.toml | 1 - crates/ra_proc_macro_srv/src/tests/mod.rs | 2 -- crates/ra_syntax/src/lib.rs | 2 +- crates/ra_syntax/src/parsing.rs | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) (limited to 'crates') 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 { module.visibility_of(db, self) } - pub fn name(&self, db: &dyn HirDatabase) -> Option { + pub fn name(self, db: &dyn HirDatabase) -> Option { match self { - ModuleDef::Module(m) => m.name(db), - ModuleDef::Function(m) => Some(m.name(db)), - ModuleDef::Adt(m) => Some(m.name(db)), - ModuleDef::EnumVariant(m) => Some(m.name(db)), - ModuleDef::Const(m) => m.name(db), - ModuleDef::Static(m) => m.name(db), - ModuleDef::Trait(m) => Some(m.name(db)), - ModuleDef::TypeAlias(m) => Some(m.name(db)), - ModuleDef::BuiltinType(m) => Some(m.as_name()), + ModuleDef::Adt(it) => Some(it.name(db)), + ModuleDef::Trait(it) => Some(it.name(db)), + ModuleDef::Function(it) => Some(it.name(db)), + ModuleDef::EnumVariant(it) => Some(it.name(db)), + ModuleDef::TypeAlias(it) => Some(it.name(db)), + ModuleDef::Module(it) => it.name(db), + ModuleDef::Const(it) => it.name(db), + ModuleDef::Static(it) => it.name(db), + + ModuleDef::BuiltinType(it) => Some(it.as_name()), } } 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" } test_utils = { path = "../test_utils" } ra_assists = { path = "../ra_assists" } ra_ssr = { path = "../ra_ssr" } -ra_project_model = { path = "../ra_project_model" } ra_hir_def = { path = "../ra_hir_def" } ra_tt = { path = "../ra_tt" } ra_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; use utils::*; #[test] -#[ignore] fn test_derive_serialize_proc_macro() { assert_expand( "serde_derive", @@ -18,7 +17,6 @@ fn test_derive_serialize_proc_macro() { } #[test] -#[ignore] fn test_derive_serialize_proc_macro_failed() { assert_expand( "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; pub use crate::{ algo::InsertPosition, ast::{AstNode, AstToken}, - parsing::{lex_single_syntax_kind, lex_single_valid_syntax_kind, parse_text, tokenize, Token}, + parsing::{lex_single_syntax_kind, lex_single_valid_syntax_kind, tokenize, Token}, ptr::{AstPtr, SyntaxNodePtr}, syntax_error::SyntaxError, 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::*; pub(crate) use self::reparsing::incremental_reparse; use ra_parser::SyntaxKind; -pub fn parse_text(text: &str) -> (GreenNode, Vec) { +pub(crate) fn parse_text(text: &str) -> (GreenNode, Vec) { let (tokens, lexer_errors) = tokenize(&text); let mut token_source = TextTokenSource::new(text, &tokens); -- cgit v1.2.3