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 the Generator trait well-known #723

Merged
merged 1 commit into from
Aug 22, 2021
Merged

Conversation

nrc
Copy link
Member

@nrc nrc commented Aug 16, 2021

r? @jackh726 There's quite a lot of cargo culting of code from function trait support which I don't fully understand, so I'd appreciate a close review.

As discussed on Zulip, this adds initial support for the Generator trait as a well-known trait. I'll work on DispatchFromDyn next, but want to check I'm doing the right things first.

Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

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

A question, but otherwise this LGTM

.clone()
.substitute(interner, &substitution);

let trait_id = db.well_known_trait_id(WellKnownTrait::Generator).unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

Side comment (don't need to change here, since it's done elsewhere), but we probably want to just not add clauses if this isn't defined rather than panicking.

@jackh726
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 22, 2021

📌 Commit ce31db8 has been approved by jackh726

@bors
Copy link
Contributor

bors commented Aug 22, 2021

⌛ Testing commit ce31db8 with merge dbe241e...

@bors
Copy link
Contributor

bors commented Aug 22, 2021

☀️ Test successful - checks-actions
Approved by: jackh726
Pushing dbe241e to master...

@bors bors merged commit dbe241e into rust-lang:master Aug 22, 2021
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.

None yet

3 participants