mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-14 08:25:01 +01:00
item deleter pass
This commit is contained in:
parent
22804c3065
commit
fdfde615f6
8 changed files with 162 additions and 5 deletions
|
|
@ -47,6 +47,26 @@ fn unused() -> Result<()> {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn impls() -> Result<()> {
|
||||
// Delete unused impls
|
||||
run_test(
|
||||
r##"
|
||||
pub trait Uwu {}
|
||||
impl Uwu for () {}
|
||||
impl Uwu for u8 {}
|
||||
|
||||
fn main() {}
|
||||
"##,
|
||||
r##"
|
||||
fn main() {}
|
||||
"##,
|
||||
|opts| {
|
||||
opts.no_verify = true;
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(windows, ignore)]
|
||||
fn custom_script_success() -> Result<()> {
|
||||
|
|
@ -61,9 +81,7 @@ fn custom_script_success() -> Result<()> {
|
|||
fn main() {}
|
||||
"##,
|
||||
r##"
|
||||
fn main() {
|
||||
loop {}
|
||||
}
|
||||
fn main() {}
|
||||
"##,
|
||||
|opts| {
|
||||
opts.script_path = Some(script_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue