DWARF Standard


HOME
SPECIFICATIONS
FAQ
ISSUES



210219.1 Tom Tromey Representation of Rust type traits Enhancement Open Jian Xu


Section 5.7.3, pg 116

In Rust, a "trait" is somewhat similar to a Java interface -- it describes
a set of methods that can be applied to some other type.

However, in Rust, an interface may be implemented for any type, not just structure type.
For example, the various integer types implement a number of traits from the standard library.

There is currently no way to represent this in DWARF.

One fix would be to change this text:

A class type or interface type entry that describes a derived, extended or
implementing class or interface owns debugging information entries describing
each of the classes or interfaces it is derived from, extending or implementing,
respectively, ordered as they were in the source program. Each such entry has the
tag DW_TAG_inheritance.


... to lift the restriction that the inheriting type must be a class or interface.




All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2021 by DWARF Standards Committee.