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

make use of impl T wherever possible #839

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

bilelmoussaoui
Copy link
Member

Except in ClosureExpression because we can't mix both impl & generic types due to
rust-lang/rust#83701

Tried to fix #838 but ended up cleaning up few things, there is more to be done but that is for another time.

Except in ClosureExpression because we can't mix both impl & generic types due to
rust-lang/rust#83701
gdk::Event (and fundamental types) code can now be generated correctly
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.

Note that both changes are breaking changes, the de-manual change more likely causes problems (people sometimes don't include the prelude but only the traits they use).

@bilelmoussaoui
Copy link
Member Author

Note that both changes are breaking changes, the de-manual change more likely causes problems (people sometimes don't include the prelude but only the traits they use).

Yeah, well I don't know whether to merge those right now or wait till the 0.5 release

@sdroege
Copy link
Member

sdroege commented Jan 19, 2022

master is what becomes 0.5, we're not backporting everything to the 0.4 branch :) So no need to wait either way.

@bilelmoussaoui bilelmoussaoui merged commit 7ca71d0 into master Jan 19, 2022
@bilelmoussaoui bilelmoussaoui deleted the bilelmoussaoui/expressions branch January 19, 2022 15:02
@bilelmoussaoui
Copy link
Member Author

I am still not familiar at all with what could be considered an API break or not, your help is very appreciated on that regard, thanks!

@sdroege
Copy link
Member

sdroege commented Jan 19, 2022

FWIW, the other change is a breaking change because previously you could call the functions like foo::<A, B, C>() and now you can't anymore because impl trait does not give you a type parameter to the function. I would ignore that for our purposes here though because nobody calls it like that, there's no point in providing the type parameters like this.

The thing with the traits I wouldn't ignore because I know of people very selectively including specific traits because they don't like preludes.

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.

ClosureExpression::new asks for all three generic types
2 participants