Skip to content

Commit 4613497

Browse files
committed
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into fix_4202
2 parents 19e2888 + 89e1f97 commit 4613497

File tree

313 files changed

+13661
-11706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+13661
-11706
lines changed

.github/workflows/release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
with:
4040
toolchain: stable
4141
profile: minimal
42-
target: x86_64-unknown-linux-musl
4342
override: true
4443

4544
- name: Install Nodejs

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"outFiles": [
4242
"${workspaceFolder}/editors/code/out/**/*.js"
4343
],
44-
"preLaunchTask": "Build Extension",
44+
"preLaunchTask": "Build Server and Extension",
4545
"skipFiles": [
4646
"<node_internals>/**/*.js"
4747
],
@@ -62,7 +62,7 @@
6262
"outFiles": [
6363
"${workspaceFolder}/editors/code/out/**/*.js"
6464
],
65-
"preLaunchTask": "Build Extension",
65+
"preLaunchTask": "Build Server (Release) and Extension",
6666
"skipFiles": [
6767
"<node_internals>/**/*.js"
6868
],

.vscode/tasks.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Build Extension",
7+
"label": "Build Extension in Background",
88
"group": "build",
99
"type": "npm",
1010
"script": "watch",
@@ -15,12 +15,41 @@
1515
},
1616
"isBackground": true,
1717
},
18+
{
19+
"label": "Build Extension",
20+
"group": "build",
21+
"type": "npm",
22+
"script": "build",
23+
"path": "editors/code/",
24+
"problemMatcher": {
25+
"base": "$tsc",
26+
"fileLocation": ["relative", "${workspaceFolder}/editors/code/"]
27+
},
28+
},
1829
{
1930
"label": "Build Server",
2031
"group": "build",
2132
"type": "shell",
2233
"command": "cargo build --package rust-analyzer",
2334
"problemMatcher": "$rustc"
2435
},
36+
{
37+
"label": "Build Server (Release)",
38+
"group": "build",
39+
"type": "shell",
40+
"command": "cargo build --release --package rust-analyzer",
41+
"problemMatcher": "$rustc"
42+
},
43+
44+
{
45+
"label": "Build Server and Extension",
46+
"dependsOn": ["Build Server", "Build Extension"],
47+
"problemMatcher": "$rustc"
48+
},
49+
{
50+
"label": "Build Server (Release) and Extension",
51+
"dependsOn": ["Build Server (Release)", "Build Extension"],
52+
"problemMatcher": "$rustc"
53+
}
2554
]
2655
}

Cargo.lock

Lines changed: 54 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ra_assists/src/ast_transform.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ impl<'a> SubstituteTypeParams<'a> {
8585
ast::TypeRef::PathType(path_type) => path_type.path()?,
8686
_ => return None,
8787
};
88+
// FIXME: use `hir::Path::from_src` instead.
8889
let path = hir::Path::from_ast(path)?;
8990
let resolution = self.source_scope.resolve_hir_path(&path)?;
9091
match resolution {
@@ -128,6 +129,7 @@ impl<'a> QualifyPaths<'a> {
128129
// don't try to qualify `Fn(Foo) -> Bar` paths, they are in prelude anyway
129130
return None;
130131
}
132+
// FIXME: use `hir::Path::from_src` instead.
131133
let hir_path = hir::Path::from_ast(p.clone());
132134
let resolution = self.source_scope.resolve_hir_path(&hir_path?)?;
133135
match resolution {

crates/ra_assists/src/doc_tests/generated.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ trait Trait<T> {
180180
}
181181
182182
impl Trait<u32> for () {
183-
fn foo(&self) -> u32 { todo!() }
183+
fn foo(&self) -> u32 {
184+
todo!()
185+
}
184186
185187
}
186188
"#####,
@@ -726,3 +728,22 @@ use std::{collections::HashMap};
726728
"#####,
727729
)
728730
}
731+
732+
#[test]
733+
fn doctest_unwrap_block() {
734+
check(
735+
"unwrap_block",
736+
r#####"
737+
fn foo() {
738+
if true {<|>
739+
println!("foo");
740+
}
741+
}
742+
"#####,
743+
r#####"
744+
fn foo() {
745+
println!("foo");
746+
}
747+
"#####,
748+
)
749+
}

0 commit comments

Comments
 (0)