Skip to content

Commit 2566e06

Browse files
Merge commit '8e38833c3674c1be7d81c6069c62e6ed52b18b27' into HEAD
2 parents 9d2cb42 + 8e38833 commit 2566e06

File tree

4 files changed

+95
-10
lines changed

4 files changed

+95
-10
lines changed

.github/workflows/release.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
FETCH_DEPTH: 0 # pull in the tags for the version string
1919
MACOSX_DEPLOYMENT_TARGET: 10.15
2020
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
21+
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
2122

2223
jobs:
2324
dist:
@@ -36,6 +37,9 @@ jobs:
3637
- os: ubuntu-18.04
3738
target: aarch64-unknown-linux-gnu
3839
code-target: linux-arm64
40+
- os: ubuntu-18.04
41+
target: arm-unknown-linux-gnueabihf
42+
code-target: linux-armhf
3943
- os: macos-11
4044
target: x86_64-apple-darwin
4145
code-target: darwin-x64
@@ -67,13 +71,17 @@ jobs:
6771
node-version: 14.x
6872

6973
- name: Update apt repositories
70-
if: matrix.target == 'aarch64-unknown-linux-gnu'
74+
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf'
7175
run: sudo apt-get update
7276

73-
- name: Install target toolchain
77+
- name: Install AArch64 target toolchain
7478
if: matrix.target == 'aarch64-unknown-linux-gnu'
7579
run: sudo apt-get install gcc-aarch64-linux-gnu
7680

81+
- name: Install ARM target toolchain
82+
if: matrix.target == 'arm-unknown-linux-gnueabihf'
83+
run: sudo apt-get install gcc-arm-linux-gnueabihf
84+
7785
- name: Dist
7886
run: cargo xtask dist --client-patch-version ${{ github.run_number }}
7987

@@ -204,6 +212,10 @@ jobs:
204212
with:
205213
name: dist-aarch64-unknown-linux-gnu
206214
path: dist
215+
- uses: actions/download-artifact@v1
216+
with:
217+
name: dist-arm-unknown-linux-gnueabihf
218+
path: dist
207219
- uses: actions/download-artifact@v1
208220
with:
209221
name: dist-x86_64-pc-windows-msvc

crates/hir-def/src/import_map.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ fn collect_import_map(db: &dyn DefDatabase, krate: CrateId) -> ImportMap {
167167

168168
let visible_items = mod_data.scope.entries().filter_map(|(name, per_ns)| {
169169
let per_ns = per_ns.filter_visibility(|vis| vis == Visibility::Public);
170-
if per_ns.is_none() { None } else { Some((name, per_ns)) }
170+
if per_ns.is_none() {
171+
None
172+
} else {
173+
Some((name, per_ns))
174+
}
171175
});
172176

173177
for (name, per_ns) in visible_items {

crates/hir-def/src/nameres.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,11 @@ impl DefMap {
349349

350350
pub(crate) fn crate_root(&self, db: &dyn DefDatabase) -> ModuleId {
351351
self.with_ancestor_maps(db, self.root, &mut |def_map, _module| {
352-
if def_map.block.is_none() { Some(def_map.module_id(def_map.root)) } else { None }
352+
if def_map.block.is_none() {
353+
Some(def_map.module_id(def_map.root))
354+
} else {
355+
None
356+
}
353357
})
354358
.expect("DefMap chain without root")
355359
}

crates/ide/src/runnables.rs

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,13 @@ pub(crate) fn runnable_impl(
373373
let adt_name = ty.as_adt()?.name(sema.db);
374374
let mut ty_args = ty.type_arguments().peekable();
375375
let params = if ty_args.peek().is_some() {
376-
format!("<{}>", ty_args.format_with(", ", |ty, cb| cb(&ty.display(sema.db))))
376+
format!("<{}>", ty_args.format_with(",", |ty, cb| cb(&ty.display(sema.db))))
377377
} else {
378378
String::new()
379379
};
380-
let test_id = TestId::Path(format!("{}{}", adt_name, params));
380+
let mut test_id = format!("{}{}", adt_name, params);
381+
test_id.retain(|c| c != ' ');
382+
let test_id = TestId::Path(test_id);
381383

382384
Some(Runnable { use_name_in_title: false, nav, kind: RunnableKind::DocTest { test_id }, cfg })
383385
}
@@ -441,10 +443,11 @@ fn module_def_doctest(db: &RootDatabase, def: Definition) -> Option<Runnable> {
441443
format_to!(
442444
path,
443445
"<{}>",
444-
ty_args.format_with(", ", |ty, cb| cb(&ty.display(db)))
446+
ty_args.format_with(",", |ty, cb| cb(&ty.display(db)))
445447
);
446448
}
447449
format_to!(path, "::{}", def_name);
450+
path.retain(|c| c != ' ');
448451
return Some(path);
449452
}
450453
}
@@ -2067,13 +2070,23 @@ mod tests {
20672070
$0
20682071
struct Foo<T, U>;
20692072
2073+
/// ```
2074+
/// ```
20702075
impl<T, U> Foo<T, U> {
20712076
/// ```rust
20722077
/// ````
20732078
fn t() {}
20742079
}
2080+
2081+
/// ```
2082+
/// ```
2083+
impl Foo<Foo<(), ()>, ()> {
2084+
/// ```
2085+
/// ```
2086+
fn t() {}
2087+
}
20752088
"#,
2076-
&[DocTest],
2089+
&[DocTest, DocTest, DocTest, DocTest],
20772090
expect![[r#"
20782091
[
20792092
Runnable {
@@ -2082,12 +2095,64 @@ impl<T, U> Foo<T, U> {
20822095
file_id: FileId(
20832096
0,
20842097
),
2085-
full_range: 47..85,
2098+
full_range: 20..103,
2099+
focus_range: 47..56,
2100+
name: "impl",
2101+
kind: Impl,
2102+
},
2103+
kind: DocTest {
2104+
test_id: Path(
2105+
"Foo<T,U>",
2106+
),
2107+
},
2108+
cfg: None,
2109+
},
2110+
Runnable {
2111+
use_name_in_title: false,
2112+
nav: NavigationTarget {
2113+
file_id: FileId(
2114+
0,
2115+
),
2116+
full_range: 63..101,
2117+
name: "t",
2118+
},
2119+
kind: DocTest {
2120+
test_id: Path(
2121+
"Foo<T,U>::t",
2122+
),
2123+
},
2124+
cfg: None,
2125+
},
2126+
Runnable {
2127+
use_name_in_title: false,
2128+
nav: NavigationTarget {
2129+
file_id: FileId(
2130+
0,
2131+
),
2132+
full_range: 105..188,
2133+
focus_range: 126..146,
2134+
name: "impl",
2135+
kind: Impl,
2136+
},
2137+
kind: DocTest {
2138+
test_id: Path(
2139+
"Foo<Foo<(),()>,()>",
2140+
),
2141+
},
2142+
cfg: None,
2143+
},
2144+
Runnable {
2145+
use_name_in_title: false,
2146+
nav: NavigationTarget {
2147+
file_id: FileId(
2148+
0,
2149+
),
2150+
full_range: 153..186,
20862151
name: "t",
20872152
},
20882153
kind: DocTest {
20892154
test_id: Path(
2090-
"Foo<T, U>::t",
2155+
"Foo<Foo<(),()>,()>::t",
20912156
),
20922157
},
20932158
cfg: None,

0 commit comments

Comments
 (0)