aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools/src/lib.rs')
-rw-r--r--crates/tools/src/lib.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs
index 7c5410d3c..91c35b9e1 100644
--- a/crates/tools/src/lib.rs
+++ b/crates/tools/src/lib.rs
@@ -12,9 +12,9 @@ pub use teraron::{Mode, Verify, Overwrite};
12 12
13pub type Result<T> = ::std::result::Result<T, failure::Error>; 13pub type Result<T> = ::std::result::Result<T, failure::Error>;
14 14
15pub const GRAMMAR: &str = "ra_syntax/src/grammar.ron"; 15pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
16pub const SYNTAX_KINDS: &str = "ra_syntax/src/syntax_kinds/generated.rs.tera"; 16pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera";
17pub const AST: &str = "ra_syntax/src/ast/generated.rs.tera"; 17pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera";
18 18
19#[derive(Debug)] 19#[derive(Debug)]
20pub struct Test { 20pub struct Test {
@@ -75,7 +75,8 @@ pub fn generate(mode: Mode) -> Result<()> {
75 75
76pub fn project_root() -> PathBuf { 76pub fn project_root() -> PathBuf {
77 Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap()) 77 Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap())
78 .parent() 78 .ancestors()
79 .nth(2)
79 .unwrap() 80 .unwrap()
80 .to_path_buf() 81 .to_path_buf()
81} 82}