aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/src
diff options
context:
space:
mode:
authorMuhammad Mominul Huque <[email protected]>2018-10-14 15:58:53 +0100
committerMuhammad Mominul Huque <[email protected]>2018-10-14 15:58:53 +0100
commit33b378797c33bf29af4104e0b11c31252451df0c (patch)
treebe2b173bf617e6c6d123d0b1053a98ae270def73 /crates/tools/src
parent114e9a2d74f1fa43c3418f8cd978fd4186fcb78b (diff)
Show how to generate code with error message
Diffstat (limited to 'crates/tools/src')
-rw-r--r--crates/tools/src/lib.rs2
-rw-r--r--crates/tools/src/main.rs4
2 files changed, 2 insertions, 4 deletions
diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs
index 352f4d135..7b5a60847 100644
--- a/crates/tools/src/lib.rs
+++ b/crates/tools/src/lib.rs
@@ -13,7 +13,7 @@ use std::{
13use itertools::Itertools; 13use itertools::Itertools;
14use heck::{CamelCase, ShoutySnakeCase, SnakeCase}; 14use heck::{CamelCase, ShoutySnakeCase, SnakeCase};
15 15
16type Result<T> = ::std::result::Result<T, failure::Error>; 16pub type Result<T> = ::std::result::Result<T, failure::Error>;
17 17
18#[derive(Debug)] 18#[derive(Debug)]
19pub struct Test { 19pub struct Test {
diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs
index cf5e662b0..179c1163f 100644
--- a/crates/tools/src/main.rs
+++ b/crates/tools/src/main.rs
@@ -11,9 +11,7 @@ use std::{
11 path::{Path, PathBuf}, 11 path::{Path, PathBuf},
12 process::Command, 12 process::Command,
13}; 13};
14use tools::{Test, collect_tests, render_template, update}; 14use tools::{Test, collect_tests, render_template, update, Result};
15
16type Result<T> = ::std::result::Result<T, failure::Error>;
17 15
18const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar"; 16const GRAMMAR_DIR: &str = "./crates/ra_syntax/src/grammar";
19const INLINE_TESTS_DIR: &str = "./crates/ra_syntax/tests/data/parser/inline"; 17const INLINE_TESTS_DIR: &str = "./crates/ra_syntax/tests/data/parser/inline";