compiler/rust: allow CFG & BitSetStreamTrait to have a len() without also having an is_empty()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
Eric Engestrom 2025-10-06 15:53:47 +02:00
parent e825eac272
commit 91e60e210a
2 changed files with 2 additions and 0 deletions

View file

@ -292,6 +292,7 @@ impl FromIterator<usize> for BitSet {
}
}
#[expect(clippy::len_without_is_empty)]
pub trait BitSetStreamTrait {
/// Get the next word
///

View file

@ -330,6 +330,7 @@ pub struct CFG<N> {
nodes: Vec<CFGNode<N>>,
}
#[expect(clippy::len_without_is_empty)]
impl<N> CFG<N> {
/// Creates a new CFG from nodes and edges.
pub fn from_blocks_edges(