Closed ghost closed 3 years ago
The reason I inserted #![allow(unused_imports)]
was to allow use
for procedural macros without warning.
(edit) I mean, I intended to add just a workaround.
use proconio::fastout;
// ^^^^^^^^^^^^^^^^^
// warning: unused import: `proconio::fastout`
/*#[fastout]
fn main() { … }*/
fn main() { … }
// …
pub __bundled {
pub proconio { /* … */}
}
However, in yesterday I came up with this:
use proconio::{fastout, input};
↓
use proconio::{/*fastout,*/ input};
#[allow(unused_imports)]
use proconio::fastout;
With this idea, #![allow(unused_imports)]
is unnecessary. So I'm afraid I'm closing PR. Thank you for pointing the problem out.
In #126,
#![allow(unused_imports)]
attribute is always inserted in the top of every bundled code.As one of the user, I would prefer to write the attribute by myself because of ignore the unused warnings than to be bundled automatically and duplicated.
Changes
allow-unused-imports
flag toOpt
rust::prepend_items
to insert#![allow(unused_imports)]
when--allow-unused-imports
is given.