fix is_raw_string for multiple prefixes (#6865)
fix `is_raw_string` in the presence of other prefixes (like `rb"foo"`) fixes #6864
This commit is contained in:
@@ -377,7 +377,7 @@ impl StringPrefix {
|
||||
}
|
||||
|
||||
pub(super) const fn is_raw_string(self) -> bool {
|
||||
matches!(self, StringPrefix::RAW | StringPrefix::RAW_UPPER)
|
||||
self.contains(StringPrefix::RAW) || self.contains(StringPrefix::RAW_UPPER)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user