mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-14 16:35:01 +01:00
duplicate self ty test
This commit is contained in:
parent
7fcc623c7f
commit
cc526f10c7
2 changed files with 21 additions and 0 deletions
16
full-tests/duplicate-self-ty-impls.rs
Normal file
16
full-tests/duplicate-self-ty-impls.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
trait A {}
|
||||
/// ~REQUIRE-DELETED trait-B
|
||||
trait B {}
|
||||
trait C {}
|
||||
|
||||
/// ~MINIMIZE-ROOT impl-A
|
||||
impl A for () {}
|
||||
|
||||
/// ~REQUIRE-DELETED impl-B
|
||||
impl B for () {}
|
||||
|
||||
/// ~MINIMIZE-ROOT impl-C
|
||||
impl C for () {}
|
||||
|
||||
/// ~MINIMIZE-ROOT main
|
||||
fn main() {}
|
||||
|
|
@ -97,6 +97,11 @@ fn setup_scripts(start_roots: &[String], proj_dir: &Path) -> Result<()> {
|
|||
write!(
|
||||
BufWriter::new(&file),
|
||||
r#"#!/usr/bin/env bash
|
||||
if ! cargo check ; then
|
||||
>&2 echo "Cargo check failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUT=$(rg -o "~MINIMIZE-ROOT [\w\-]*" --no-filename --sort path src)
|
||||
|
||||
python3 -c "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue