diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-12-18 21:22:14 +0100 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-12-18 21:22:14 +0100 |
| commit | 91c3c2040ce109d6e9ea00ffb8e8f69f3fd6d9bb (patch) | |
| tree | 626f4cb52fe019aa00ad7a52c1f7501351474dd4 /compiler/rustc_middle/src/mir | |
| parent | 93429948cf0e6fe8aac3802a8fbc73a121463994 (diff) | |
| download | rust-91c3c2040ce109d6e9ea00ffb8e8f69f3fd6d9bb.tar.gz rust-91c3c2040ce109d6e9ea00ffb8e8f69f3fd6d9bb.zip | |
Make `#[max]` an attribute in `newtype_index`
Diffstat (limited to 'compiler/rustc_middle/src/mir')
| -rw-r--r-- | compiler/rustc_middle/src/mir/coverage.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/mir/coverage.rs b/compiler/rustc_middle/src/mir/coverage.rs index 173c8967eec..3025e2dd134 100644 --- a/compiler/rustc_middle/src/mir/coverage.rs +++ b/compiler/rustc_middle/src/mir/coverage.rs @@ -11,9 +11,9 @@ rustc_index::newtype_index! { /// (which _*descend*_ from u32::MAX). Id value `0` (zero) represents a virtual counter with a /// constant value of `0`. #[derive(HashStable)] + #[max = 0xFFFF_FFFF] pub struct ExpressionOperandId { DEBUG_FORMAT = "ExpressionOperandId({})", - MAX = 0xFFFF_FFFF, } } @@ -33,9 +33,9 @@ impl ExpressionOperandId { rustc_index::newtype_index! { #[derive(HashStable)] + #[max = 0xFFFF_FFFF] pub struct CounterValueReference { DEBUG_FORMAT = "CounterValueReference({})", - MAX = 0xFFFF_FFFF, } } @@ -57,9 +57,9 @@ rustc_index::newtype_index! { /// /// Values descend from u32::MAX. #[derive(HashStable)] + #[max = 0xFFFF_FFFF] pub struct InjectedExpressionId { DEBUG_FORMAT = "InjectedExpressionId({})", - MAX = 0xFFFF_FFFF, } } @@ -68,9 +68,9 @@ rustc_index::newtype_index! { /// /// Values ascend from 0. #[derive(HashStable)] + #[max = 0xFFFF_FFFF] pub struct InjectedExpressionIndex { DEBUG_FORMAT = "InjectedExpressionIndex({})", - MAX = 0xFFFF_FFFF, } } @@ -79,9 +79,9 @@ rustc_index::newtype_index! { /// array position in the LLVM coverage map "Expressions" array, which is assembled during the /// "mapgen" process. They cannot be computed algorithmically, from the other `newtype_index`s. #[derive(HashStable)] + #[max = 0xFFFF_FFFF] pub struct MappedExpressionIndex { DEBUG_FORMAT = "MappedExpressionIndex({})", - MAX = 0xFFFF_FFFF, } } |
