File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 90
90
#![ cfg_attr( any( proc_macro_span, super_unstable) , feature( proc_macro_span) ) ]
91
91
#![ cfg_attr( super_unstable, feature( proc_macro_def_site) ) ]
92
92
#![ cfg_attr( doc_cfg, feature( doc_cfg) ) ]
93
+ #![ deny( unsafe_op_in_unsafe_fn) ]
93
94
#![ allow(
94
95
clippy:: cast_lossless,
95
96
clippy:: cast_possible_truncation,
@@ -1239,7 +1240,7 @@ impl Literal {
1239
1240
// representation. This is not public API other than for quote.
1240
1241
#[ doc( hidden) ]
1241
1242
pub unsafe fn from_str_unchecked ( repr : & str ) -> Self {
1242
- Literal :: _new ( imp:: Literal :: from_str_unchecked ( repr) )
1243
+ Literal :: _new ( unsafe { imp:: Literal :: from_str_unchecked ( repr) } )
1243
1244
}
1244
1245
}
1245
1246
Original file line number Diff line number Diff line change @@ -762,7 +762,7 @@ impl Literal {
762
762
if inside_proc_macro ( ) {
763
763
Literal :: Compiler ( proc_macro:: Literal :: from_str ( repr) . expect ( "invalid literal" ) )
764
764
} else {
765
- Literal :: Fallback ( fallback:: Literal :: from_str_unchecked ( repr) )
765
+ Literal :: Fallback ( unsafe { fallback:: Literal :: from_str_unchecked ( repr) } )
766
766
}
767
767
}
768
768
You can’t perform that action at this time.
0 commit comments