about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-05-11 12:34:56 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-05-11 12:44:00 -0700
commit6de899f42db1901a637dd8c7d7b3c976d58200a2 (patch)
tree420f53e08503ba19729a7fab8c3515c0f556a503 /src/rustllvm/RustWrapper.cpp
parent6ecbe9b7f71b41422f9c9e45b1d31eefacea31a3 (diff)
downloadrust-6de899f42db1901a637dd8c7d7b3c976d58200a2.tar.gz
rust-6de899f42db1901a637dd8c7d7b3c976d58200a2.zip
rustc: Include semicolon when removing `extern crate`
Currently the lint for removing `extern crate` suggests removing `extern crate`
most of the time, but the rest of the time it suggest replacing it with `use
crate_name`. Unfortunately though when spliced into the original code you're
replacing

    extern crate foo;

with

    use foo

which is syntactically invalid! This commit ensure that the trailing semicolon
is included in rustc's suggestion to ensure that the code continues to compile
afterwards.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions