diff options
Diffstat (limited to 'crates/tools/src/lib.rs')
-rw-r--r-- | crates/tools/src/lib.rs | 9 |
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 | ||
13 | pub type Result<T> = ::std::result::Result<T, failure::Error>; | 13 | pub type Result<T> = ::std::result::Result<T, failure::Error>; |
14 | 14 | ||
15 | pub const GRAMMAR: &str = "ra_syntax/src/grammar.ron"; | 15 | pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron"; |
16 | pub const SYNTAX_KINDS: &str = "ra_syntax/src/syntax_kinds/generated.rs.tera"; | 16 | pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera"; |
17 | pub const AST: &str = "ra_syntax/src/ast/generated.rs.tera"; | 17 | pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera"; |
18 | 18 | ||
19 | #[derive(Debug)] | 19 | #[derive(Debug)] |
20 | pub struct Test { | 20 | pub struct Test { |
@@ -75,7 +75,8 @@ pub fn generate(mode: Mode) -> Result<()> { | |||
75 | 75 | ||
76 | pub fn project_root() -> PathBuf { | 76 | pub 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 | } |