Skip to content

Commit

Permalink
persist-client: ignore warning about #[track_caller]
Browse files Browse the repository at this point in the history
`#[track_caller]` has no effect on async functions currently, and the
compiler warns about that. However, fixing this is in progress ([0]).
Rather than removing the annotations from async functions, we instead
ignore the compiler warning, so we don't forget to add the annotations
again once [0] is implemented.

[0]: rust-lang/rust#87417
  • Loading branch information
teskje committed Jan 27, 2023
1 parent f492f39 commit 0cca9c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/persist-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 78,10 @@

#![doc = include_str!("../README.md")]
#![warn(missing_docs, missing_debug_implementations)]
// #[track_caller] is currently a no-op on async functions, but that hopefully won't be the case
// forever. So we already annotate those functions now and ignore the compiler warning until
// https://github.com/rust-lang/rust/issues/87417 pans out.
#![allow(ungated_async_fn_track_caller)]

use std::fmt::Debug;
use std::marker::PhantomData;
Expand Down

0 comments on commit 0cca9c8

Please sign in to comment.