rust-embedded / svd2rust

Generate Rust register maps (`struct`s) from SVD files
Apache License 2.0
687 stars 149 forks source link

field writer's always generic #622

Closed burrbull closed 2 years ago

burrbull commented 2 years ago

Alternative to #621

Reverts 760670616ed807041767cade52518291c810177c

Advantages:

Disadvantages:

rust-highfive commented 2 years ago

r? @adamgreig

(rust-highfive has picked a reviewer for you, use r? to override)

burrbull commented 2 years ago

@newAM Could you test this one also?

Emilgardis commented 2 years ago

I prefer this. Does this increase size considerably in non-opt profile?

newAM commented 2 years ago

I prefer this. Does this increase size considerably in non-opt profile?

Tried one of my test binaries, opt-level 0. 98k with svd2rust 0.24.0, 98k with this PR. No change on opt-level 1 either.

burrbull commented 2 years ago

0.24 is broken. It makes sense to compare only patched versions. But sounds good anyway.

@Emilgardis Let's merge this one then.

Emilgardis commented 2 years ago

bors r+

bors[bot] commented 2 years ago

Build succeeded: