Skip to content

Commit 5e9e7b9

Browse files
committed
Add spaces around the :: in a use of $crate:: to not hit regex for crate::
Hacks on top of hacks, to make the 0.2 branch deal with old tooling.
1 parent 5343f4e commit 5e9e7b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/macros.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ macro_rules! c_enum {
268268

269269
// Use a specific type if provided, otherwise default to `c_uint`
270270
(@ty $repr:ty) => { $repr };
271-
(@ty) => { $crate::c_uint };
271+
// This has a space after `$crate` to avoid matching the regex for `crate::`.
272+
(@ty) => { $crate :: c_uint };
272273
}
273274

274275
// This is a pretty horrible hack to allow us to conditionally mark some functions as 'const',

0 commit comments

Comments
 (0)