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

Don't panic on unimplemented types for auto traits #622

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

jackh726
Copy link
Member

@jackh726 jackh726 commented Oct 5, 2020

Closes #621

@jackh726 jackh726 changed the title Don't on unimplemented types for auto traits Don't panic on unimplemented types for auto traits Oct 5, 2020
@@ -164,6 +164,10 @@ pub fn push_auto_trait_impls<I: Interner>(
push_auto_trait_impls_generator_witness(builder, auto_trait_id, generator_id);
}

// Unimplemented
TypeName::OpaqueType(_) => {}

Choose a reason for hiding this comment

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

Would it be cleaner to replace the unimplemented! calls in the constituent_types fn above with a FIXME comment and a reference to some issue? I'm not familiar with the chalk style guide, but I feel like leaving in the unimplemented calls could lead to them accidentally being triggered in the future.

Something like // FIXME (issue#12345) implement these

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that in order to do that, we would have to change the function signature to an Option<...>. If this was a long term solution, yeah that might be cleaner. But for now, this is fine to reduce churn.

@jackh726
Copy link
Member Author

jackh726 commented Oct 6, 2020

@bors r=nikomatsakis

Discussed on zulip during meeting

@bors
Copy link
Contributor

bors commented Oct 6, 2020

📌 Commit 9663ae0 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Oct 6, 2020

⌛ Testing commit 9663ae0 with merge ebe62c2...

@bors
Copy link
Contributor

bors commented Oct 6, 2020

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing ebe62c2 to master...

@bors bors merged commit ebe62c2 into rust-lang:master Oct 6, 2020
@jackh726 jackh726 deleted the issue_621 branch October 6, 2020 20:48
@jackh726 jackh726 restored the issue_621 branch December 15, 2020 19:40
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.

unimplemented macro calls are crashing rust-analyzer
3 participants