DWARF Standard


210219.1 Tom Tromey Representation of Rust type traits Enhancement Rejected 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.

2022-03-21:  Rejected.  No concrete proposal presented. 

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