Skip to content

Commit a7e89d1

Browse files
bors[bot]burrbull
andcommitted
Merge #320
320: ed2018 for generated code r=therealprof a=burrbull Newer deps in tests. r? @therealprof Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2 parents 9c75302 + 6a8a2b6 commit a7e89d1

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

ci/script.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ main() {
4848

4949
# test crate
5050
cargo init --name foo $td
51-
echo 'cortex-m = "0.5.0"' >> $td/Cargo.toml
52-
echo 'cortex-m-rt = "0.5.0"' >> $td/Cargo.toml
51+
echo 'cortex-m = "0.6.0"' >> $td/Cargo.toml
52+
echo 'cortex-m-rt = "0.6.9"' >> $td/Cargo.toml
5353
echo 'vcell = "0.1.0"' >> $td/Cargo.toml
5454
echo '[profile.dev]' >> $td/Cargo.toml
5555
echo 'incremental = false' >> $td/Cargo.toml
@@ -418,10 +418,10 @@ main() {
418418
echo 'version = "0.1.0"' >> $td/Cargo.toml
419419

420420
echo '[dependencies.riscv]' >> $td/Cargo.toml
421-
echo 'version = "0.4.0"' >> $td/Cargo.toml
421+
echo 'version = "0.5.0"' >> $td/Cargo.toml
422422

423423
echo '[dependencies.riscv-rt]' >> $td/Cargo.toml
424-
echo 'version = "0.4.0"' >> $td/Cargo.toml
424+
echo 'version = "0.6.0"' >> $td/Cargo.toml
425425

426426
(
427427
cd $td &&

ci/svd2rust-regress/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fn main() {
189189

190190
// Set RUSTUP_TOOLCHAIN if needed
191191
if let Some(toolchain) = &opt.rustup_toolchain {
192-
::std::env::set_var("RUSTUP_TOOLCHAIN", toolchain);
192+
std::env::set_var("RUSTUP_TOOLCHAIN", toolchain);
193193
}
194194

195195
// collect enabled tests

ci/svd2rust-regress/src/svd_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl CommandHelper for Output {
8080
}
8181

8282
pub fn test(t: &TestCase, bin_path: &PathBuf, rustfmt_bin_path: Option<&PathBuf>, nightly: bool, verbosity: u8) -> Result<Option<Vec<PathBuf>>> {
83-
let user = match ::std::env::var("USER") {
83+
let user = match std::env::var("USER") {
8484
Ok(val) => val,
8585
Err(_) => "rusttester".into(),
8686
};
@@ -89,7 +89,7 @@ pub fn test(t: &TestCase, bin_path: &PathBuf, rustfmt_bin_path: Option<&PathBuf>
8989
let chip_dir = path_helper(&["output", &t.name()]);
9090
if let Err(err) = fs::remove_dir_all(&chip_dir) {
9191
match err.kind() {
92-
::std::io::ErrorKind::NotFound => (),
92+
std::io::ErrorKind::NotFound => (),
9393
_ => Err(err).chain_err(|| "While removing chip directory")?
9494
}
9595
}

src/generate/interrupt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn render(
159159
#(#variants)*
160160
}
161161

162-
unsafe impl ::bare_metal::Nr for Interrupt {
162+
unsafe impl bare_metal::Nr for Interrupt {
163163
#[inline]
164164
fn nr(&self) -> u8 {
165165
match *self {

src/generate/register.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ pub fn render(
177177
out.push(quote! {
178178
#[doc = #description]
179179
pub struct #name_pc {
180-
register: ::vcell::VolatileCell<#rty>
180+
register: vcell::VolatileCell<#rty>
181181
}
182182

183183
#[doc = #description]
@@ -343,7 +343,7 @@ pub fn fields(
343343

344344
mod_items.push(quote! {
345345
#[doc = #desc]
346-
pub type #pc_r = ::#pmod_::#rmod_::#base_pc_r;
346+
pub type #pc_r = crate::#pmod_::#rmod_::#base_pc_r;
347347
});
348348
} else if let Some(register) = &base.register {
349349
let mod_ = register.to_sanitized_snake_case();
@@ -603,11 +603,11 @@ pub fn fields(
603603
mod_items.push(quote! {
604604
#[doc = #pc_w_doc]
605605
pub type #pc_w =
606-
::#pmod_::#rmod_::#base_pc_w;
606+
crate::#pmod_::#rmod_::#base_pc_w;
607607
});
608608

609609
quote! {
610-
::#pmod_::#rmod_::#base_pc_w
610+
crate::#pmod_::#rmod_::#base_pc_w
611611
}
612612
} else if let Some(register) = &base.register {
613613
let mod_ = register.to_sanitized_snake_case();

0 commit comments

Comments
 (0)