File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
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,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77
88## [ Unreleased]
99
10+ - Bump MSRV of generated code to 1.76
11+
1012## [ v0.32.0] - 2024-02-26
1113
1214- Bump MSRV to 1.74
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 @@ -118,7 +118,7 @@ impl ToTokens for RawRegAccessor {
118118 #[ doc = #doc]
119119 #[ inline( always) ]
120120 pub const fn #name( & self ) -> & #ty {
121- unsafe { & * ( self as * const Self ) . cast:: <u8 >( ) . add( #offset) . cast( ) }
121+ unsafe { & * core :: ptr :: from_ref ( self ) . cast:: <u8 >( ) . add( #offset) . cast( ) }
122122 }
123123 }
124124 . to_tokens ( tokens) ;
@@ -177,7 +177,7 @@ impl ToTokens for RawArrayAccessor {
177177 increment,
178178 } = self ;
179179 let name_iter = Ident :: new ( & format ! ( "{name}_iter" ) , Span :: call_site ( ) ) ;
180- let cast = quote ! { unsafe { & * ( self as * const Self ) . cast:: <u8 >( ) . add( #offset) . add( #increment * n) . cast( ) } } ;
180+ let cast = quote ! { unsafe { & * core :: ptr :: from_ref ( self ) . cast:: <u8 >( ) . add( #offset) . add( #increment * n) . cast( ) } } ;
181181 quote ! {
182182 #[ doc = #doc]
183183 #[ inline( always) ]
You can’t perform that action at this time.
0 commit comments