Use #[expect(lint)] over #[allow(lint)] where possible (#17822)

This commit is contained in:
Micha Reiser 2025-05-03 21:20:31 +02:00 committed by GitHub
parent 8535af8516
commit fa628018b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
148 changed files with 221 additions and 268 deletions

View file

@ -280,7 +280,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
| FormatElement::SourceCodeSlice { .. }) => {
fn write_escaped(element: &FormatElement, f: &mut Formatter<IrFormatContext>) {
let (text, text_width) = match element {
#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
FormatElement::Token { text } => {
(*text, TextWidth::Width(Width::new(text.len() as u32)))
}

View file

@ -379,7 +379,7 @@ impl PartialEq for LabelId {
}
impl LabelId {
#[allow(clippy::needless_pass_by_value)]
#[expect(clippy::needless_pass_by_value)]
pub fn of<T: LabelDefinition>(label: T) -> Self {
Self {
value: label.value(),