My talk's gonna be soo good.
(Tomorrow, in Cambridge UK: https://www.meetup.com/cambridge-rust-meetup/events/312749221/)
mastodon 4.7.3My talk's gonna be soo good.
(Tomorrow, in Cambridge UK: https://www.meetup.com/cambridge-rust-meetup/events/312749221/)
rust's ir's are soo goofy sometimes:
In the AST a generic bound can either exist on the definition (`fn foo()`) or (`fn foo() where T: Debug`).
Then in AST->HIR, this is de-sugared/normalized, and all bounds are moved to where clauses (so it's easier for the typechecker to look at all the bounds)
Then in HIR->rustdoc::clean, this is reversed back to how it was in the AST. The bounds are split back into those on the param-defs, and those in where clauses. (So rustdoc can show the code as users wrote it).
This structure is repeated in rustdoc-json output, which bounds both on param defs and where clauses.
Then rustdoc-json consumers like cargo-semver-checks redo the same normalization again, for the same reasons.
Shoutout to https://github.com/rust-lang/rust/pull/149482. Hopefully you never run into needing to know the ordering gaurentees of TLS descrutors, but if you do, you're going to be really glad they got written down!
RE: @adotinthevoid@hachyderm.io
Here it is: https://alona.page/talks/freeing-rustcs-understanding.pdf
(Slides only, no recordings)
observation: Rustdoc as the start of a sentence seems fine. Rustc on the other hand seems viscerally wrong. rustc is the only way to capitalize that. rustdoc is also acceptable here, but not required.
https://github.com/rust-lang/rustc-dev-guide/pull/2422 Finally documented the rustdoc-json test suites after literal years of having this as a todo!
longest requested rustdoc-json feature (i think?) has a very WIP implementation: https://github.com/rust-lang/rust/pull/149043
src/rustdoc-json-types/lib.rs will continue to expand until it can describe every aspect of a rust API:
https://www.gov.uk/guidance/style-guide/technical-content-a-to-z#breaking-changes
the UK government has an official position that breaking changes are not broadly understood.
holy moly, hash_map! macro in std?!??!! https://github.com/rust-lang/libs-team/issues/578#issuecomment-3074413211
Not every attribute has a variant, all the ones that don't are lumped into Attribute::Other. If you care about an attribute here (other than #[doc], which I'm aware of), please let me know.
do “tech bro” and “brogrammer” mean exactly the same thing?