{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/25133","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/25133/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/25133/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/25133/events","html_url":"https://github.com/rust-lang/rust/issues/25133","id":73449202,"number":25133,"title":"Potentially misleading compiler error for unfinished line with Option<T>","user":{"login":"DoumanAsh","id":5676053,"avatar_url":"https://avatars.githubusercontent.com/u/5676053?v=3","gravatar_id":"","url":"https://api.github.com/users/DoumanAsh","html_url":"https://github.com/DoumanAsh","followers_url":"https://api.github.com/users/DoumanAsh/followers","following_url":"https://api.github.com/users/DoumanAsh/following{/other_user}","gists_url":"https://api.github.com/users/DoumanAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/DoumanAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoumanAsh/subscriptions","organizations_url":"https://api.github.com/users/DoumanAsh/orgs","repos_url":"https://api.github.com/users/DoumanAsh/repos","events_url":"https://api.github.com/users/DoumanAsh/events{/privacy}","received_events_url":"https://api.github.com/users/DoumanAsh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-05T22:18:47Z","updated_at":"2015-05-05T22:18:47Z","closed_at":null,"body":"Next code:\r\n\r\n```\r\nuse std::io::{Read, stdin};\r\n\r\nfn main() {\r\n    stdin().bytes().next()\r\n}\r\n```\r\n\r\nGives this compile error:\r\n```\r\nE:\\Downloads\\Git\\collectionScripts\\rust\r\n [master +2 ~1 -0 !] > rustc.exe .\\temp.rs\r\n.\\temp.rs:4:5: 4:27 error: mismatched types:\r\n expected `()`,\r\n    found `core::option::Option<core::result::Result<u8, std::io::error::Error>>`\r\n(expected (),\r\n    found enum `core::option::Option`) [E0308]\r\n.\\temp.rs:4     stdin().bytes().next()\r\n                ^~~~~~~~~~~~~~~~~~~~~~\r\nerror: aborting due to previous error\r\n```\r\nWhich is a bit misleading as there is actually we're missing either ; or unwrap() i think?\r\n\r\nRust version:\r\n```\r\nrustc 1.0.0-beta.4 (850151a75 2015-04-30) (built 2015-05-01)\r\nbinary: rustc\r\ncommit-hash: 850151a75709f146addd30bbbf1f23d384f0b381\r\ncommit-date: 2015-04-30\r\nbuild-date: 2015-05-01\r\nhost: x86_64-pc-windows-gnu\r\nrelease: 1.0.0-beta.4\r\n```\r\n"}}