{"action":"created","issue":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2793","repository_url":"https://api.github.com/repos/intellij-rust/intellij-rust","labels_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2793/labels{/name}","comments_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2793/comments","events_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2793/events","html_url":"https://github.com/intellij-rust/intellij-rust/issues/2793","id":353928754,"node_id":"MDU6SXNzdWUzNTM5Mjg3NTQ=","number":2793,"title":"Code completion not working for external crates?","user":{"login":"typoon","id":775171,"node_id":"MDQ6VXNlcjc3NTE3MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/775171?v=4","gravatar_id":"","url":"https://api.github.com/users/typoon","html_url":"https://github.com/typoon","followers_url":"https://api.github.com/users/typoon/followers","following_url":"https://api.github.com/users/typoon/following{/other_user}","gists_url":"https://api.github.com/users/typoon/gists{/gist_id}","starred_url":"https://api.github.com/users/typoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typoon/subscriptions","organizations_url":"https://api.github.com/users/typoon/orgs","repos_url":"https://api.github.com/users/typoon/repos","events_url":"https://api.github.com/users/typoon/events{/privacy}","received_events_url":"https://api.github.com/users/typoon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-24T21:09:44Z","updated_at":"2018-08-25T08:12:53Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nHello and thank you for the issue!\r\nIf you would like to report a bug, we have added some points below that you can fill out.\r\nFeel free to remove all the irrelevant text to request a new feature.\r\n-->\r\n\r\n## Environment\r\n\r\nI have tried this with both CLion 2018.2.2 and IDEA Ultimate version 2018.2.2.\r\nThe Rust plugin version is 0.2.0.2103-182\r\n\r\nTried with both Rust 1.28 and nightly (1.30 at this time).\r\n\r\nOperating System is Ubuntu 17.10.\r\n\r\n## Problem description\r\n\r\nI have added an external crate to the project (rand), but can't get any code completin from it.\r\nI added the \"rand\" dependency in the Cargo.toml file and it was succesfully installed.\r\n\r\nWhen I add \"extern crate rand;\" to the code, the IDE understands it fine.\r\n\r\nIf I type \"use rand::<ctrl+space>\" to see the completions, I only see some defaults but none of the expected ones. See image below:\r\n\r\n![Code completion](https://i.imgur.com/bHkp7Aj.png)\r\n\r\nI expected to see for example the \"Rng\" module being suggested there.\r\n\r\n## Steps to reproduce\r\n\r\nCreate a new Rust project.\r\nAdd the following line to the `Cargo.toml` file:\r\n\r\n~~~\r\nrand = \"0.3\"\r\n~~~\r\n\r\nCompile the project.\r\n\r\nEdit the `main.rs` file and add the following code to it:\r\n\r\n~~~rust\r\nextern crate rand;\r\n\r\nuse rand::<ctrl+space>\r\n\r\nfn main() {\r\n}\r\n~~~"},"comment":{"url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/comments/415952288","html_url":"https://github.com/intellij-rust/intellij-rust/issues/2793#issuecomment-415952288","issue_url":"https://api.github.com/repos/intellij-rust/intellij-rust/issues/2793","id":415952288,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTk1MjI4OA==","user":{"login":"Undin","id":2539310,"node_id":"MDQ6VXNlcjI1MzkzMTA=","avatar_url":"https://avatars0.githubusercontent.com/u/2539310?v=4","gravatar_id":"","url":"https://api.github.com/users/Undin","html_url":"https://github.com/Undin","followers_url":"https://api.github.com/users/Undin/followers","following_url":"https://api.github.com/users/Undin/following{/other_user}","gists_url":"https://api.github.com/users/Undin/gists{/gist_id}","starred_url":"https://api.github.com/users/Undin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Undin/subscriptions","organizations_url":"https://api.github.com/users/Undin/orgs","repos_url":"https://api.github.com/users/Undin/repos","events_url":"https://api.github.com/users/Undin/events{/privacy}","received_events_url":"https://api.github.com/users/Undin/received_events","type":"User","site_admin":false},"created_at":"2018-08-25T08:12:53Z","updated_at":"2018-08-25T08:12:53Z","author_association":"MEMBER","body":"Looks like that your project model is not updated after changes in `Cargo.toml`\r\nTry to sync project explicitly via sync button in cargo toolwindow. Also check that option `Watch Cargo.toml` is enabled - it should update your project model automatically"}}
{"actor":{"display_login":"Undin"}}