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

Fixing build errors in complex programs #49

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkcumming
Copy link
Collaborator

@dkcumming dkcumming commented Feb 19, 2025

Currently stable-mir-json will not build complex programs. Using the target of compiling Solana p-token we can try to iron out these issues. This PR has:

Returns Ok(None) if we cannot resolve Instance to a specific instance. For example, in a context like this,

fn foo<T: Debug>(t: T) { ... }
trying to resolve Debug::fmt applied to T will yield Ok(None), because we do not know what code ought to run. This > > setting is also affected by the current TypingMode of the environment.

Presuming that coherence and type-check have succeeded, if this method is invoked in a monomorphic context (i.e.,
like during codegen), then it is guaranteed to return Ok(Some(instance)), except for when the instance's inputs hit the > type size limit, in which case it may bail out and return Ok(None).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-Token Directly related to target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler panic on programs using to_string()
1 participant