Closed YerinAlexey closed 2 years ago
Undecided. I think it's better to point this out via documentation instead of removing it entirely.
Dunno, QBE types on their own (e.g. aggregate definition is needed to infer its type) don't have a size and this function was a result of flawed compiler design
What about this?
https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-deprecated-attribute
According to the crates.io stats this crate is actually used by people, so I'm a bit hesitant to just rip out a feature without notice.
That should also work
Thinking about it, I think the root issue lies in Type::Aggregate(String)
. Shouldn't I be able to enclose a reference to a typedef instead of the name as a string? For example, I feel like this snippet is more complicated than it should be.
Fixing this would make it possible to compute the size of aggregates.
Seems reasonable, but I'm not sure how ownership will work in this case
We'll have to introduce lifetimes for that, but I'm not yet sure how that would look. Do you feel like taking this on, or should I open an issue for later reference?
Moved to #12
Description
It doesn't produce correct results for aggregates and needs a reference to the module if it wants to do so. I think it might be better to implement size measurement in the frontends instead.
ToDo