rust/tests/ui/derives/derive-marker-tricky.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
360 B
Rust
Raw Normal View History

// Test that `#[rustc_copy_clone_marker]` is not injected when a user-defined derive shadows
// a built-in derive in non-trivial scope (e.g. in a nested module).
//@ check-pass
//@ aux-build:derive-marker-tricky.rs
extern crate derive_marker_tricky;
mod m {
use derive_marker_tricky::NoMarker as Copy;
#[derive(Copy)]
struct S;
}
fn main() {}