Skip to content

Generic Global Variables #311

@ssyram

Description

@ssyram

We found that currently Eurydice does not support generic global variables. Originally, user-defined generic global variable is rare, but now, as we generate for each impl Trait for T a vtable instance for Trait, which is in turn a global variable, it becomes a common issue.

For example, if we test the following code like that in AeneasVerif/charon#873 :

fn use_debug(_d: &dyn core::fmt::Debug) { }
fn main() { use_debug(&&1); }

It involves the impl <T: Debug> Debug for &T, and hence involves the generic global variable. Will there be a possible quick fix for this now? Like, can we share the logic of generic handling from functions to also globals?

We understand that this is a feature going to be deprecated in the future by mono migration, but it would be convenient at least for now to have this issue resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions