A few small cleanups for newtype_index

Remove the `..` from the body, only a few invocations used it and it's
inconsistent with rust syntax.

Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
This commit is contained in:
Nilstrieb
2022-12-18 21:47:28 +01:00
parent d679764fb6
commit 8bfd6450c7
35 changed files with 68 additions and 115 deletions

View File

@@ -657,7 +657,7 @@ rustc_index::newtype_index! {
#[derive(HashStable)]
#[debug_format = "_{}"]
pub struct Local {
const RETURN_PLACE = 0,
const RETURN_PLACE = 0;
}
}
@@ -1149,7 +1149,7 @@ rustc_index::newtype_index! {
#[derive(HashStable)]
#[debug_format = "bb{}"]
pub struct BasicBlock {
const START_BLOCK = 0,
const START_BLOCK = 0;
}
}
@@ -1532,8 +1532,7 @@ rustc_index::newtype_index! {
/// [mir-datatypes]: https://rustc-dev-guide.rust-lang.org/mir/index.html#mir-data-types
#[derive(HashStable)]
#[debug_format = "field[{}]"]
pub struct Field {
}
pub struct Field {}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
@@ -1760,7 +1759,7 @@ rustc_index::newtype_index! {
#[derive(HashStable)]
#[debug_format = "scope[{}]"]
pub struct SourceScope {
const OUTERMOST_SOURCE_SCOPE = 0,
const OUTERMOST_SOURCE_SCOPE = 0;
}
}
@@ -2757,8 +2756,7 @@ impl<'tcx> TypeVisitable<'tcx> for UserTypeProjection {
rustc_index::newtype_index! {
#[derive(HashStable)]
#[debug_format = "promoted[{}]"]
pub struct Promoted {
}
pub struct Promoted {}
}
impl<'tcx> Debug for Constant<'tcx> {