{"action":"created","issue":{"url":"https://api.github.com/repos/servo/string-cache/issues/69","labels_url":"https://api.github.com/repos/servo/string-cache/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/servo/string-cache/issues/69/comments","events_url":"https://api.github.com/repos/servo/string-cache/issues/69/events","html_url":"https://github.com/servo/string-cache/pull/69","id":59076500,"number":69,"title":"Upgrade to rustc 1.0.0-nightly (4db0b3246 2015-02-25) (built 2015-02-26)","user":{"login":"SimonSapin","id":291359,"avatar_url":"https://avatars.githubusercontent.com/u/291359?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-26T14:02:35Z","updated_at":"2015-02-26T21:10:55Z","closed_at":"2015-02-26T21:10:54Z","pull_request":{"url":"https://api.github.com/repos/servo/string-cache/pulls/69","html_url":"https://github.com/servo/string-cache/pull/69","diff_url":"https://github.com/servo/string-cache/pull/69.diff","patch_url":"https://github.com/servo/string-cache/pull/69.patch"},"body":"This makes it build again, but it have no idea what I’m doing. Please review for memory safety.\r\n\r\nlibcore now has ` impl<T> !Send for *mut T { }`, which might be what causes:\r\n\r\n```\r\nsrc/atom/mod.rs:59:1: 59:42 error: conflicting implementations for trait `core::marker::Send` [E0119]\r\nsrc/atom/mod.rs:59 unsafe impl Send for *mut StringCacheEntry { }\r\n                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nsrc/atom/mod.rs:59:1: 59:42 note: conflicting implementation in crate `core`\r\nsrc/atom/mod.rs:59 unsafe impl Send for *mut StringCacheEntry { }\r\n                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n```"},"comment":{"url":"https://api.github.com/repos/servo/string-cache/issues/comments/76274170","html_url":"https://github.com/servo/string-cache/pull/69#issuecomment-76274170","issue_url":"https://api.github.com/repos/servo/string-cache/issues/69","id":76274170,"user":{"login":"kmcallister","id":444997,"avatar_url":"https://avatars.githubusercontent.com/u/444997?v=3","gravatar_id":"","url":"https://api.github.com/users/kmcallister","html_url":"https://github.com/kmcallister","followers_url":"https://api.github.com/users/kmcallister/followers","following_url":"https://api.github.com/users/kmcallister/following{/other_user}","gists_url":"https://api.github.com/users/kmcallister/gists{/gist_id}","starred_url":"https://api.github.com/users/kmcallister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmcallister/subscriptions","organizations_url":"https://api.github.com/users/kmcallister/orgs","repos_url":"https://api.github.com/users/kmcallister/repos","events_url":"https://api.github.com/users/kmcallister/events{/privacy}","received_events_url":"https://api.github.com/users/kmcallister/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T21:10:55Z","updated_at":"2015-02-26T21:10:55Z","body":"It seems like both `buckets` and `next_in_bucket` should use `ptr::Unique<StringCacheEntry>`.  This expresses the ownership relationship and therefore enables `StringCache` to be `Send` without an `unsafe impl`.\r\n\r\nI started doing this, and it's rather tricky! `Unique` is non-nullable, for one.  That's solvable with `Option` but then I ran into the problem that `Unique` isn't `Copy` (nor should it be), which complicates the insert / remove code.  I think it's pushing me towards a design with less aliasing and more clear ownership, but I didn't quite get there.\r\n\r\nThe `unsafe impl` is a reasonable fix for now.  It avoids sweeping changes to unsafe code that by all indications is working correctly."}}