File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1375,7 +1375,26 @@ impl<'tcx> LateLintPass<'tcx> for UnstableFeatures {
1375
1375
}
1376
1376
1377
1377
declare_lint ! {
1378
- /// `#[track_caller]` is a no-op without corresponding feature flag
1378
+ /// The `ungated_async_fn_track_caller` lint warns when the
1379
+ /// `#[track_caller]` attribute is used on an async function, method, or
1380
+ /// closure, without enabling the corresponding unstable feature flag.
1381
+ ///
1382
+ /// ### Example
1383
+ ///
1384
+ /// ```rust
1385
+ /// #[track_caller]
1386
+ /// async fn foo() {}
1387
+ /// ```
1388
+ ///
1389
+ /// {{produces}}
1390
+ ///
1391
+ /// ### Explanation
1392
+ ///
1393
+ /// The attribute must be used in conjunction with the
1394
+ /// [`closure_track_caller` feature flag]. Otherwise, the `#[track_caller]`
1395
+ /// annotation will function as as no-op.
1396
+ ///
1397
+ /// [`closure_track_caller` feature flag]: https://doc.rust-lang.org/beta/unstable-book/language-features/closure-track-caller.html
1379
1398
UNGATED_ASYNC_FN_TRACK_CALLER ,
1380
1399
Warn ,
1381
1400
"enabling track_caller on an async fn is a no-op unless the closure_track_caller feature is enabled"
You can’t perform that action at this time.
0 commit comments