Thanks to visit codestin.com Credit goes to github.com
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 02903cb commit 2790681Copy full SHA for 2790681
tracing-attributes/src/lib.rs
@@ -385,6 +385,15 @@ fn instrument_precise(
385
let input = syn::parse::<ItemFn>(item)?;
386
let instrumented_function_name = input.sig.ident.to_string();
387
388
+ macro_rules! error_on_const_fn {
389
+ ($e:expr) => {
390
+ if $e {
391
+ compile_error!("instrumenting const fn not supported");
392
+ }
393
+ };
394
395
+ error_on_const_fn!(input.sig.constness.is_some());
396
+
397
// check for async_trait-like patterns in the block, and instrument
398
// the future instead of the wrapper
399
if let Some(async_like) = expand::AsyncInfo::from_fn(&input) {
0 commit comments