-
Notifications
You must be signed in to change notification settings - Fork 157
Generics Part 1 #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generics Part 1 #331
Conversation
src/generate/register.rs
Outdated
}); | ||
} | ||
|
||
if can_write { | ||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, conflict markers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happens.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, just makes me wonder how you actually tested this... 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made merge after PR and tests.
Rebased on master. Added This part should not break HALs, but I'm not sure. |
Close in favour of #339 |
r? @therealprof
I decided to split my changes on 3 steps:
1 - this one adds
Reg
Wrapper for register struct with read, write and other methods (instead of traits we discussed) and replace register'sR
andW
on generic versions.2 - replace field reader with generic
R
3 - replace write proxy with generic
WProxy
(require const generics in rust)(see #115 )Example: https://gist.github.com/24a0d1a2e13bb464a7c579a07902a3c6