Use an associated const for name
This commit is contained in:
parent
cbaaf05b94
commit
a526e4faa6
1 changed files with 2 additions and 2 deletions
|
|
@ -40,11 +40,11 @@ pub trait Analysis<'tcx>: BottomValue {
|
|||
/// The index type used to access the dataflow state.
|
||||
type Idx: Idx;
|
||||
|
||||
/// A name describing the dataflow analysis being implemented.
|
||||
/// A name, used for debugging, that describes this dataflow analysis.
|
||||
///
|
||||
/// The name should be suitable as part of a filename, so avoid whitespace, slashes or periods
|
||||
/// and try to keep it short.
|
||||
fn name() -> &'static str;
|
||||
const NAME: &'static str;
|
||||
|
||||
/// The size of each bitvector allocated for each block.
|
||||
fn bits_per_block(&self, body: &mir::Body<'tcx>) -> usize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue