item deleter pass

This commit is contained in:
nora 2023-01-22 13:19:18 +01:00
parent 22804c3065
commit fdfde615f6
8 changed files with 162 additions and 5 deletions

View file

@ -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);