{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/23504638","id":23504638,"diff_hunk":"@@ -0,0 +1,371 @@\n+% Concurrency\n+\n+Concurrency and parallelism are incredibly important topics in computer\n+science, and are also a hot topic in industry today. Computers are gaining more\n+and more cores, yet many programmers aren't prepared to fully utilize them.\n+\n+Rust's memory safety features also apply to its concurrency story too. Even\n+concurrent Rust programs must be memory safe. Rust's type system is up to the\n+task, and gives you powerful ways to reason about concurrent code at compile\n+time.\n+\n+Before we talk about the concurrency features that come with Rust, it's important\n+to understand something: Rust is low-level enough that all of this is provided\n+by the standard library, not by the language. This means that if you don't like\n+some aspect of the way Rust handles concurrency, you can implement an alternative\n+way of doing things. [mio](https://github.com/carllerche/mio) is a real-world\n+example of this principle in action.\n+\n+## Background: `Send` and `Sync`\n+\n+Concurrency is difficult to reason about. In Rust, we have a strong, static\n+type system to help us reason about our code. As such, Rust gives us two traits\n+to help us make sense of code that can possibly be concurrent.\n+\n+### `Send`\n+\n+The first type we're going to talk about is\n+[`Send`](std/marker/trait.Send.html). When a type `T` implements `Send`, it indicates\n+to the compiler that something of this type is able to have ownership transferred\n+safely between threads.\n+\n+This is important to enforce certain restrictions. For example, if we have a\n+channel connecting two threads, we would want to be able to send some data\n+down the channel and to the other thread. Therefore, we'd implement `Send` on\n+that type.\n+\n+In the opposite way, if we were wrapping a library with FFI that isn't\n+threadsafe, we wouldn't want to implement `Send`, and so the compiler will help\n+us enforce that it can't leave the current thread.\n+\n+### `Sync`\n+\n+The second of these two types is called [`Sync`](std/marker/trait.Sync.html).\n+When a type `T` implements `Sync`, it indicates to the compiler that something\n+of this type has no possibility of introducing memory unsafety when passing\n+`&T`s between threads.\n+\n+For example, sharing immutable data with an atomic reference count is\n+threadsafe. Rust provides a type like this, `Arc<T>`, and it implements `Sync`,\n+so that it could be safely shared between threads.\n+\n+These two types allow you to use the type system to make strong guarantees\n+about the properties of your code under concurrency. Before we demonstrate\n+why, we need to learn how to create a concurrent Rust program in the first\n+place!\n+\n+## Threads\n+\n+Rust's standard library provides a library for 'threads', which allow you to\n+run Rust code in parallel. Here's a basic example of using `Thread`:\n+\n+```\n+use std::thread::Thread;\n+\n+fn main() {\n+    Thread::scoped(|| {\n+        println!(\"Hello from a thread!\");\n+    });\n+}\n+```\n+\n+The `Thread::scoped()` method accepts a closure, which is executed in a new\n+thread. It's called `scoped` because this thread returns a join guard:\n+\n+```\n+use std::thread::Thread;\n+\n+fn main() {\n+    let guard = Thread::scoped(|| {\n+        println!(\"Hello from a thread!\");\n+    });\n+\n+    // guard goes out of scope here\n+}\n+```\n+\n+When `guard` goes out of scope, it will block execution until the thread is\n+finished. If we didn't want this behaviour, we could use `Thread::spawn()`:\n+\n+```\n+use std::thread::Thread;\n+use std::io::timer;\n+use std::time::Duration;\n+\n+fn main() {\n+    Thread::spawn(|| {\n+        println!(\"Hello from a thread!\");\n+    });\n+\n+    timer::sleep(Duration::milliseconds(50));\n+}\n+```\n+\n+We need to `sleep` here because when `main()` ends, it kills all of the\n+running threads.\n+\n+[`scoped`](std/thread/struct.Builder.html#method.scoped) has an interesting\n+type signature:\n+\n+```text\n+fn scoped<'a, T, F>(self, f: F) -> JoinGuard<'a, T>\n+    where T: Send + 'a,\n+          F: FnOnce() -> T,\n+          F: Send + 'a\n+```\n+\n+Specifically, `F`, the closure that we pass to execute in the new thread.\n+It has two restrictions: It must be a `FnOnce` from `()` to `T`. This allows\n+us to take ownership of any data it mentions from the parent thread. The other\n+restriction is that `F` must be `Send`. We aren't allowed to transfer this\n+ownership unless the type thinks that's okay.\n+\n+Many languages have the ability to execute threads, but it's wildly unsafe.\n+There are entire books about how to prevent errors that occur from shared\n+mutable state. Rust helps out with its type system here as well, by preventing\n+data races at compile time. Let's talk about how you actually share things\n+between threads.\n+\n+## Safe Shared Mutable State\n+\n+Due to Rust's type system, we have a concept that sounds like a lie: \"safe\n+shared mutable state.\" Many programmers agree that shared mutable state is\n+very, very bad.\n+\n+Someone once said this:\n+\n+> Shared mutable state is the root of all evil. Most languages attempt to deal\n+> with this problem through the 'mutable' part, but Rust deals with it by\n+> solving the 'shared' part.\n+\n+The same [ownership system](ownership.html) that helps prevent using pointers\n+incorrectly also helps rule out data races, one of the worst kinds of\n+concurrency bugs.\n+\n+As an example, here is a Rust program that would have a data race in many\n+languages. It will not compile:\n+\n+```ignore\n+use std::thread::Thread;\n+use std::io::timer;\n+use std::time::Duration;\n+\n+fn main() {\n+    let mut data = vec![1u32, 2, 3];\n+\n+    for i in 0 .. 2 {\n+        Thread::spawn(move || {\n+            data[i] += 1;\n+        });\n+    }\n+\n+    timer::sleep(Duration::milliseconds(50));\n+}\n+```\n+\n+This gives us an error:\n+\n+```text\n+12:17 error: capture of moved value: `data`\n+        data[i] += 1;\n+        ^~~~\n+```\n+\n+In this case, we know that our code _should_ be safe, but Rust isn't sure. And\n+it's actually not safe: if we had a reference to `data` in each thread, and the\n+thread takes ownership of the reference, we have three owners! That's bad. We\n+can fix this by using the `Arc<T>` type, which provides an atmoic reference\n+count. The 'atomic' part means that it's safe to share across threads.\n+\n+`Arc<T>` assumes one more property about its contents to ensure that it is safe\n+to share across threads: it assumes its contents are immutable. But in our\n+case, we want to be able to mutate the value. We need a type that can ensure\n+only one person at a time can mutate what's inside. For that, we can use the\n+`Mutex<T>` type. Here's the second version of our code. It still doesn't work,\n+but for a different reason:\n+\n+```ignore\n+use std::thread::Thread;\n+use std::io::timer;\n+use std::time::Duration;\n+use std::sync::Mutex;\n+\n+fn main() {\n+    let mut data = Mutex::new(vec![1u32, 2, 3]);\n+\n+    for i in 0 .. 2 {\n+        let data = data.lock().unwrap();\n+        Thread::spawn(move || {\n+            data[i] += 1;\n+        });\n+    }\n+\n+    timer::sleep(Duration::milliseconds(50));\n+}\n+```\n+\n+Here's the error:\n+\n+```text\n+error: the trait `core::marker::Send` is not implemented for the type `core::marker::NoSend`\n+```\n+\n+You see, [`Mutex`](std/sync/struct.Mutex.html) has a\n+[`lock`](http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.lock)\n+method which has this siganture:\n+\n+```ignore\n+fn lock(&self) -> LockResult<MutexGuard<T>>\n+```\n+\n+If we [look at the code for MutexGuard](https://github.com/rust-lang/rust/blob/896cb36ecab3eaeb7f101087e030e43771eca5ca/src/libstd/sync/mutex.rs#L163-L170), we'll see\n+this:\n+\n+```ignore\n+__marker: marker::NoSend,\n+```\n+\n+Because our guard is `NoSend`, it's not `Send`. Which means we can't actually\n+transfer the guard across task boundaries, which gives us our error.\n+\n+The [`Arc<T>`](std/sync/struct.Arc.html) type is the answer. An `Arc<T>` allows\n+us to reference count some data using atomic operations, which will allow our\n+code to work. Here's the working version:\n+\n+```\n+use std::sync::{Arc, Mutex};\n+use std::thread::Thread;\n+use std::io::timer;\n+use std::time::Duration;\n+\n+fn main() {\n+    let data = Arc::new(Mutex::new(0u32));","path":"src/doc/trpl/concurrency.md","position":242,"original_position":242,"commit_id":"dd92a0e3480819b28541bcdac8cb913628044d18","original_commit_id":"dd92a0e3480819b28541bcdac8cb913628044d18","user":{"login":"Nemikolh","id":4008156,"avatar_url":"https://avatars.githubusercontent.com/u/4008156?v=3","gravatar_id":"","url":"https://api.github.com/users/Nemikolh","html_url":"https://github.com/Nemikolh","followers_url":"https://api.github.com/users/Nemikolh/followers","following_url":"https://api.github.com/users/Nemikolh/following{/other_user}","gists_url":"https://api.github.com/users/Nemikolh/gists{/gist_id}","starred_url":"https://api.github.com/users/Nemikolh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nemikolh/subscriptions","organizations_url":"https://api.github.com/users/Nemikolh/orgs","repos_url":"https://api.github.com/users/Nemikolh/repos","events_url":"https://api.github.com/users/Nemikolh/events{/privacy}","received_events_url":"https://api.github.com/users/Nemikolh/received_events","type":"User","site_admin":false},"body":"It's a bit confusing that the type of data is changed from `Vec<u32>` to `u32` here. The code should be consistent with previous examples.\r\n\r\nAlso if you want to keep `Vec<u32>`, the range must be written as `0us .. 2` otherwise you get the following error:\r\n```\r\nerror: the trait `core::ops::IndexMut<i32>` is not implemented \r\n       for the type `collections::vec::Vec<u32>` [E0277]\r\n```\r\n\r\nTypos asides, nice work! :)","created_at":"2015-01-25T14:53:47Z","updated_at":"2015-01-25T14:53:47Z","html_url":"https://github.com/rust-lang/rust/pull/21152#discussion_r23504638","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/21152","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/23504638"},"html":{"href":"https://github.com/rust-lang/rust/pull/21152#discussion_r23504638"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/21152"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/21152","id":27372286,"html_url":"https://github.com/rust-lang/rust/pull/21152","diff_url":"https://github.com/rust-lang/rust/pull/21152.diff","patch_url":"https://github.com/rust-lang/rust/pull/21152.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/21152","number":21152,"state":"open","locked":false,"title":"Revamped \"Threads\" documentation","user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"body":"This moves the \"Tasks\" chapter to a \"Concurrency\" one, as it's about threads, but also about how to deal with concurrency issues.\r\n\r\nr? @aturon ","created_at":"2015-01-14T18:39:05Z","updated_at":"2015-01-25T14:53:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fcf41e1b2a3e724ecbdb3d159c10a8991ff180a","assignee":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/21152/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/21152/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/21152/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/dd92a0e3480819b28541bcdac8cb913628044d18","head":{"label":"steveklabnik:tasks","ref":"tasks","sha":"dd92a0e3480819b28541bcdac8cb913628044d18","user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"repo":{"id":7349289,"name":"rust","full_name":"steveklabnik/rust","owner":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/steveklabnik/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/steveklabnik/rust","forks_url":"https://api.github.com/repos/steveklabnik/rust/forks","keys_url":"https://api.github.com/repos/steveklabnik/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/steveklabnik/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/steveklabnik/rust/teams","hooks_url":"https://api.github.com/repos/steveklabnik/rust/hooks","issue_events_url":"https://api.github.com/repos/steveklabnik/rust/issues/events{/number}","events_url":"https://api.github.com/repos/steveklabnik/rust/events","assignees_url":"https://api.github.com/repos/steveklabnik/rust/assignees{/user}","branches_url":"https://api.github.com/repos/steveklabnik/rust/branches{/branch}","tags_url":"https://api.github.com/repos/steveklabnik/rust/tags","blobs_url":"https://api.github.com/repos/steveklabnik/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/steveklabnik/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/steveklabnik/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/steveklabnik/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/steveklabnik/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/steveklabnik/rust/languages","stargazers_url":"https://api.github.com/repos/steveklabnik/rust/stargazers","contributors_url":"https://api.github.com/repos/steveklabnik/rust/contributors","subscribers_url":"https://api.github.com/repos/steveklabnik/rust/subscribers","subscription_url":"https://api.github.com/repos/steveklabnik/rust/subscription","commits_url":"https://api.github.com/repos/steveklabnik/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/steveklabnik/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/steveklabnik/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/steveklabnik/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/steveklabnik/rust/contents/{+path}","compare_url":"https://api.github.com/repos/steveklabnik/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/steveklabnik/rust/merges","archive_url":"https://api.github.com/repos/steveklabnik/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/steveklabnik/rust/downloads","issues_url":"https://api.github.com/repos/steveklabnik/rust/issues{/number}","pulls_url":"https://api.github.com/repos/steveklabnik/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/steveklabnik/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/steveklabnik/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/steveklabnik/rust/labels{/name}","releases_url":"https://api.github.com/repos/steveklabnik/rust/releases{/id}","created_at":"2012-12-28T03:07:04Z","updated_at":"2015-01-20T22:23:13Z","pushed_at":"2015-01-23T21:43:13Z","git_url":"git://github.com/steveklabnik/rust.git","ssh_url":"git@github.com:steveklabnik/rust.git","clone_url":"https://github.com/steveklabnik/rust.git","svn_url":"https://github.com/steveklabnik/rust","homepage":"http://www.rust-lang.org","size":226331,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"aedcbb9d82ccd7ead4b075ff55a99e363be94174","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"a safe, concurrent, practical language","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2015-01-25T14:52:20Z","pushed_at":"2015-01-25T13:33:19Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":447305,"stargazers_count":9042,"watchers_count":9042,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1745,"mirror_url":null,"open_issues_count":2151,"forks":1745,"open_issues":2151,"watchers":9042,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/21152"},"html":{"href":"https://github.com/rust-lang/rust/pull/21152"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/21152"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/21152/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/21152/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/21152/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/dd92a0e3480819b28541bcdac8cb913628044d18"}}}}