{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/7196","labels_url":"https://api.github.com/repos/servo/servo/issues/7196/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/7196/comments","events_url":"https://api.github.com/repos/servo/servo/issues/7196/events","html_url":"https://github.com/servo/servo/pull/7196","id":100849491,"number":7196,"title":"Avoid marking codegen method bodies as unsafe twice","user":{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/servo/servo/labels/S-awaiting-merge","name":"S-awaiting-merge","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-13T19:31:06Z","updated_at":"2015-08-13T21:35:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/7196","html_url":"https://github.com/servo/servo/pull/7196","diff_url":"https://github.com/servo/servo/pull/7196.diff","patch_url":"https://github.com/servo/servo/pull/7196.patch"},"body":"`CGAbstractMethod` takes a couple boolean parameters, among others:\r\n\r\n* `extern`: will mark the method as `unsafe` and `extern`\r\n* `unsafe`: will wrap the method body in an `unsafe` block\r\n\r\nPassing both as `True` should not mark it as `unsafe` twice.\r\n\r\nExample from a generated `HTMLCollectionBinding.rs`:\r\n\r\nBefore:\r\n\r\n```\r\nunsafe extern fn get_length(..) -> u8 {\r\n    unsafe {\r\n        // code here\r\n    }\r\n}\r\n```\r\n\r\nAfter\r\n\r\n```\r\nunsafe extern fn get_length(..) -> u8 {\r\n    // code here\r\n}\r\n```\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/servo/servo/7196)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/130851411","html_url":"https://github.com/servo/servo/pull/7196#issuecomment-130851411","issue_url":"https://api.github.com/repos/servo/servo/issues/7196","id":130851411,"user":{"login":"bors-servo","id":4368172,"avatar_url":"https://avatars.githubusercontent.com/u/4368172?v=3","gravatar_id":"","url":"https://api.github.com/users/bors-servo","html_url":"https://github.com/bors-servo","followers_url":"https://api.github.com/users/bors-servo/followers","following_url":"https://api.github.com/users/bors-servo/following{/other_user}","gists_url":"https://api.github.com/users/bors-servo/gists{/gist_id}","starred_url":"https://api.github.com/users/bors-servo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors-servo/subscriptions","organizations_url":"https://api.github.com/users/bors-servo/orgs","repos_url":"https://api.github.com/users/bors-servo/repos","events_url":"https://api.github.com/users/bors-servo/events{/privacy}","received_events_url":"https://api.github.com/users/bors-servo/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T21:35:20Z","updated_at":"2015-08-13T21:35:20Z","body":":sunny: Test successful - [android](http://build.servo.org/builders/android/builds/2732), [gonk](http://build.servo.org/builders/gonk/builds/1887), [linux1](http://build.servo.org/builders/linux1/builds/2740), [linux2](http://build.servo.org/builders/linux2/builds/2758), [mac1](http://build.servo.org/builders/mac1/builds/2992), [mac2](http://build.servo.org/builders/mac2/builds/2982), [mac3](http://build.servo.org/builders/mac3/builds/934)"}}