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 const-bool-like-effects syntax proposal #17

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

lilizoey
Copy link
Contributor

As requested here

Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

I have some notes on formatting, but I'll file a PR with those after. Thanks for sharing this!

Comment on lines +77 to +83
!async fn size_hint(&self) -> (usize, Option<usize>);
// or
fn size_hint<effect !async>(&self) -> (usize, Option<usize>);
// or
fn size_hint(&self) -> (usize, Option<usize>) where effect !async;
// as opposed to `where A = !async` which would make this function
// only exist if we're in a context where `Iterator<A = true>`
Copy link
Member

Choose a reason for hiding this comment

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

There are three different variants shown here. Would all three variants be legal, or do you expect one should be chosen?

@yoshuawuyts yoshuawuyts merged commit 3b95d0d into rust-lang:master Feb 27, 2023
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.

2 participants