We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 793389b commit 90d1885Copy full SHA for 90d1885
crates/hir_expand/src/builtin_macro.rs
@@ -256,7 +256,13 @@ fn format_args_expand(
256
quote! { std::fmt::ArgumentV1::new(&(#arg), std::fmt::Display::fmt), }
257
}.token_trees);
258
let expanded = quote! {
259
- std::fmt::Arguments::new_v1(&[], &[##arg_tts])
+ // It's unsafe since https://github.com/rust-lang/rust/pull/83302
260
+ // Wrap an unsafe block to avoid false-positive `missing-unsafe` lint.
261
+ // FIXME: Currently we don't have `unused_unsafe` lint so an extra unsafe block won't cause issues on early
262
+ // stable rust-src.
263
+ unsafe {
264
+ std::fmt::Arguments::new_v1(&[], &[##arg_tts])
265
+ }
266
};
267
ExpandResult::ok(expanded)
268
}
0 commit comments