aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir_ty/src/display.rs4
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs6
-rw-r--r--crates/ra_hir_ty/src/lib.rs2
-rw-r--r--crates/ra_hir_ty/src/lower.rs3
-rw-r--r--crates/ra_syntax/src/ast/edit.rs8
-rw-r--r--crates/test_utils/src/fixture.rs2
-rw-r--r--docs/dev/README.md2
-rw-r--r--editors/code/tests/unit/index.ts4
-rw-r--r--editors/code/tsconfig.json2
9 files changed, 12 insertions, 21 deletions
diff --git a/crates/ra_hir_ty/src/display.rs b/crates/ra_hir_ty/src/display.rs
index 23cea1a2a..ac68c5661 100644
--- a/crates/ra_hir_ty/src/display.rs
+++ b/crates/ra_hir_ty/src/display.rs
@@ -369,7 +369,7 @@ impl HirDisplay for ApplicationTy {
369 let data = (*datas) 369 let data = (*datas)
370 .as_ref() 370 .as_ref()
371 .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); 371 .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone());
372 data.clone().subst(&self.parameters) 372 data.subst(&self.parameters)
373 } 373 }
374 }; 374 };
375 write!(f, "impl ")?; 375 write!(f, "impl ")?;
@@ -456,7 +456,7 @@ impl HirDisplay for Ty {
456 let data = (*datas) 456 let data = (*datas)
457 .as_ref() 457 .as_ref()
458 .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); 458 .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone());
459 data.clone().subst(&opaque_ty.parameters) 459 data.subst(&opaque_ty.parameters)
460 } 460 }
461 }; 461 };
462 write!(f, "impl ")?; 462 write!(f, "impl ")?;
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs
index 22884522a..06baac2a9 100644
--- a/crates/ra_hir_ty/src/infer/expr.rs
+++ b/crates/ra_hir_ty/src/infer/expr.rs
@@ -85,10 +85,8 @@ impl<'a> InferenceContext<'a> {
85 ctor: TypeCtor::Tuple { cardinality: num_args as u16 }, 85 ctor: TypeCtor::Tuple { cardinality: num_args as u16 },
86 parameters, 86 parameters,
87 }); 87 });
88 let substs = Substs::build_for_generics(&generic_params) 88 let substs =
89 .push(ty.clone()) 89 Substs::build_for_generics(&generic_params).push(ty.clone()).push(arg_ty).build();
90 .push(arg_ty.clone())
91 .build();
92 90
93 let trait_env = Arc::clone(&self.trait_env); 91 let trait_env = Arc::clone(&self.trait_env);
94 let implements_fn_trait = 92 let implements_fn_trait =
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index 7f3f5e771..c12bed4af 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -891,7 +891,7 @@ impl Ty {
891 let data = (*it) 891 let data = (*it)
892 .as_ref() 892 .as_ref()
893 .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); 893 .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone());
894 data.clone().subst(&opaque_ty.parameters) 894 data.subst(&opaque_ty.parameters)
895 }) 895 })
896 } 896 }
897 }; 897 };
diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs
index 0fa0f7908..3af8d55a1 100644
--- a/crates/ra_hir_ty/src/lower.rs
+++ b/crates/ra_hir_ty/src/lower.rs
@@ -720,8 +720,7 @@ fn assoc_type_bindings_from_type_bound<'a>(
720 None => return SmallVec::<[GenericPredicate; 1]>::new(), 720 None => return SmallVec::<[GenericPredicate; 1]>::new(),
721 Some(t) => t, 721 Some(t) => t,
722 }; 722 };
723 let projection_ty = 723 let projection_ty = ProjectionTy { associated_ty, parameters: super_trait_ref.substs };
724 ProjectionTy { associated_ty, parameters: super_trait_ref.substs.clone() };
725 let mut preds = SmallVec::with_capacity( 724 let mut preds = SmallVec::with_capacity(
726 binding.type_ref.as_ref().map_or(0, |_| 1) + binding.bounds.len(), 725 binding.type_ref.as_ref().map_or(0, |_| 1) + binding.bounds.len(),
727 ); 726 );
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 2ef173a03..940c30c7f 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -299,12 +299,8 @@ impl ast::UseTree {
299 Some(it) => it, 299 Some(it) => it,
300 None => return self.clone(), 300 None => return self.clone(),
301 }; 301 };
302 let use_tree = make::use_tree( 302 let use_tree =
303 suffix.clone(), 303 make::use_tree(suffix, self.use_tree_list(), self.alias(), self.star_token().is_some());
304 self.use_tree_list(),
305 self.alias(),
306 self.star_token().is_some(),
307 );
308 let nested = make::use_tree_list(iter::once(use_tree)); 304 let nested = make::use_tree_list(iter::once(use_tree));
309 return make::use_tree(prefix.clone(), Some(nested), None, false); 305 return make::use_tree(prefix.clone(), Some(nested), None, false);
310 306
diff --git a/crates/test_utils/src/fixture.rs b/crates/test_utils/src/fixture.rs
index fad8f7e2c..ed764046b 100644
--- a/crates/test_utils/src/fixture.rs
+++ b/crates/test_utils/src/fixture.rs
@@ -62,7 +62,7 @@ impl Fixture {
62 let components = meta.split_ascii_whitespace().collect::<Vec<_>>(); 62 let components = meta.split_ascii_whitespace().collect::<Vec<_>>();
63 63
64 let path = components[0].to_string(); 64 let path = components[0].to_string();
65 assert!(path.starts_with("/")); 65 assert!(path.starts_with('/'));
66 66
67 let mut krate = None; 67 let mut krate = None;
68 let mut deps = Vec::new(); 68 let mut deps = Vec::new();
diff --git a/docs/dev/README.md b/docs/dev/README.md
index f87462400..3af01cd6b 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -314,7 +314,7 @@ We don't have specific rules around git history hygiene.
314Maintaining clean git history is encouraged, but not enforced. 314Maintaining clean git history is encouraged, but not enforced.
315We use rebase workflow, it's OK to rewrite history during PR review process. 315We use rebase workflow, it's OK to rewrite history during PR review process.
316 316
317Avoid @mentioning people in commit messages, as such messages create a lot of duplicate notification traffic during rebases. 317Avoid @mentioning people in commit messages and pull request descriptions (they are added to commit message by bors), as such messages create a lot of duplicate notification traffic during rebases.
318 318
319# Architecture Invariants 319# Architecture Invariants
320 320
diff --git a/editors/code/tests/unit/index.ts b/editors/code/tests/unit/index.ts
index 5165720b4..b7d8d2144 100644
--- a/editors/code/tests/unit/index.ts
+++ b/editors/code/tests/unit/index.ts
@@ -1,6 +1,6 @@
1import * as path from 'path'; 1import * as path from 'path';
2import Mocha from 'mocha'; 2import * as Mocha from 'mocha';
3import glob from 'glob'; 3import * as glob from 'glob';
4 4
5export function run(): Promise<void> { 5export function run(): Promise<void> {
6 // Create the mocha test 6 // Create the mocha test
diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json
index 32d1a865f..c9f348241 100644
--- a/editors/code/tsconfig.json
+++ b/editors/code/tsconfig.json
@@ -6,8 +6,6 @@
6 "lib": [ 6 "lib": [
7 "es2019" 7 "es2019"
8 ], 8 ],
9 "esModuleInterop": true,
10 "allowSyntheticDefaultImports": true,
11 "sourceMap": true, 9 "sourceMap": true,
12 "rootDir": ".", 10 "rootDir": ".",
13 "strict": true, 11 "strict": true,