rust-lang / project-stable-mir

Define compiler intermediate representation usable by external tools
Other
56 stars 13 forks source link

Improve code documentation #72

Open celinval opened 3 months ago

celinval commented 3 months ago

StableMIR definitions could use some comments.

I don't know what is the best way to move forward to avoid duplicating rustc's documentation plus adding more comments.

momvart commented 2 months ago

I don't know what is the best way to move forward to avoid duplicating rustc's documentation

We can add "See also [xyz](item in rustc's mir)" but I'm not sure if any reference to the compiler should be avoided or not.

celinval commented 2 months ago

Would that work with crates.io documentation? I tried to find a way to "inline" a linked documentation, but no luck.

momvart commented 2 months ago

I tried to find a way to "inline" a linked documentation, but no luck.

No experience unfortunately.

Although I'm not sure what you exactly mean by inlining, is it necessary to inline them? By default, they appear as links to the official online rustc's documents.

celinval commented 2 months ago

I mean, this is definitely an improvement to what we have today, but it won't work once we publish the stable mir crate in crates.io.

celinval commented 2 months ago

The link will likely be broken