Files
rust/tests/ui/traits/copy-trait-implicit-copy.rs
2025-06-04 17:48:50 +05:00

16 lines
304 B
Rust

//! Tests that type parameters with the `Copy` are implicitly copyable.
//@ run-pass
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
#![allow(dead_code)]
fn can_copy_copy<T: Copy>(v: T) {
let _a = v;
let _b = v;
}
pub fn main() {}