We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a22c43f commit 22dc1b9Copy full SHA for 22dc1b9
riscv/src/register/tests/read_write_csr.rs
@@ -55,12 +55,12 @@ pub fn _try_read_csr() -> Result<Mtest> {
55
56
#[allow(unused)]
57
pub fn _write_csr(csr: Mtest) {
58
- write(csr);
+ unsafe { write(csr) };
59
}
60
61
62
pub fn _try_write_csr(csr: Mtest) {
63
- try_write(csr);
+ unsafe { try_write(csr) };
64
65
66
#[test]
riscv/src/register/tests/write_only_csr.rs
@@ -45,12 +45,12 @@ write_only_csr_field! {
45
// we don't test the `write` function, we are only testing in-memory functions.
46
47
48
49
50
51
52
pub fn _try_write_csr(csr: Mtest) -> Result<()> {
53
- try_write(csr)
+ unsafe { try_write(csr) }
54
0 commit comments