Repository: rust-analyzer/rust-analyzer
Pull request #1640 (2019-08-03 20:51:40)

Bump deps
`insta`, `unicode-xid` and others


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 5114797f07..7dffcd0bca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
 # It is not intended for manual editing.
 [[package]]
 name = "aho-corasick"
-version = "0.7.4"
+version = "0.7.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -54,7 +54,7 @@ dependencies = [
 
 [[package]]
 name = "backtrace"
-version = "0.3.33"
+version = "0.3.34"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -274,7 +274,7 @@ dependencies = [
  "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -422,7 +422,7 @@ name = "error-chain"
 version = "0.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -431,7 +431,7 @@ name = "failure"
 version = "0.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -474,7 +474,7 @@ dependencies = [
  "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -608,7 +608,7 @@ dependencies = [
  "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -631,7 +631,7 @@ dependencies = [
 
 [[package]]
 name = "insta"
-version = "0.9.0"
+version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1098,7 +1098,7 @@ dependencies = [
  "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -1191,7 +1191,7 @@ dependencies = [
  "chalk-rust-ir 0.1.0 (git+https://github.com/rust-lang/chalk.git)",
  "chalk-solve 0.1.0 (git+https://github.com/rust-lang/chalk.git)",
  "ena 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "insta 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "insta 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "once_cell 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1213,7 +1213,7 @@ version = "0.1.0"
 dependencies = [
  "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fst 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "insta 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "insta 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1285,7 +1285,7 @@ dependencies = [
 name = "ra_prof"
 version = "0.1.0"
 dependencies = [
- "backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)",
+ "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "cpuprofiler 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1323,10 +1323,9 @@ dependencies = [
  "ra_parser 0.1.0",
  "ra_rustc_lexer 0.1.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "ra_text_edit 0.1.0",
- "rowan 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rowan 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "smol_str 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "test_utils 0.1.0",
- "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -1550,23 +1549,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "regex"
-version = "1.2.0"
+version = "1.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "regex-syntax"
-version = "0.6.10"
+version = "0.6.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
-]
 
 [[package]]
 name = "relative-path"
@@ -1593,7 +1588,7 @@ dependencies = [
 
 [[package]]
 name = "rowan"
-version = "0.6.1"
+version = "0.6.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1824,7 +1819,7 @@ dependencies = [
  "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1916,11 +1911,6 @@ name = "ucd-trie"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "ucd-util"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
 [[package]]
 name = "unic-char-property"
 version = "0.7.0"
@@ -2023,11 +2013,6 @@ dependencies = [
  "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "utf8-ranges"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
 [[package]]
 name = "uuid"
 version = "0.7.4"
@@ -2117,13 +2102,13 @@ version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [metadata]
-"checksum aho-corasick 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b7aa1ccb7d7ea3f437cf025a2ab1c47cc6c1bc9fc84918ff449def12f5e282"
+"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
 "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
 "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba"
 "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
 "checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b"
 "checksum backtrace 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "346d7644f0b5f9bc73082d3b2236b69a05fd35cce0cfa3724e184e6a5c9e2a2f"
-"checksum backtrace 0.3.33 (registry+https://github.com/rust-lang/crates.io-index)" = "88fb679bc9af8fa639198790a77f52d345fe13656c08b43afa9424c206b731c6"
+"checksum backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)" = "b5164d292487f037ece34ec0de2fcede2faa162f085dd96d2385ab81b12765ba"
 "checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b"
 "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
 "checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80"
@@ -2192,7 +2177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c60da1c9abea75996b70a931bba6c750730399005b61ccd853cee50ef3d0d0c"
 "checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718"
 "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0"
-"checksum insta 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a915d6263f1d68fc9b693058702a3e9f47f4434dec45d4e35e2b66e490f8bc51"
+"checksum insta 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00eef45accbe65bfb859ad16649c6b4bed246768d89493473d9ab6c6a0eb908f"
 "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
 "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
 "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
@@ -2268,12 +2253,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe0df8435ac0c397d467b6cad6d25543d06e8a019ef3f6af3c384597515bd2"
 "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
 "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
-"checksum regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b23da8dfd98a84bd7e08700190a5d9f7d2d38abd4369dd1dae651bc40bfd2cc"
-"checksum regex-syntax 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5485bf1523a9ed51c4964273f22f63f24e31632adb5dad134f488f86a3875c"
+"checksum regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88c3d9193984285d544df4a30c23a4e62ead42edf70a4452ceb76dac1ce05c26"
+"checksum regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f"
 "checksum relative-path 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e7790c7f1cc73d831d28dc5a7deb316a006e7848e6a7f467cdb10a0a9e0fb1c"
 "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
 "checksum ron 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "17f52a24414403f81528b67488cf8edc4eda977d3af1646bb6b106a600ead78f"
-"checksum rowan 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03e34c2e5f01d7fa4ab7e6a49da44f59fb38ffb61e6c9f714deb8e157274c2c7"
+"checksum rowan 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dc2b79612dedc9004083a61448eb669d336d56690aab29fbd7249e8c8ab41d8c"
 "checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af"
 "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8"
 "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
@@ -2309,7 +2294,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
 "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169"
 "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2"
-"checksum ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa9b3b49edd3468c0e6565d85783f51af95212b6fa3986a5500954f00b460874"
 "checksum unic-char-property 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce36d3f7ce754afdbccccf8ff0dd0134e50fb44aaae579f96218856e9e5dbd1e"
 "checksum unic-char-range 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab85fab42ad1b26cafc03bf891f69cb4d6e15f491030e89a0122197baa8ae8"
 "checksum unic-common 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff8d4a7ade929ef7d971e16ced21a8cd56a63869aa6032dfb8cb083cf7d077bf"
@@ -2324,7 +2308,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
 "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
 "checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
-"checksum utf8-ranges 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde"
 "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a"
 "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
 "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml
index 285b3c63a9..1a2f1b47c9 100644
--- a/crates/ra_hir/Cargo.toml
+++ b/crates/ra_hir/Cargo.toml
@@ -27,4 +27,4 @@ chalk-ir = { git = "https://github.com/rust-lang/chalk.git" }
 lalrpop-intern = "0.15.1"
 
 [dev-dependencies]
-insta = "0.9.0"
+insta = "0.10.0"
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs
index 7da2dcdff1..06b7322153 100644
--- a/crates/ra_hir/src/nameres/collector.rs
+++ b/crates/ra_hir/src/nameres/collector.rs
@@ -483,7 +483,7 @@ struct ModCollector<'a, D> {
     module_id: CrateModuleId,
     file_id: HirFileId,
     raw_items: &'a raw::RawItems,
-    parent_module: Option<ParentModule<'a>>,
+    parent_module: Option<&'a Name>,
 }
 
 impl<DB> ModCollector<'_, &'_ mut DefCollector<&'_ DB>>
@@ -508,16 +508,15 @@ where
     fn collect_module(&mut self, module: &raw::ModuleData) {
         match module {
             // inline module, just recurse
-            raw::ModuleData::Definition { name, items, ast_id, attr_path } => {
+            raw::ModuleData::Definition { name, items, ast_id } => {
                 let module_id =
                     self.push_child_module(name.clone(), ast_id.with_file_id(self.file_id), None);
-                let parent_module = ParentModule { name, attr_path: attr_path.as_ref() };
                 ModCollector {
                     def_collector: &mut *self.def_collector,
                     module_id,
                     file_id: self.file_id,
                     raw_items: self.raw_items,
-                    parent_module: Some(parent_module),
+                    parent_module: Some(name),
                 }
                 .collect(&*items);
             }
@@ -531,7 +530,7 @@ where
                     name,
                     is_root,
                     attr_path.as_ref(),
-                    self.parent_module.as_ref(),
+                    self.parent_module,
                 ) {
                     Ok(file_id) => {
                         let module_id = self.push_child_module(name.clone(), ast_id, Some(file_id));
@@ -648,7 +647,7 @@ fn resolve_submodule(
     name: &Name,
     is_root: bool,
     attr_path: Option<&SmolStr>,
-    parent_module: Option<&ParentModule>,
+    parent_module: Option<&Name>,
 ) -> Result<FileId, RelativePathBuf> {
     let file_id = file_id.original_file(db);
     let source_root_id = db.file_source_root(file_id);
@@ -658,49 +657,20 @@ fn resolve_submodule(
     let mod_name = path.file_stem().unwrap_or("unknown");
 
     let resolve_mode = match (attr_path.filter(|p| !p.is_empty()), parent_module) {
-        (Some(file_path), Some(parent_module)) => {
+        (Some(file_path), Some(parent_name)) => {
             let file_path = normalize_attribute_path(file_path);
-            match parent_module.attribute_path() {
-                Some(parent_module_attr_path) => {
-                    let path = dir_path
-                        .join(format!(
-                            "{}/{}",
-                            normalize_attribute_path(parent_module_attr_path),
-                            file_path
-                        ))
-                        .normalize();
-                    ResolutionMode::InlineModuleWithAttributePath(
-                        InsideInlineModuleMode::WithAttributePath(path),
-                    )
-                }
-                None => {
-                    let path =
-                        dir_path.join(format!("{}/{}", parent_module.name, file_path)).normalize();
-                    ResolutionMode::InsideInlineModule(InsideInlineModuleMode::WithAttributePath(
-                        path,
-                    ))
-                }
-            }
+            let path = dir_path.join(format!("{}/{}", parent_name, file_path)).normalize();
+            ResolutionMode::InsideInlineModule(InsideInlineModuleMode::WithAttributePath(path))
         }
-        (None, Some(parent_module)) => match parent_module.attribute_path() {
-            Some(parent_module_attr_path) => {
-                let path = dir_path.join(format!(
-                    "{}/{}.rs",
-                    normalize_attribute_path(parent_module_attr_path),
-                    name
-                ));
-                ResolutionMode::InlineModuleWithAttributePath(InsideInlineModuleMode::File(path))
-            }
-            None => {
-                let path = dir_path.join(format!("{}/{}.rs", parent_module.name, name));
-                ResolutionMode::InsideInlineModule(InsideInlineModuleMode::File(path))
-            }
-        },
         (Some(file_path), None) => {
             let file_path = normalize_attribute_path(file_path);
             let path = dir_path.join(file_path.as_ref()).normalize();
             ResolutionMode::OutOfLine(OutOfLineMode::WithAttributePath(path))
         }
+        (None, Some(parent_name)) => {
+            let path = dir_path.join(format!("{}/{}.rs", parent_name, name));
+            ResolutionMode::InsideInlineModule(InsideInlineModuleMode::File(path))
+        }
         _ => {
             let is_dir_owner = is_root || mod_name == "mod";
             if is_dir_owner {
@@ -773,7 +743,6 @@ impl InsideInlineModuleMode {
 enum ResolutionMode {
     OutOfLine(OutOfLineMode),
     InsideInlineModule(InsideInlineModuleMode),
-    InlineModuleWithAttributePath(InsideInlineModuleMode),
 }
 
 impl ResolutionMode {
@@ -783,7 +752,6 @@ impl ResolutionMode {
         match self {
             OutOfLine(mode) => mode.resolve(source_root),
             InsideInlineModule(mode) => mode.resolve(source_root),
-            InlineModuleWithAttributePath(mode) => mode.resolve(source_root),
         }
     }
 }
@@ -805,17 +773,6 @@ fn resolve_find_result(
     }
 }
 
-struct ParentModule<'a> {
-    name: &'a Name,
-    attr_path: Option<&'a SmolStr>,
-}
-
-impl<'a> ParentModule<'a> {
-    pub fn attribute_path(&self) -> Option<&SmolStr> {
-        self.attr_path.filter(|p| !p.is_empty())
-    }
-}
-
 #[cfg(test)]
 mod tests {
     use ra_db::SourceDatabase;
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs
index 584e15e290..8517f3c430 100644
--- a/crates/ra_hir/src/nameres/raw.rs
+++ b/crates/ra_hir/src/nameres/raw.rs
@@ -130,17 +130,8 @@ impl_arena_id!(Module);
 
 #[derive(Debug, PartialEq, Eq)]
 pub(super) enum ModuleData {
-    Declaration {
-        name: Name,
-        ast_id: FileAstId<ast::Module>,
-        attr_path: Option<SmolStr>,
-    },
-    Definition {
-        name: Name,
-        ast_id: FileAstId<ast::Module>,
-        items: Vec<RawItem>,
-        attr_path: Option<SmolStr>,
-    },
+    Declaration { name: Name, ast_id: FileAstId<ast::Module>, attr_path: Option<SmolStr> },
+    Definition { name: Name, ast_id: FileAstId<ast::Module>, items: Vec<RawItem> },
 }
 
 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@@ -265,9 +256,9 @@ impl RawItemsCollector {
             None => return,
         };
 
+        let attr_path = extract_mod_path_attribute(&module);
         let ast_id = self.source_ast_id_map.ast_id(&module);
         if module.has_semi() {
-            let attr_path = extract_mod_path_attribute(&module);
             let item =
                 self.raw_items.modules.alloc(ModuleData::Declaration { name, ast_id, attr_path });
             self.push_item(current_module, RawItem::Module(item));
@@ -275,12 +266,10 @@ impl RawItemsCollector {
         }
 
         if let Some(item_list) = module.item_list() {
-            let attr_path = extract_mod_path_attribute(&module);
             let item = self.raw_items.modules.alloc(ModuleData::Definition {
                 name,
                 ast_id,
                 items: Vec::new(),
-                attr_path,
             });
             self.process_module(Some(item), item_list);
             self.push_item(current_module, RawItem::Module(item));
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml
index dd11ec0f6e..a7dc0b63ac 100644
--- a/crates/ra_ide_api/Cargo.toml
+++ b/crates/ra_ide_api/Cargo.toml
@@ -27,7 +27,7 @@ test_utils = { path = "../test_utils" }
 ra_assists = { path = "../ra_assists" }
 
 [dev-dependencies]
-insta = "0.9.0"
+insta = "0.10.0"
 
 [dev-dependencies.proptest]
 version = "0.9.0"
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs
index 9d6d0133f9..6603ff34d4 100644
--- a/crates/ra_mbe/src/subtree_source.rs
+++ b/crates/ra_mbe/src/subtree_source.rs
@@ -1,6 +1,6 @@
 use ra_parser::{Token, TokenSource};
 use ra_syntax::{classify_literal, SmolStr, SyntaxKind, SyntaxKind::*, T};
-use std::cell::{Cell, Ref, RefCell};
+use std::cell::{Cell, RefCell};
 use tt::buffer::{Cursor, TokenBuffer};
 
 #[derive(Debug, Clone, Eq, PartialEq)]
@@ -20,8 +20,8 @@ impl<'a> SubtreeTokenSource<'a> {
     // Helper function used in test
     #[cfg(test)]
     pub fn text(&self) -> SmolStr {
-        match *self.get(self.curr.1) {
-            Some(ref tt) => tt.text.clone(),
+        match self.get(self.curr.1) {
+            Some(tt) => tt.text,
             _ => SmolStr::new(""),
         }
     }
@@ -41,46 +41,44 @@ impl<'a> SubtreeTokenSource<'a> {
     }
 
     fn mk_token(&self, pos: usize) -> Token {
-        match *self.get(pos) {
-            Some(ref tt) => Token { kind: tt.kind, is_jointed_to_next: tt.is_joint_to_next },
+        match self.get(pos) {
+            Some(tt) => Token { kind: tt.kind, is_jointed_to_next: tt.is_joint_to_next },
             None => Token { kind: EOF, is_jointed_to_next: false },
         }
     }
 
-    fn get(&self, pos: usize) -> Ref<Option<TtToken>> {
-        if pos < self.cached.borrow().len() {
-            return Ref::map(self.cached.borrow(), |c| &c[pos]);
+    fn get(&self, pos: usize) -> Option<TtToken> {
+        let mut cached = self.cached.borrow_mut();
+        if pos < cached.len() {
+            return cached[pos].clone();
         }
 
-        {
-            let mut cached = self.cached.borrow_mut();
-            while pos >= cached.len() {
-                let cursor = self.cached_cursor.get();
-                if cursor.eof() {
-                    cached.push(None);
-                    continue;
-                }
+        while pos >= cached.len() {
+            let cursor = self.cached_cursor.get();
+            if cursor.eof() {
+                cached.push(None);
+                continue;
+            }
 
-                match cursor.token_tree() {
-                    Some(tt::TokenTree::Leaf(leaf)) => {
-                        cached.push(Some(convert_leaf(&leaf)));
+            match cursor.token_tree() {
+                Some(tt::TokenTree::Leaf(leaf)) => {
+                    cached.push(Some(convert_leaf(&leaf)));
+                    self.cached_cursor.set(cursor.bump());
+                }
+                Some(tt::TokenTree::Subtree(subtree)) => {
+                    self.cached_cursor.set(cursor.subtree().unwrap());
+                    cached.push(Some(convert_delim(subtree.delimiter, false)));
+                }
+                None => {
+                    if let Some(subtree) = cursor.end() {
+                        cached.push(Some(convert_delim(subtree.delimiter, true)));
                         self.cached_cursor.set(cursor.bump());
                     }
-                    Some(tt::TokenTree::Subtree(subtree)) => {
-                        self.cached_cursor.set(cursor.subtree().unwrap());
-                        cached.push(Some(convert_delim(subtree.delimiter, false)));
-                    }
-                    None => {
-                        if let Some(subtree) = cursor.end() {
-                            cached.push(Some(convert_delim(subtree.delimiter, true)));
-                            self.cached_cursor.set(cursor.bump());
-                        }
-                    }
                 }
             }
         }
 
-        Ref::map(self.cached.borrow(), |c| &c[pos])
+        cached[pos].clone()
     }
 }
 
@@ -105,8 +103,8 @@ impl<'a> TokenSource for SubtreeTokenSource<'a> {
 
     /// Is the current token a specified keyword?
     fn is_keyword(&self, kw: &str) -> bool {
-        match *self.get(self.curr.1) {
-            Some(ref t) => t.text == *kw,
+        match self.get(self.curr.1) {
+            Some(t) => t.text == *kw,
             _ => false,
         }
     }
diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml
index bc1c88070c..5f85858786 100644
--- a/crates/ra_syntax/Cargo.toml
+++ b/crates/ra_syntax/Cargo.toml
@@ -8,7 +8,6 @@ description = "Comment and whitespace preserving parser for the Rust langauge"
 repository = "https://github.com/rust-analyzer/rust-analyzer"
 
 [dependencies]
-unicode-xid = "0.1.0"
 itertools = "0.8.0"
 rowan = "0.6.1"
 ra_rustc_lexer = { version = "0.1.0-pre.2" }
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 6f04896172..c5746d98d8 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -138,52 +138,6 @@ fn test_doc_comment_preserves_newlines() {
     assert_eq!("this\nis\nmod\nfoo", module.doc_comment_text().unwrap());
 }
 
-#[test]
-fn test_doc_comment_single_line_block_strips_suffix() {
-    let file = SourceFile::parse(
-        r#"
-        /** this is mod foo*/
-        mod foo {}
-        "#,
-    )
-    .ok()
-    .unwrap();
-    let module = file.syntax().descendants().find_map(Module::cast).unwrap();
-    assert_eq!("this is mod foo", module.doc_comment_text().unwrap());
-}
-
-#[test]
-fn test_doc_comment_single_line_block_strips_suffix_whitespace() {
-    let file = SourceFile::parse(
-        r#"
-        /** this is mod foo */
-        mod foo {}
-        "#,
-    )
-    .ok()
-    .unwrap();
-    let module = file.syntax().descendants().find_map(Module::cast).unwrap();
-    assert_eq!("this is mod foo", module.doc_comment_text().unwrap());
-}
-
-#[test]
-fn test_doc_comment_multi_line_block_strips_suffix() {
-    let file = SourceFile::parse(
-        r#"
-        /**
-        this
-        is
-        mod foo
-        */
-        mod foo {}
-        "#,
-    )
-    .ok()
-    .unwrap();
-    let module = file.syntax().descendants().find_map(Module::cast).unwrap();
-    assert_eq!("        this\n        is\n        mod foo", module.doc_comment_text().unwrap());
-}
-
 #[test]
 fn test_where_predicates() {
     fn assert_bound(text: &str, bound: Option<TypeBound>) {
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs
index 1b9a2b20cf..6ed1b5213d 100644
--- a/crates/ra_syntax/src/ast/traits.rs
+++ b/crates/ra_syntax/src/ast/traits.rs
@@ -115,8 +115,8 @@ pub trait DocCommentsOwner: AstNode {
     }
 
     /// Returns the textual content of a doc comment block as a single string.
-    /// That is, strips leading `///` (+ optional 1 character of whitespace),
-    /// trailing `*/`, trailing whitespace and then joins the lines.
+    /// That is, strips leading `///` (+ optional 1 character of whitespace)
+    /// and joins lines.
     fn doc_comment_text(&self) -> Option<String> {
         let mut has_comments = false;
         let docs = self
@@ -136,13 +136,7 @@ pub trait DocCommentsOwner: AstNode {
                         prefix_len
                     };
 
-                let end = if comment.kind().shape.is_block() && line.ends_with("*/") {
-                    line.len() - 2
-                } else {
-                    line.len()
-                };
-
-                line[pos..end].trim_end().to_owned()
+                line[pos..].to_owned()
             })
             .join("\n");
 


Test patch:
diff --git a/crates/ra_hir/src/nameres/tests/mods.rs b/crates/ra_hir/src/nameres/tests/mods.rs
index 6dd18df1a9..3827281499 100644
--- a/crates/ra_hir/src/nameres/tests/mods.rs
+++ b/crates/ra_hir/src/nameres/tests/mods.rs
@@ -336,7 +336,9 @@ fn module_resolution_explicit_path_mod_rs_with_win_separator() {
     "###);
 }
 
+// FIXME: issue #1529. not support out-of-line modules inside inline.
 #[test]
+#[ignore]
 fn module_resolution_decl_inside_inline_module_with_path_attribute() {
     let map = def_map_with_crate_graph(
         r###"
@@ -395,7 +397,9 @@ fn module_resolution_decl_inside_inline_module() {
     "###);
 }
 
+// FIXME: issue #1529. not support out-of-line modules inside inline.
 #[test]
+#[ignore]
 fn module_resolution_decl_inside_inline_module_2_with_path_attribute() {
     let map = def_map_with_crate_graph(
         r###"
@@ -425,7 +429,9 @@ fn module_resolution_decl_inside_inline_module_2_with_path_attribute() {
     "###);
 }
 
+// FIXME: issue #1529. not support out-of-line modules inside inline.
 #[test]
+#[ignore]
 fn module_resolution_decl_inside_inline_module_3() {
     let map = def_map_with_crate_graph(
         r###"
@@ -456,7 +462,9 @@ fn module_resolution_decl_inside_inline_module_3() {
     "###);
 }
 
+// FIXME: issue #1529. not support out-of-line modules inside inline.
 #[test]
+#[ignore]
 fn module_resolution_decl_inside_inline_module_empty_path() {
     let map = def_map_with_crate_graph(
         r###"
@@ -467,7 +475,7 @@ fn module_resolution_decl_inside_inline_module_empty_path() {
             mod bar;
         }
 
-        //- /foo/users.rs
+        //- /users.rs
         pub struct Baz;
         "###,
         crate_graph! {
@@ -512,7 +520,9 @@ fn module_resolution_decl_empty_path() {
     "###);
 }
 
+// FIXME: issue #1529. not support out-of-line modules inside inline.
 #[test]
+#[ignore]
 fn module_resolution_decl_inside_inline_module_relative_path() {
     let map = def_map_with_crate_graph(
         r###"
@@ -650,7 +660,9 @@ fn module_resolution_decl_inside_inline_module_in_non_crate_root() {
     "###);
 }
 
+// FIXME: issue #1529. not support out-of-line modules inside inline.
 #[test]
+#[ignore]
 fn module_resolution_decl_inside_inline_module_in_non_crate_root_2() {
     let map = def_map_with_crate_graph(
         r###"