aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_db/src/input.rs')
-rw-r--r--crates/ra_db/src/input.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs
index eafa95921..60f7dc881 100644
--- a/crates/ra_db/src/input.rs
+++ b/crates/ra_db/src/input.rs
@@ -6,13 +6,14 @@
6//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how 6//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how
7//! actual IO is done and lowered to input. 7//! actual IO is done and lowered to input.
8 8
9use relative_path::{RelativePath, RelativePathBuf};
10use rustc_hash::FxHashMap; 9use rustc_hash::FxHashMap;
11 10
12use ra_cfg::CfgOptions; 11use ra_cfg::CfgOptions;
13use ra_syntax::SmolStr; 12use ra_syntax::SmolStr;
14use rustc_hash::FxHashSet; 13use rustc_hash::FxHashSet;
15 14
15use crate::{RelativePath, RelativePathBuf};
16
16/// `FileId` is an integer which uniquely identifies a file. File paths are 17/// `FileId` is an integer which uniquely identifies a file. File paths are
17/// messy and system-dependent, so most of the code should work directly with 18/// messy and system-dependent, so most of the code should work directly with
18/// `FileId`, without inspecting the path. The mapping between `FileId` and path 19/// `FileId`, without inspecting the path. The mapping between `FileId` and path
@@ -97,6 +98,7 @@ pub enum Edition {
97} 98}
98 99
99impl Edition { 100impl Edition {
101 //FIXME: replace with FromStr with proper error handling
100 pub fn from_string(s: &str) -> Edition { 102 pub fn from_string(s: &str) -> Edition {
101 match s { 103 match s {
102 "2015" => Edition::Edition2015, 104 "2015" => Edition::Edition2015,