Skip to content

Instantly share code, notes, and snippets.

@DougAnderson444
Created October 16, 2024 14:00
Show Gist options
  • Save DougAnderson444/dfdb0e4abf0c233a747c1b96344286db to your computer and use it in GitHub Desktop.
Save DougAnderson444/dfdb0e4abf0c233a747c1b96344286db to your computer and use it in GitHub Desktop.
auto-trait test / autotrait hack
// ensures you get compiler warnings if your type suddenly (unexpectantly) break autotraits
// from Rust for Rustaceans Book
mod tests {
use ipns_entry::entry::IpnsEntry;
fn is_normal<T: Sized + Send + Sync + Unpin>() {}
#[test]
fn normal_types() {
is_normal::<IpnsEntry>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment