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:
@@ -108,15 +108,13 @@ use std::rc::Rc;
|
||||
mod rwu_table;
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
pub struct Variable {
|
||||
DEBUG_FORMAT = "v({})",
|
||||
}
|
||||
#[debug_format = "v({})"]
|
||||
pub struct Variable {}
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
pub struct LiveNode {
|
||||
DEBUG_FORMAT = "ln({})",
|
||||
}
|
||||
#[debug_format = "ln({})"]
|
||||
pub struct LiveNode {}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user