Skip to content

Commit

Permalink
Fill in unsafe blocks inside unsafe functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 21, 2023
1 parent 54f7f80 commit e95447c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ impl Literal {
// representation. This is not public API other than for quote.
#[doc(hidden)]
pub unsafe fn from_str_unchecked(repr: &str) -> Self {
Literal::_new(imp::Literal::from_str_unchecked(repr))
Literal::_new(unsafe { imp::Literal::from_str_unchecked(repr) })
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ impl Literal {
if inside_proc_macro() {
Literal::Compiler(proc_macro::Literal::from_str(repr).expect("invalid literal"))
} else {
Literal::Fallback(fallback::Literal::from_str_unchecked(repr))
Literal::Fallback(unsafe { fallback::Literal::from_str_unchecked(repr) })
}
}

Expand Down

0 comments on commit e95447c

Please sign in to comment.