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

glib-macros: Specify quoted types explicitly #1068

Merged
merged 1 commit into from Apr 2, 2023

Conversation

felinira
Copy link
Contributor

@felinira felinira commented Apr 1, 2023

Having a custom eg. result type in scope will fail compilation, as the types don't match. Specify quoted types explicitly to not rely on the prelude.

@sdroege
Copy link
Member

sdroege commented Apr 1, 2023

These are the only two places where this is needed in the macros?

@felinira
Copy link
Contributor Author

felinira commented Apr 1, 2023

I can check the others ones as well

@sdroege
Copy link
Member

sdroege commented Apr 1, 2023

That would be great, thanks. I would be surprised if these were the only places :)

To be even more correct, I think you'd do ::std::... instead of std::...

@felinira
Copy link
Contributor Author

felinira commented Apr 1, 2023

This was… quite a lot 😅

I opted to use ::core for consistency with what most other macros used already.

@felinira felinira changed the title glib-macros: Specify quoted Result and Option types explicitly glib-macros: Specify quoted types explicitly Apr 1, 2023
bilelmoussaoui
bilelmoussaoui previously approved these changes Apr 1, 2023
Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise, thanks :)

glib-macros/src/error_domain_derive.rs Outdated Show resolved Hide resolved
@sdroege
Copy link
Member

sdroege commented Apr 2, 2023

Thanks a lot :) I'll do a new bugfix release with this on Monday or Tuesday.

@sdroege sdroege merged commit 7f9a20b into gtk-rs:master Apr 2, 2023
46 checks passed
@sdroege sdroege added the needs-backport PR needs backporting to the current stable branch label Apr 2, 2023
@sdroege
Copy link
Member

sdroege commented Apr 4, 2023

Done, this is in 0.17.7 now

@sdroege sdroege added backported PR was backported to the current stable branch and removed needs-backport PR needs backporting to the current stable branch labels Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported PR was backported to the current stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants