Skip to content
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

add defmt impls for core::ptr::NonNull and fn(...) -> Ret #753

Merged
merged 3 commits into from
May 8, 2023
Merged

add defmt impls for core::ptr::NonNull and fn(...) -> Ret #753

merged 3 commits into from
May 8, 2023

Conversation

Crzyrndm
Copy link
Contributor

@Crzyrndm Crzyrndm commented May 5, 2023

Fixes #752

NonNull and fn pointers formatted like a raw pointer. This matches the behaviour of Debug for these types

Copy link
Member

@Urhengulas Urhengulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @Crzyrndm.

Note: not quite sure where to add tests for the output?

Please add some log statements just before following line line and run cargo xtask test-snapshot --overwrite from the repository root:

defmt::info!("QEMU test finished!");

Please also add this PR to the CHANGELOG.md.

@Crzyrndm
Copy link
Contributor Author

Crzyrndm commented May 6, 2023

Test prints added for NonNull, and fn pointers of 0/1/5 parameters for Rust/C/unsafe (formatting makes 12 a bit much, it's already noisy enough as is and the limit is about as arbitrary as it gets).

@Urhengulas
Copy link
Member

Thank you!

bors r+

@bors
Copy link
Contributor

bors bot commented May 8, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit f6e86bc into knurling-rs:main May 8, 2023
@Crzyrndm Crzyrndm deleted the ptr-nonnull branch May 8, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

derive support for C-like fn pointers and core::ptr::NonNull
2 participants