Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obk

Improve syntax of `newtype_index`

This makes it more like proper Rust and also makes the implementation a lot simpler.

Mostly just turns weird flags in the body into proper attributes.

It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
This commit is contained in:
bors 2022-12-20 07:27:01 +00:00
commit eb9e5e711d
37 changed files with 182 additions and 268 deletions

View file

@ -282,9 +282,9 @@ impl graph::WithPredecessors for CoverageGraph {
rustc_index::newtype_index! {
/// A node in the control-flow graph of CoverageGraph.
#[debug_format = "bcb{}"]
pub(super) struct BasicCoverageBlock {
DEBUG_FORMAT = "bcb{}",
const START_BCB = 0,
const START_BCB = 0;
}
}