Skip to content

Commit 06dc05c

Browse files
committed
c-m-rt: fix macro hygiene, set to edition 2018
1 parent 966b99d commit 06dc05c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cortex-m-rt/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ repository = "https://github.com/rust-embedded/cortex-m"
1515
version = "0.7.1"
1616
autoexamples = true
1717
links = "cortex-m-rt" # Prevent multiple versions of cortex-m-rt being linked
18+
edition = "2018"
1819

1920
[dependencies]
2021
cortex-m-rt-macros = { path = "macros", version = "=0.7.0" }

cortex-m-rt/macros/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
174174
Exception::Other => {
175175
quote! {
176176
const _: () = {
177-
let _ = cortex_m_rt::Exception::#ident;
177+
let _ = ::cortex_m_rt::Exception::#ident;
178178
};
179179
}
180180
}
@@ -328,7 +328,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
328328
f.block.stmts = iter::once(
329329
syn::parse2(quote! {{
330330
// check that this exception actually exists
331-
cortex_m_rt::exception::#ident;
331+
::cortex_m_rt::exception::#ident;
332332
}})
333333
.unwrap(),
334334
)

0 commit comments

Comments
 (0)