{"provider_url":"https://hatena.blog","blog_url":"https://qnighy.hatenablog.com/","url":"https://qnighy.hatenablog.com/entry/2017/06/01/070000","provider_name":"Hatena Blog","categories":["Rust"],"height":"190","type":"rich","description":"\u6982\u8981: Rust\u306e derive \u306f\u3042\u307e\u308a\u982d\u304c\u3088\u304f\u306a\u3044\u3002 derive \u304c\u30c9\u30b8\u3092\u8e0f\u3080\u4f8b derive \u306e\u554f\u984c\u306f\u9855\u5728\u5316\u3057\u3084\u3059\u304f\u3001Rust\u30b3\u30f3\u30d1\u30a4\u30e9\u306eGitHub\u4e0a\u3067\u3082\u4f55\u5ea6\u3082\u91cd\u8907\u3059\u308bissue\u304c\u6295\u3052\u3089\u308c\u3066\u3044\u305f\u3002\u4eca\u306f\u4e3b\u306b #26925 \u3092\u4e2d\u5fc3\u306b\u8b70\u8ad6\u304c\u307e\u3068\u307e\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u53c2\u7167\u3059\u308b\u3068\u3088\u3044\u3060\u308d\u3046\u3002 \u4e0d\u5fc5\u8981\u306a\u5883\u754c\u3092\u4e0e\u3048\u308b\u4f8b use std::rc::Rc; // \u672c\u6765\u4e0d\u5fc5\u8981\u306a X: Clone \u3092\u8981\u6c42\u3059\u308b #[derive(Clone)] struct A<X>(Rc<X>); struct B; fn main() { A(Rc::new(B)).clone(); // Error } error\u2026","title":"Rust\u306ederive\u306f\u3042\u307e\u308a\u982d\u304c\u3088\u304f\u306a\u3044","width":"100%","author_name":"qnighy","author_url":"https://blog.hatena.ne.jp/qnighy/","published":"2017-06-01 07:00:00","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqnighy.hatenablog.com%2Fentry%2F2017%2F06%2F01%2F070000\" title=\"Rust\u306ederive\u306f\u3042\u307e\u308a\u982d\u304c\u3088\u304f\u306a\u3044 - \u7c21\u6f54\u306aQ\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"version":"1.0","blog_title":"\u7c21\u6f54\u306aQ"}