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

fix missing implicit impls repoorting #7139

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

TomerStarkware
Copy link
Collaborator

No description provided.

@TomerStarkware TomerStarkware requested a review from orizi January 22, 2025 14:47
@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@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.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @TomerStarkware)


crates/cairo-lang-semantic/src/items/imp.rs line 2802 at r1 (raw file):

            return Err(diag);
        };
        resolver.inference().rewrite(imp).map_err(|_| skip_diagnostic())

Suggestion:

        let imp = resolver.inference().new_impl_var(concrete_trait_id, None, impl_lookup_context);
        resolver.inference().finalize_without_reporting().map_err(|(err_set, _)| {
            diagnostics.report(
                impl_def_id.stable_ptr(db.upcast()).untyped(),
                ImplicitImplNotInferred { trait_impl_id, concrete_trait_id },
            );
            resolver.inference().report_on_pending_error(
                err_set,
                &mut diagnostics,
                impl_def_id.stable_ptr(db.upcast()).untyped(),
            )
        }?;
        resolver.inference().rewrite(imp).map_err(|_| skip_diagnostic())

@TomerStarkware TomerStarkware force-pushed the tomer/fix_missing_implicit_impl branch from 3e1cb0e to a92fb04 Compare January 22, 2025 15:16
Copy link
Collaborator Author

@TomerStarkware TomerStarkware 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: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-semantic/src/items/imp.rs line 2802 at r1 (raw file):

            return Err(diag);
        };
        resolver.inference().rewrite(imp).map_err(|_| skip_diagnostic())

Done.

Copy link
Collaborator

@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.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

Copy link
Collaborator

@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.

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@TomerStarkware TomerStarkware force-pushed the tomer/fix_missing_implicit_impl branch from 1ea94a9 to 0b2918f Compare January 26, 2025 14:59
Copy link
Collaborator

@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.

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@TomerStarkware TomerStarkware added this pull request to the merge queue Jan 26, 2025
Merged via the queue into main with commit 1fba177 Jan 26, 2025
48 checks passed
@orizi orizi deleted the tomer/fix_missing_implicit_impl branch January 29, 2025 16:22
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.

3 participants