File tree Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 8484 - { rust: stable, vendor: Toshiba, options: all }
8585 - { rust: stable, vendor: Toshiba, options: "" }
8686 # Test MSRV
87- - { rust: 1.74 .0, vendor: Nordic, options: "" }
87+ - { rust: 1.76 .0, vendor: Nordic, options: "" }
8888 # Use nightly for architectures which don't support stable
8989 - { rust: nightly, vendor: MSP430, options: "--atomics" }
9090 - { 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/).
77
88## [ Unreleased]
99
10+ - Bump MSRV of generated code to 1.76
1011- move ` must_use ` from methods to generic type
1112
1213## [ v0.33.5] - 2024-10-12
@@ -907,9 +908,7 @@ peripheral.register.write(|w| w.field().set());
907908
908909- Initial version of the ` svd2rust ` tool
909910
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
913912[ v0.33.3 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.2...v0.33.3
914913[ v0.33.2 ] : https://github.com/rust-embedded/svd2rust/compare/v0.33.1...v0.33.2
915914[ 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].
1717
1818## Minimum Supported Rust Version (MSRV)
1919
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.
2121
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.
2323
2424# Testing Locally
2525
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ mod atomic {
3939
4040 impl < REG : Readable + Writable > Reg < REG >
4141 where
42- REG :: Ux : AtomicOperations + Default + core :: ops :: Not < Output = REG :: Ux > ,
42+ REG :: Ux : AtomicOperations
4343 {
4444 /// Set high every bit in the register that was set in the write proxy. Leave other bits
4545 /// untouched. The write is done in a single atomic instruction.
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl ToTokens for AccessType {
5555 #[ doc = #doc]
5656 #[ inline( always) ]
5757 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( ) }
5959 }
6060 }
6161 }
@@ -84,7 +84,7 @@ impl ToTokens for AccessType {
8484 increment,
8585 } ) ) => {
8686 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( ) } } ;
8888 quote ! {
8989 #[ doc = #doc]
9090 #[ inline( always) ]
You can’t perform that action at this time.
0 commit comments