{"action":"closed","issue":{"url":"https://api.github.com/repos/racer-rust/racer/issues/856","repository_url":"https://api.github.com/repos/racer-rust/racer","labels_url":"https://api.github.com/repos/racer-rust/racer/issues/856/labels{/name}","comments_url":"https://api.github.com/repos/racer-rust/racer/issues/856/comments","events_url":"https://api.github.com/repos/racer-rust/racer/issues/856/events","html_url":"https://github.com/racer-rust/racer/issues/856","id":325181214,"node_id":"MDU6SXNzdWUzMjUxODEyMTQ=","number":856,"title":"panick at 'Statement has a beginning' in one-line closure","user":{"login":"Dushistov","id":156697,"node_id":"MDQ6VXNlcjE1NjY5Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/156697?v=4","gravatar_id":"","url":"https://api.github.com/users/Dushistov","html_url":"https://github.com/Dushistov","followers_url":"https://api.github.com/users/Dushistov/followers","following_url":"https://api.github.com/users/Dushistov/following{/other_user}","gists_url":"https://api.github.com/users/Dushistov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dushistov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dushistov/subscriptions","organizations_url":"https://api.github.com/users/Dushistov/orgs","repos_url":"https://api.github.com/users/Dushistov/repos","events_url":"https://api.github.com/users/Dushistov/events{/privacy}","received_events_url":"https://api.github.com/users/Dushistov/received_events","type":"User","site_admin":false},"labels":[{"id":83838371,"node_id":"MDU6TGFiZWw4MzgzODM3MQ==","url":"https://api.github.com/repos/racer-rust/racer/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"kngwyu","id":16046705,"node_id":"MDQ6VXNlcjE2MDQ2NzA1","avatar_url":"https://avatars1.githubusercontent.com/u/16046705?v=4","gravatar_id":"","url":"https://api.github.com/users/kngwyu","html_url":"https://github.com/kngwyu","followers_url":"https://api.github.com/users/kngwyu/followers","following_url":"https://api.github.com/users/kngwyu/following{/other_user}","gists_url":"https://api.github.com/users/kngwyu/gists{/gist_id}","starred_url":"https://api.github.com/users/kngwyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kngwyu/subscriptions","organizations_url":"https://api.github.com/users/kngwyu/orgs","repos_url":"https://api.github.com/users/kngwyu/repos","events_url":"https://api.github.com/users/kngwyu/events{/privacy}","received_events_url":"https://api.github.com/users/kngwyu/received_events","type":"User","site_admin":false},"assignees":[{"login":"kngwyu","id":16046705,"node_id":"MDQ6VXNlcjE2MDQ2NzA1","avatar_url":"https://avatars1.githubusercontent.com/u/16046705?v=4","gravatar_id":"","url":"https://api.github.com/users/kngwyu","html_url":"https://github.com/kngwyu","followers_url":"https://api.github.com/users/kngwyu/followers","following_url":"https://api.github.com/users/kngwyu/following{/other_user}","gists_url":"https://api.github.com/users/kngwyu/gists{/gist_id}","starred_url":"https://api.github.com/users/kngwyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kngwyu/subscriptions","organizations_url":"https://api.github.com/users/kngwyu/orgs","repos_url":"https://api.github.com/users/kngwyu/repos","events_url":"https://api.github.com/users/kngwyu/events{/privacy}","received_events_url":"https://api.github.com/users/kngwyu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-05-22T08:02:13Z","updated_at":"2018-07-15T14:11:48Z","closed_at":"2018-07-15T14:11:48Z","author_association":"NONE","body":"I use `racer 2.0.14`,\r\nwhen I try put cursor at `v.to_str` and exec `M-x racer-find-definition` `racer panicked`\r\n\r\n```Rust\r\nextern crate walkdir;\r\n\r\nuse std::path::Path;\r\nuse walkdir::WalkDir;\r\n\r\nfn boo() {\r\n    let walker = WalkDir::new(Path::new(\"skia\"))\r\n        .follow_links(false)\r\n        .into_iter();\r\n    for entry in walker {\r\n        let e = entry.unwrap_or_else(|err| panic!(\"walkdir entry error: {}\", err));\r\n        if e.file_type().is_file() {\r\n            if let Some(Some(name)) = e.path().extension().map(|v| v.to_str()) {\r\n                let name = name.to_lowercase();\r\n                if name.ends_with(\"sit\") || name.ends_with(\"map\") {\r\n                    println!(\"entry {:?}\", e.path());\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n```sh\r\nRUST_BACKTRACE=1 CARGO_HOME=/home/evgeniy/.cargo RUST_SRC_PATH=/home/evgeniy/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src /home/evgeniy/.cargo/bin/racer find-definition 13 70 /tmp/racer-bug/src/main.rs\r\nthread 'main' panicked at 'Statement has a beginning', libcore/option.rs:916:5\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49\r\n   1: std::sys_common::backtrace::print\r\n             at libstd/sys_common/backtrace.rs:71\r\n             at libstd/sys_common/backtrace.rs:59\r\n   2: std::panicking::default_hook::{{closure}}\r\n             at libstd/panicking.rs:207\r\n   3: std::panicking::default_hook\r\n             at libstd/panicking.rs:223\r\n   4: std::panicking::rust_panic_with_hook\r\n             at libstd/panicking.rs:402\r\n   5: std::panicking::begin_panic_fmt\r\n             at libstd/panicking.rs:349\r\n   6: rust_begin_unwind\r\n             at libstd/panicking.rs:325\r\n   7: core::panicking::panic_fmt\r\n             at libcore/panicking.rs:72\r\n   8: core::option::expect_failed\r\n             at libcore/option.rs:916\r\n   9: racer::typeinf::get_type_of_match\r\n             at /checkout/src/libcore/option.rs:302\r\n             at src/racer/scopes.rs:77\r\n             at src/racer/typeinf.rs:130\r\n             at src/racer/typeinf.rs:278\r\n  10: <racer::ast::ExprTypeVisitor<'c, 's> as syntex_syntax::visit::Visitor>::visit_expr\r\n             at src/racer/ast.rs:538\r\n             at /checkout/src/libcore/option.rs:612\r\n             at src/racer/ast.rs:533\r\n  11: racer::ast::get_type_of\r\n             at src/racer/ast.rs:1158\r\n  12: racer::core::find_definition_\r\n             at src/racer/core.rs:1194\r\n  13: racer::core::find_definition\r\n             at /home/evgeniy/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.0.14/src/racer/core.rs:1143\r\n  14: racer::run\r\n             at src/bin/main.rs:179\r\n             at src/bin/main.rs:501\r\n  15: racer::main\r\n             at src/bin/main.rs:487\r\n  16: std::rt::lang_start::{{closure}}\r\n             at /checkout/src/libstd/rt.rs:74\r\n  17: std::panicking::try::do_call\r\n             at libstd/rt.rs:59\r\n             at libstd/panicking.rs:306\r\n  18: __rust_maybe_catch_panic\r\n             at libpanic_unwind/lib.rs:102\r\n  19: std::rt::lang_start_internal\r\n             at libstd/panicking.rs:285\r\n             at libstd/panic.rs:361\r\n             at libstd/rt.rs:58\r\n  20: main\r\n  21: __libc_start_main\r\n  22: _start\r\n/tmp/racer-bug/src $ \r\n```\r\nI attached code with dummy crate that helps reproduce problem.\r\n\r\n[racer-bug.zip](https://github.com/racer-rust/racer/files/2025541/racer-bug.zip)\r\n"}}
{"actor":{"display_login":"kngwyu"}}