Skip to content

Commit a526e4f

Browse files
Use an associated const for name
1 parent cbaaf05 commit a526e4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir/dataflow/generic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ pub trait Analysis<'tcx>: BottomValue {
4040
/// The index type used to access the dataflow state.
4141
type Idx: Idx;
4242

43-
/// A name describing the dataflow analysis being implemented.
43+
/// A name, used for debugging, that describes this dataflow analysis.
4444
///
4545
/// The name should be suitable as part of a filename, so avoid whitespace, slashes or periods
4646
/// and try to keep it short.
47-
fn name() -> &'static str;
47+
const NAME: &'static str;
4848

4949
/// The size of each bitvector allocated for each block.
5050
fn bits_per_block(&self, body: &mir::Body<'tcx>) -> usize;

0 commit comments

Comments
 (0)