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:
commit
eb9e5e711d
37 changed files with 182 additions and 268 deletions
|
@ -372,7 +372,7 @@ struct CFG<'tcx> {
|
|||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
struct ScopeId { .. }
|
||||
struct ScopeId {}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -185,7 +185,7 @@ pub(crate) enum BreakableTarget {
|
|||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
struct DropIdx { .. }
|
||||
struct DropIdx {}
|
||||
}
|
||||
|
||||
const ROOT_NODE: DropIdx = DropIdx::from_u32(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue