File tree 4 files changed +7
-8
lines changed
4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 84
84
- { rust: stable, vendor: Toshiba, options: all }
85
85
- { rust: stable, vendor: Toshiba, options: "" }
86
86
# Test MSRV
87
- - { rust: 1.74 .0, vendor: Nordic, options: "" }
87
+ - { rust: 1.76 .0, vendor: Nordic, options: "" }
88
88
# Use nightly for architectures which don't support stable
89
89
- { rust: nightly, vendor: MSP430, options: "--atomics" }
90
90
- { rust: nightly, vendor: MSP430, options: "" }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ - Bump MSRV of generated code to 1.76
10
11
- move ` must_use ` from methods to generic type
11
12
12
13
## [ v0.33.5] - 2024-10-12
@@ -907,9 +908,7 @@ peripheral.register.write(|w| w.field().set());
907
908
908
909
- Initial version of the ` svd2rust ` tool
909
910
910
- [ Unreleased ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.5...HEAD
911
- [ v0.33.5 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.4...v0.33.5
912
- [ v0.33.4 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.3...v0.33.4
911
+ [ Unreleased ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.3...HEAD
913
912
[ v0.33.3 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.2...v0.33.3
914
913
[ v0.33.2 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.1...v0.33.2
915
914
[ v0.33.1 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.0...v0.33.1
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ This project is developed and maintained by the [Tools team][team].
17
17
18
18
## Minimum Supported Rust Version (MSRV)
19
19
20
- The ** generated code** is guaranteed to compile on stable Rust 1.65 .0 and up.
20
+ The ** generated code** is guaranteed to compile on stable Rust 1.76 .0 and up.
21
21
22
- If you encounter compilation errors on any stable version newer than 1.65 .0, please open an issue.
22
+ If you encounter compilation errors on any stable version newer than 1.76 .0, please open an issue.
23
23
24
24
# Testing Locally
25
25
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl ToTokens for AccessType {
55
55
#[ doc = #doc]
56
56
#[ inline( always) ]
57
57
pub const fn #name( & self ) -> & #ty {
58
- unsafe { & * ( self as * const Self ) . cast:: <u8 >( ) . add( #offset) . cast( ) }
58
+ unsafe { & * core :: ptr :: from_ref ( self ) . cast:: <u8 >( ) . add( #offset) . cast( ) }
59
59
}
60
60
}
61
61
}
@@ -84,7 +84,7 @@ impl ToTokens for AccessType {
84
84
increment,
85
85
} ) ) => {
86
86
let name_iter = Ident :: new ( & format ! ( "{name}_iter" ) , Span :: call_site ( ) ) ;
87
- let cast = quote ! { unsafe { & * ( self as * const Self ) . cast:: <u8 >( ) . add( #offset) . add( #increment * n) . cast( ) } } ;
87
+ let cast = quote ! { unsafe { & * core :: ptr :: from_ref ( self ) . cast:: <u8 >( ) . add( #offset) . add( #increment * n) . cast( ) } } ;
88
88
quote ! {
89
89
#[ doc = #doc]
90
90
#[ inline( always) ]
You can’t perform that action at this time.
0 commit comments