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

Added more data for missing method diagnostic. #4405

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Nov 15, 2023

This change is Reviewable

@orizi orizi force-pushed the orizi/add-failing-traits-info branch from 3288761 to d29844c Compare November 15, 2023 08:09
@orizi orizi linked an issue Nov 15, 2023 that may be closed by this pull request
2 tasks
@orizi orizi force-pushed the orizi/add-failing-traits-info branch 2 times, most recently from f928dba to 407eb3c Compare November 15, 2023 08:22
Copy link
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 8 files at r1, 2 of 5 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: 5 of 9 files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-semantic/src/diagnostic.rs line 536 at r3 (raw file):

                                err.format(db)
                            ))
                            .join("\n")

Consider adding an InferenceErrors type which will implement Display to avoid the map duplication below.

Code quote:

                        inference_errors
                            .iter()
                            .map(|(trait_member, err)| format!(
                                "Candidate `{}` inference failed with: {}",
                                trait_member.full_path(db.upcast()),
                                err.format(db)
                            ))
                            .join("\n")

@orizi orizi force-pushed the orizi/add-failing-traits-info branch from 407eb3c to 9643be5 Compare November 15, 2023 10:01
Copy link
Collaborator Author

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 9 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)


crates/cairo-lang-semantic/src/diagnostic.rs line 536 at r3 (raw file):

Previously, gilbens-starkware (Gil Ben-Shachar) wrote…

Consider adding an InferenceErrors type which will implement Display to avoid the map duplication below.

Done.

Copy link
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 8 files at r1, 2 of 5 files at r2, 2 of 2 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @orizi)

@orizi orizi added this pull request to the merge queue Nov 15, 2023
Merged via the queue into main with commit 43c19e6 Nov 15, 2023
@orizi orizi deleted the orizi/add-failing-traits-info branch November 16, 2023 16:02
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.

feat: add missing trait implementation detection on impl traits constraints
2 participants