Skip to content

Commit c9221bc

Browse files
committed
normalize paths
1 parent c94dc77 commit c9221bc

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
- Fix reexport path when "%s" inside "dirivedFrom"
1011
- Force using rust edition 2021 in CI
1112
- Added lifetime ellision for `FieldWriter` where the explicit lifetimes are not necessary, which
1213
fixes the `clippy::needless_lifetimes` warning on rustc 1.84

src/util.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,18 @@ pub fn block_path_to_ty(
295295
) -> TypePath {
296296
let mut path = config.settings.crate_path.clone().unwrap_or_default().0;
297297
path.segments.push(path_segment(ident(
298-
&bpath.peripheral,
298+
&bpath.peripheral.remove_dim(),
299299
config,
300300
"peripheral_mod",
301301
span,
302302
)));
303303
for ps in &bpath.path {
304-
path.segments
305-
.push(path_segment(ident(ps, config, "cluster_mod", span)));
304+
path.segments.push(path_segment(ident(
305+
&ps.remove_dim(),
306+
config,
307+
"cluster_mod",
308+
span,
309+
)));
306310
}
307311
TypePath { qself: None, path }
308312
}
@@ -314,7 +318,7 @@ pub fn register_path_to_ty(
314318
) -> TypePath {
315319
let mut p = block_path_to_ty(&rpath.block, config, span);
316320
p.path.segments.push(path_segment(ident(
317-
&rpath.name,
321+
&rpath.name.remove_dim(),
318322
config,
319323
"register_mod",
320324
span,

0 commit comments

Comments
 (0)