/// nothing more than copy the object, which is what `#[derive(Copy, Clone)]`
/// gets you.
///
- /// ### Known problems
- /// Bounds of generic types are sometimes wrong: https://github.com/rust-lang/rust/issues/26925
- ///
/// ### Example
/// ```rust,ignore
/// #[derive(Copy)]
if_chain! {
if let Some(header) = kind.header();
- if let Unsafety::Unsafe = header.unsafety;
+ if header.unsafety == Unsafety::Unsafe;
then {
self.has_unsafe = true;
}
}
if let ExprKind::Block(block, _) = expr.kind {
- if let BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) = block.rules {
+ if block.rules == BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) {
self.has_unsafe = true;
}
}