2022-06-02 12:34:55 -07:00
|
|
|
//@run-rustfix
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
|
|
pub struct Vector2<T: Debug + Copy + Clone>{
|
|
|
|
pub x: T,
|
|
|
|
pub y: T
|
|
|
|
}
|
|
|
|
|
2023-03-07 23:55:51 +00:00
|
|
|
#[derive(Debug, Copy, Clone)] //~ ERROR the trait `Copy` cannot be implemented for this type
|
2024-02-09 12:17:55 +00:00
|
|
|
pub struct AABB<K: Copy + Debug + std::fmt::Debug + std::fmt::Debug + std::fmt::Debug>{
|
2024-02-02 08:36:46 +00:00
|
|
|
pub loc: Vector2<K>, //~ ERROR `K` doesn't implement `Debug`
|
2024-02-09 12:17:55 +00:00
|
|
|
//~^ ERROR `K` doesn't implement `Debug`
|
|
|
|
pub size: Vector2<K> //~ ERROR `K` doesn't implement `Debug`
|
2022-06-02 12:34:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|