Skip to content

Commit 7af3565

Browse files
authored
Rollup merge of rust-lang#95251 - GrishaVar:hashes-u16-to-u8, r=dtolnay
Reduce max hash in raw strings from u16 to u8 [Relevant discussion](https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Max.20raw.20string.20delimiters)
2 parents 104ba47 + 854c3de commit 7af3565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/regex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<'tcx> LateLintPass<'tcx> for Regex {
8181

8282
#[allow(clippy::cast_possible_truncation)] // truncation very unlikely here
8383
#[must_use]
84-
fn str_span(base: Span, c: regex_syntax::ast::Span, offset: u16) -> Span {
84+
fn str_span(base: Span, c: regex_syntax::ast::Span, offset: u8) -> Span {
8585
let offset = u32::from(offset);
8686
let end = base.lo() + BytePos(u32::try_from(c.end.offset).expect("offset too large") + offset);
8787
let start = base.lo() + BytePos(u32::try_from(c.start.offset).expect("offset too large") + offset);

0 commit comments

Comments
 (0)