{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/50260","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/50260/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/50260/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/50260/events","html_url":"https://github.com/rust-lang/rust/pull/50260","id":318227035,"number":50260,"title":"[WIP] idiom lints for removing `extern crate`","user":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars2.githubusercontent.com/u/1617736?v=4","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"labels":[{"id":583426710,"url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-review","name":"S-waiting-on-review","color":"d3dddd","default":false}],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-26T23:11:16Z","updated_at":"2018-04-27T01:05:19Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/50260","html_url":"https://github.com/rust-lang/rust/pull/50260","diff_url":"https://github.com/rust-lang/rust/pull/50260.diff","patch_url":"https://github.com/rust-lang/rust/pull/50260.patch"},"body":"Based off of https://github.com/rust-lang/rust/pull/49789\r\n\r\nThis contains two lints:\r\n\r\n - One that suggests replacing pub extern crates with pub use, and removing non-pub extern crates entirely\r\n - One that suggests rewriting `use modulename::...::cratename::foo` as `cratename::foo`\r\n\r\n\r\nThe latter is a bit tricky to emit suggestions for; for one this involves splicing spans (never a good idea), and it also won't be able to correctly\r\nhandle `use module::{cratename, foo}` and use-trees. I'm not sure how to proceed here. Currently it doesn't suggest anything at all.\r\n\r\n\r\nPerhaps we can go the other way and suggest removal of all extern crates _except_ those used through modules (stash node ids somewhere) and suggest replacing those with `<visibility> use`?\r\n\r\nr? @nikomatsakis\r\n\r\nfixes https://github.com/rust-lang/rust/issues/48719\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/384833032","html_url":"https://github.com/rust-lang/rust/pull/50260#issuecomment-384833032","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/50260","id":384833032,"user":{"login":"rust-highfive","id":7378925,"avatar_url":"https://avatars3.githubusercontent.com/u/7378925?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-highfive","html_url":"https://github.com/rust-highfive","followers_url":"https://api.github.com/users/rust-highfive/followers","following_url":"https://api.github.com/users/rust-highfive/following{/other_user}","gists_url":"https://api.github.com/users/rust-highfive/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-highfive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-highfive/subscriptions","organizations_url":"https://api.github.com/users/rust-highfive/orgs","repos_url":"https://api.github.com/users/rust-highfive/repos","events_url":"https://api.github.com/users/rust-highfive/events{/privacy}","received_events_url":"https://api.github.com/users/rust-highfive/received_events","type":"User","site_admin":false},"created_at":"2018-04-27T01:05:19Z","updated_at":"2018-04-27T01:05:19Z","author_association":"COLLABORATOR","body":"\nThe job `x86_64-gnu-llvm-3.9` of your PR [failed on Travis](https://travis-ci.org/rust-lang/rust/jobs/371806597) ([raw log](https://api.travis-ci.org/v3/job/371806597/log.txt)). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.\n\n<details><summary><i>Click to expand the log.</i></summary>\n\n```plain\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.\n  InsecurePlatformWarning\n  Downloading https://files.pythonhosted.org/packages/26/a5/981fcedb0cba5cd167382878c92956229d14f0ac6846c71f2cd87906d474/awscli-1.15.10-py2.py3-none-any.whl (1.3MB)\n    0% |▎                               | 10kB 9.7MB/s eta 0:00:01\n    1% |▌                               | 20kB 1.7MB/s eta 0:00:01\n    2% |▉                               | 30kB 2.0MB/s eta 0:00:01\n    3% |█                               | 40kB 1.9MB/s eta 0:00:01\n---\n  Downloading https://files.pythonhosted.org/packages/b7/8e/ddb32ddaabd431813e180ca224e844bab8ad42fbb47ee07553f0ec44cd86/colorama-0.3.7-py2.py3-none-any.whl\nCollecting botocore==1.10.10 (from awscli)\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.\n  InsecurePlatformWarning\n  Downloading https://files.pythonhosted.org/packages/77/c9/a40ebce24bbab4c7986fccdac9dade097385ad2feae73dcc47d31a1b4dc8/botocore-1.10.10-py2.py3-none-any.whl (4.2MB)\n    0% |                                | 10kB 44.1MB/s eta 0:00:01\n    0% |▏                               | 20kB 27.3MB/s eta 0:00:01\n    0% |▎                               | 30kB 32.5MB/s eta 0:00:01\n    0% |▎                               | 40kB 13.9MB/s eta 0:00:01\n---\n[00:56:50] ......i....................................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds\n[00:56:54] .........\n[00:57:28] ....................................................................................................\n[00:57:57] .......................................................................ii...........................\n[00:58:50] ...................................i....................................................i.ii......test [run-pass] run-pass/saturating-float-casts.rs has been running for over 60 seconds\n[00:59:36] ................................................................................................iiii\n[01:00:03] iii.................................................................................................\n[01:00:33] ....................................................................................................\n[01:00:59] ....................................................................................................\n---\ntravis_time:start:test_run-make-fulldeps\nCheck compiletest suite=run-make-fulldeps mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)\n[01:35:10] \n[01:35:10] running 183 tests\n[01:35:58] .................................................F..................................................\n[01:36:47] ..................................................................................test [run-make] run-make-fulldeps/long-linker-command-lines has been running for over 60 seconds\nn-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu  ep-vec.rs\n[01:37:56] LD_LIBRARY_PATH=\"/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib:\" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu  basic.rs --extern ep_lib=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu/libep_lib.rlib\n[01:37:56] LD_LIBRARY_PATH=\"/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/extern-prelude.stage2-x86_64-unknown-linux-gnu:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib:\" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown    |\n[01:37:56] \n[01:37:56] \n[01:37:56] error[E0599]: no method named `internal` found for type `ep_lib::S` in the current scope\n[01:37:56]   --> inner-mod.rs:18:7\n[01:37:56]    |\n[01:37:56] 18 |     s.internal(); // OK\n[01:37:56]    |\n[01:37:56]    |\n[01:37:56]    = help: did you mean `external`?\n[01:37:56] error: aborting due to previous error\n[01:37:56] \n[01:37:56] For more information about this error, try `rustc --explain E0599`.\n[01:37:56] For more information about this error, try `rustc --explain E0599`.\n[01:37:56] make[1]: *** [all] Error 101\n[01:37:56] ------------------------------------------\n[01:37:56] \n[01:37:56] \n[01:37:56] thread '[run-make] run-make-fulldeps/extern-prelude' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2963:9\n[01:37:56] \n[01:37:56] \n[01:37:56] failures:\n[01:37:56]     [run-make] run-make-fulldeps/extern-prelude\n[01:37:56]     [run-make] run-make-fulldeps/extern-prelude\n[01:37:56] \n[01:37:56] test result: FAILED. 182 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out\n[01:37:56] \n[01:37:56] \n[01:37:56] \n[01:37:56] command did not execute successfully: \"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest\" \"--compile-lib-path\" \"/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib\" \"--run-lib-path\" \"/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib\" \"--rustc-path\" \"/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc\" \"--rustdoc-path\" \"/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc\" \"--src-base\" \"/checkout/src/test/run-make-fulldeps\" \"--build-base\" \"/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps\" \"--stage-id\" \"stage2-x86_64-unknown-linux-gnu\" \"--mode\" \"run-make\" \"--target\" \"x86_64-unknown-linux-gnu\" \"--host\" \"x86_64-unknown-linux-gnu\" \"--llvm-filecheck\" \"/usr/lib/llvm-3.9/bin/FileCheck\" \"--host-rustcflags\" \"-Crpath -O -Zunstable-options \" \"--target-rustcflags\" \"-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers\" \"--docck-python\" \"/usr/bin/python2.7\" \"--lldb-python\" \"/usr/bin/python2.7\" \"--gdb\" \"/usr/bin/gdb\" \"--quiet\" \"--llvm-version\" \"3.9.1\\n\" \"--system-llvm\" \"--cc\" \"cc\" \"--cxx\" \"c++\" \"--cflags\" \"-ffunction-sections -fdata-sections -fPIC -m64\" \"--llvm-components\" \"aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils all all-targets amdgpu amdgpuasmparser amdgpuasmprinter amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armasmprinter armcodegen armdesc armdisassembler arminfo asmparser asmprinter bitreader bitwriter bpf bpfasmprinter bpfcodegen bpfdesc bpfinfo codegen core coverage debuginfocodeview debuginfodwarf debuginfopdb engine executionengine globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter nvptxcodegen nvptxdesc nvptxinfo \"$RUN_SCRIPT\"\" exited with 2.\n$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)\nFri Apr 27 01:05:14 UTC 2018\nFri, 27 Apr 2018 01:05:14 GMT\ntravis_time:end:002f1778:start=1524791114756601316,finish=1524791114829162918,duration=72561602\n```\n\n</details><p></p>\n\n[I'm a bot](https://github.com/rust-ops/rust-log-analyzer)! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact **`@TimNN`**. ([Feature Requests](https://github.com/rust-ops/rust-log-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request))\n        "}}
{"actor":{"display_login":"rust-highfive"}}