mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-23 03:44:31 +00:00
Switch to Rust 2024 edition (#18129)
This commit is contained in:
parent
e67b35743a
commit
9ae698fe30
1082 changed files with 4211 additions and 3300 deletions
|
@ -19,11 +19,10 @@ use ruff_text_size::{Ranged, TextLen, TextRange, TextSize};
|
|||
|
||||
use crate::str_prefix::{AnyStringPrefix, ByteStringPrefix, FStringPrefix, StringLiteralPrefix};
|
||||
use crate::{
|
||||
int,
|
||||
Expr, ExprRef, FStringElement, LiteralExpressionRef, OperatorPrecedence, Pattern, Stmt,
|
||||
TypeParam, int,
|
||||
name::Name,
|
||||
str::{Quote, TripleQuotes},
|
||||
Expr, ExprRef, FStringElement, LiteralExpressionRef, OperatorPrecedence, Pattern, Stmt,
|
||||
TypeParam,
|
||||
};
|
||||
|
||||
impl StmtClassDef {
|
||||
|
@ -1139,10 +1138,12 @@ impl StringLiteralFlags {
|
|||
|
||||
pub const fn prefix(self) -> StringLiteralPrefix {
|
||||
if self.0.contains(StringLiteralFlagsInner::U_PREFIX) {
|
||||
debug_assert!(!self.0.intersects(
|
||||
StringLiteralFlagsInner::R_PREFIX_LOWER
|
||||
.union(StringLiteralFlagsInner::R_PREFIX_UPPER)
|
||||
));
|
||||
debug_assert!(
|
||||
!self.0.intersects(
|
||||
StringLiteralFlagsInner::R_PREFIX_LOWER
|
||||
.union(StringLiteralFlagsInner::R_PREFIX_UPPER)
|
||||
)
|
||||
);
|
||||
StringLiteralPrefix::Unicode
|
||||
} else if self.0.contains(StringLiteralFlagsInner::R_PREFIX_LOWER) {
|
||||
debug_assert!(!self.0.contains(StringLiteralFlagsInner::R_PREFIX_UPPER));
|
||||
|
@ -3120,8 +3121,8 @@ impl From<bool> for Singleton {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::generated::*;
|
||||
use crate::Mod;
|
||||
use crate::generated::*;
|
||||
|
||||
#[test]
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue