2022-06-02 19:34:55 +00:00
|
|
|
//@ run-rustfix
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
2024-02-09 12:17:55 +00:00
|
|
|
pub struct Vector2<T: Debug + Copy + Clone> {
|
2022-06-02 19:34:55 +00:00
|
|
|
pub x: T,
|
2024-02-09 12:17:55 +00:00
|
|
|
pub y: T,
|
2022-06-02 19:34:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
2024-02-09 12:17:55 +00:00
|
|
|
pub struct AABB<K: Debug + std::marker::Copy + std::marker::Copy + std::marker::Copy + std::marker::Copy> {
|
2022-06-02 19:34:55 +00:00
|
|
|
pub loc: Vector2<K>, //~ ERROR the trait bound `K: Copy` is not satisfied
|
2024-02-09 12:17:55 +00:00
|
|
|
//~^ ERROR the trait bound `K: Copy` is not satisfied
|
|
|
|
//~| ERROR the trait bound `K: Copy` is not satisfied
|
|
|
|
pub size: Vector2<K>, //~ ERROR the trait bound `K: Copy` is not satisfied
|
2022-06-02 19:34:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|