mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:51:30 +00:00
Kick off Red-knot (#10849)
Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Carl Meyer <carl@astral.sh>
This commit is contained in:
parent
845ba7cf5f
commit
7cd065e4a2
24 changed files with 6282 additions and 103 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,10 @@
|
|||
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||
|
||||
use std::cell::OnceCell;
|
||||
|
||||
use std::fmt;
|
||||
use std::fmt::Debug;
|
||||
use std::ops::Deref;
|
||||
use std::slice::{Iter, IterMut};
|
||||
use std::sync::OnceLock;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use itertools::Itertools;
|
||||
|
@ -1420,7 +1419,7 @@ impl StringLiteralValue {
|
|||
Self {
|
||||
inner: StringLiteralValueInner::Concatenated(ConcatenatedStringLiteral {
|
||||
strings,
|
||||
value: OnceCell::new(),
|
||||
value: OnceLock::new(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
@ -1782,7 +1781,7 @@ struct ConcatenatedStringLiteral {
|
|||
/// Each string literal that makes up the concatenated string.
|
||||
strings: Vec<StringLiteral>,
|
||||
/// The concatenated string value.
|
||||
value: OnceCell<Box<str>>,
|
||||
value: OnceLock<Box<str>>,
|
||||
}
|
||||
|
||||
impl ConcatenatedStringLiteral {
|
||||
|
@ -4168,7 +4167,7 @@ mod tests {
|
|||
assert_eq!(std::mem::size_of::<ExprSetComp>(), 40);
|
||||
assert_eq!(std::mem::size_of::<ExprSlice>(), 32);
|
||||
assert_eq!(std::mem::size_of::<ExprStarred>(), 24);
|
||||
assert_eq!(std::mem::size_of::<ExprStringLiteral>(), 48);
|
||||
assert_eq!(std::mem::size_of::<ExprStringLiteral>(), 56);
|
||||
assert_eq!(std::mem::size_of::<ExprSubscript>(), 32);
|
||||
assert_eq!(std::mem::size_of::<ExprTuple>(), 40);
|
||||
assert_eq!(std::mem::size_of::<ExprUnaryOp>(), 24);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue