Open
Description
I have some code like:
fn foo(v: Value) {
let ty = Ty::of_value(v);
let ident = ty.to_string();
...
}
And the motivation is that I am building a configuration system where I allow users to define new record
types. But the issue comes when user in one file makes Foo = record()
and another file makes Foo = record()
. These are distinct types because they were defined in two separate files.
But the ty.to_string()
in the above collides.
- is there currently a way I can disambiguate these two?
- if not, would you be open to a PR that allows inspecting the module id where the user type was defined, which should allow disambiguation.
Metadata
Metadata
Assignees
Labels
No labels