Tweak various coverage test files for slightly nicer formatting

For coverage tests, splitting code across multiple lines often makes the
resulting coverage report easier to interpret, so we force rustfmt to retain
line breaks by adding dummy line comments with `//`.
This commit is contained in:
Zalathar 2024-05-29 14:06:53 +10:00
parent da159eb331
commit 448d63e946
15 changed files with 54 additions and 58 deletions

View File

@ -17,23 +17,23 @@ pub fn used_function() {
} }
pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
println!("used_only_from_bin_crate_generic_function with {:?}", arg); println!("used_only_from_bin_crate_generic_function with {arg:?}");
} }
// Expect for above function: `Unexecuted instantiation` (see below) // Expect for above function: `Unexecuted instantiation` (see below)
pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
} }
pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
} }
pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
} }
pub fn unused_generic_function<T: Debug>(arg: T) { pub fn unused_generic_function<T: Debug>(arg: T) {
println!("unused_generic_function with {:?}", arg); println!("unused_generic_function with {arg:?}");
} }
pub fn unused_function() { pub fn unused_function() {

View File

@ -31,28 +31,28 @@ pub fn used_inline_function() {
#[inline(always)] #[inline(always)]
pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
println!("used_only_from_bin_crate_generic_function with {:?}", arg); println!("used_only_from_bin_crate_generic_function with {arg:?}");
} }
// Expect for above function: `Unexecuted instantiation` (see notes in `used_crate.rs`) // Expect for above function: `Unexecuted instantiation` (see notes in `used_crate.rs`)
#[inline(always)] #[inline(always)]
pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
} }
#[inline(always)] #[inline(always)]
pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
} }
#[inline(always)] #[inline(always)]
pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
} }
#[inline(always)] #[inline(always)]
pub fn unused_generic_function<T: Debug>(arg: T) { pub fn unused_generic_function<T: Debug>(arg: T) {
println!("unused_generic_function with {:?}", arg); println!("unused_generic_function with {arg:?}");
} }
#[inline(always)] #[inline(always)]

View File

@ -10,9 +10,9 @@
LL| |// to handle this condition, and still report dead block coverage. LL| |// to handle this condition, and still report dead block coverage.
LL| 1|fn get_u32(val: bool) -> Result<u32, String> { LL| 1|fn get_u32(val: bool) -> Result<u32, String> {
LL| 1| if val { LL| 1| if val {
LL| 1| Ok(1) LL| 1| Ok(1) //
LL| | } else { LL| | } else {
LL| 0| Err(String::from("some error")) LL| 0| Err(String::from("some error")) //
LL| | } LL| | }
LL| 1|} LL| 1|}
LL| | LL| |

View File

@ -10,9 +10,9 @@
// to handle this condition, and still report dead block coverage. // to handle this condition, and still report dead block coverage.
fn get_u32(val: bool) -> Result<u32, String> { fn get_u32(val: bool) -> Result<u32, String> {
if val { if val {
Ok(1) Ok(1) //
} else { } else {
Err(String::from("some error")) Err(String::from("some error")) //
} }
} }

View File

@ -14,7 +14,7 @@
LL| |#[inline] LL| |#[inline]
LL| 1|fn live<const B: bool>() -> u32 { LL| 1|fn live<const B: bool>() -> u32 {
LL| 1| if B { LL| 1| if B {
LL| 0| dead() LL| 0| dead() //
LL| | } else { LL| | } else {
LL| 1| 0 LL| 1| 0
LL| | } LL| | }

View File

@ -13,7 +13,7 @@ fn main() {
#[inline] #[inline]
fn live<const B: bool>() -> u32 { fn live<const B: bool>() -> u32 {
if B { if B {
dead() dead() //
} else { } else {
0 0
} }

View File

@ -52,7 +52,7 @@
^0 ^0
LL| | LL| |
LL| 1| let mut val = InStruct { LL| 1| let mut val = InStruct {
LL| 1| in_struct_field: 101, LL| 1| in_struct_field: 101, //
LL| 1| }; LL| 1| };
LL| 1| LL| 1|
LL| 1| val.default_trait_func(); LL| 1| val.default_trait_func();

View File

@ -50,7 +50,7 @@ fn trait_func(&mut self, incr: u32) {
} }
let mut val = InStruct { let mut val = InStruct {
in_struct_field: 101, in_struct_field: 101, //
}; };
val.default_trait_func(); val.default_trait_func();

View File

@ -26,7 +26,7 @@
LL| 1| "{:?} < {:?} = {}", LL| 1| "{:?} < {:?} = {}",
LL| 1| version_3_2_1, LL| 1| version_3_2_1,
LL| 1| version_3_3_0, LL| 1| version_3_3_0,
LL| 1| version_3_2_1 < version_3_3_0 LL| 1| version_3_2_1 < version_3_3_0, //
LL| 1| ); LL| 1| );
LL| 1|} LL| 1|}
LL| | LL| |

View File

@ -26,7 +26,7 @@ fn main() {
"{:?} < {:?} = {}", "{:?} < {:?} = {}",
version_3_2_1, version_3_2_1,
version_3_3_0, version_3_3_0,
version_3_2_1 < version_3_3_0 version_3_2_1 < version_3_3_0, //
); );
} }

View File

@ -25,26 +25,26 @@ Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 2, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 2, 5) to (start + 0, 6)
Function name: try_error_result::call Function name: try_error_result::call
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 04, 01, 01, 14, 05, 02, 09, 00, 10, 02, 02, 09, 00, 0f, 01, 02, 01, 00, 02] Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 05, 01, 01, 14, 05, 02, 09, 00, 10, 02, 02, 09, 00, 0f, 01, 02, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 4 Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20) - Code(Counter(0)) at (prev + 5, 1) to (start + 1, 20)
- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 16) - Code(Counter(1)) at (prev + 2, 9) to (start + 0, 16)
- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15)
= (c0 - c1) = (c0 - c1)
- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2) - Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
Function name: try_error_result::main Function name: try_error_result::main
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 73, 01, 02, 0c, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02] Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 71, 01, 02, 0c, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 4 Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 115, 1) to (start + 2, 12) - Code(Counter(0)) at (prev + 113, 1) to (start + 2, 12)
- Code(Counter(1)) at (prev + 3, 5) to (start + 0, 6) - Code(Counter(1)) at (prev + 3, 5) to (start + 0, 6)
- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 11) - Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 11)
= (c0 - c1) = (c0 - c1)
@ -81,7 +81,7 @@ Number of file 0 mappings: 11
= (((c4 + Zero) + Zero) + c3) = (((c4 + Zero) + Zero) + c3)
Function name: try_error_result::test2 Function name: try_error_result::test2
Raw bytes (280): 0x[01, 01, 24, 01, 07, 00, 09, 03, 0d, 41, 00, 1e, 00, 41, 00, 1e, 00, 41, 00, 4a, 00, 4e, 00, 52, 41, 03, 0d, 52, 41, 03, 0d, 4e, 00, 52, 41, 03, 0d, 4a, 00, 4e, 00, 52, 41, 03, 0d, 66, 00, 45, 00, 45, 00, 66, 00, 45, 00, 7a, 00, 4d, 00, 4d, 00, 7a, 00, 4d, 00, 83, 01, 0d, 87, 01, 00, 00, 8b, 01, 8f, 01, 00, 19, 00, 28, 01, 3e, 01, 03, 17, 03, 08, 09, 00, 0e, 52, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 00, 00, 2f, 00, 30, 1e, 00, 31, 03, 35, 00, 04, 11, 00, 12, 1a, 02, 11, 04, 12, 00, 05, 11, 00, 14, 1a, 00, 17, 00, 41, 19, 00, 41, 00, 42, 00, 00, 43, 00, 5f, 00, 00, 5f, 00, 60, 00, 01, 0d, 00, 20, 00, 01, 11, 00, 14, 00, 00, 17, 00, 41, 00, 00, 41, 00, 42, 00, 00, 43, 00, 60, 00, 00, 60, 00, 61, 00, 01, 0d, 00, 20, 46, 04, 11, 00, 14, 4e, 00, 17, 00, 42, 00, 00, 42, 00, 43, 4a, 00, 44, 00, 61, 00, 00, 61, 00, 62, 46, 01, 0d, 00, 20, 62, 01, 11, 00, 14, 45, 00, 17, 01, 36, 00, 01, 36, 00, 37, 66, 01, 12, 00, 2f, 00, 00, 2f, 00, 30, 62, 01, 0d, 00, 20, 76, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 00, 02, 11, 00, 12, 7a, 01, 12, 00, 2f, 00, 01, 11, 00, 12, 76, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, 7f, 01, 01, 00, 02] Raw bytes (280): 0x[01, 01, 24, 01, 07, 00, 09, 03, 0d, 41, 00, 1e, 00, 41, 00, 1e, 00, 41, 00, 4a, 00, 4e, 00, 52, 41, 03, 0d, 52, 41, 03, 0d, 4e, 00, 52, 41, 03, 0d, 4a, 00, 4e, 00, 52, 41, 03, 0d, 66, 00, 45, 00, 45, 00, 66, 00, 45, 00, 7a, 00, 4d, 00, 4d, 00, 7a, 00, 4d, 00, 83, 01, 0d, 87, 01, 00, 00, 8b, 01, 8f, 01, 00, 19, 00, 28, 01, 3d, 01, 03, 17, 03, 08, 09, 00, 0e, 52, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 00, 00, 2f, 00, 30, 1e, 00, 31, 03, 35, 00, 04, 11, 00, 12, 1a, 02, 11, 04, 12, 00, 05, 11, 00, 14, 1a, 00, 17, 00, 41, 19, 00, 41, 00, 42, 00, 00, 43, 00, 5f, 00, 00, 5f, 00, 60, 00, 01, 0d, 00, 20, 00, 01, 11, 00, 14, 00, 00, 17, 00, 41, 00, 00, 41, 00, 42, 00, 00, 43, 00, 60, 00, 00, 60, 00, 61, 00, 01, 0d, 00, 20, 46, 04, 11, 00, 14, 4e, 00, 17, 00, 42, 00, 00, 42, 00, 43, 4a, 00, 44, 00, 61, 00, 00, 61, 00, 62, 46, 01, 0d, 00, 20, 62, 01, 11, 00, 14, 45, 00, 17, 01, 36, 00, 01, 36, 00, 37, 66, 01, 12, 00, 2f, 00, 00, 2f, 00, 30, 62, 01, 0d, 00, 20, 76, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 00, 02, 11, 00, 12, 7a, 01, 12, 00, 2f, 00, 01, 11, 00, 12, 76, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, 7f, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 36 Number of expressions: 36
@ -122,7 +122,7 @@ Number of expressions: 36
- expression 34 operands: lhs = Expression(35, Add), rhs = Zero - expression 34 operands: lhs = Expression(35, Add), rhs = Zero
- expression 35 operands: lhs = Counter(6), rhs = Zero - expression 35 operands: lhs = Counter(6), rhs = Zero
Number of file 0 mappings: 40 Number of file 0 mappings: 40
- Code(Counter(0)) at (prev + 62, 1) to (start + 3, 23) - Code(Counter(0)) at (prev + 61, 1) to (start + 3, 23)
- Code(Expression(0, Add)) at (prev + 8, 9) to (start + 0, 14) - Code(Expression(0, Add)) at (prev + 8, 9) to (start + 0, 14)
= (c0 + (Zero + c2)) = (c0 + (Zero + c2))
- Code(Expression(20, Sub)) at (prev + 2, 9) to (start + 4, 26) - Code(Expression(20, Sub)) at (prev + 2, 9) to (start + 4, 26)

View File

@ -1,4 +1,5 @@
LL| |#![allow(unused_assignments)] LL| |#![allow(unused_assignments)]
LL| |#![cfg_attr(rustfmt, rustfmt::skip)]
LL| |//@ failure-status: 1 LL| |//@ failure-status: 1
LL| | LL| |
LL| 6|fn call(return_error: bool) -> Result<(), ()> { LL| 6|fn call(return_error: bool) -> Result<(), ()> {
@ -9,7 +10,6 @@
LL| | } LL| | }
LL| 6|} LL| 6|}
LL| | LL| |
LL| |#[rustfmt::skip]
LL| 1|fn test1() -> Result<(), ()> { LL| 1|fn test1() -> Result<(), ()> {
LL| 1| let mut LL| 1| let mut
LL| 1| countdown = 10 LL| 1| countdown = 10
@ -59,7 +59,6 @@
LL| 17| } LL| 17| }
LL| |} LL| |}
LL| | LL| |
LL| |#[rustfmt::skip]
LL| 1|fn test2() -> Result<(), ()> { LL| 1|fn test2() -> Result<(), ()> {
LL| 1| let thing1 = Thing1{}; LL| 1| let thing1 = Thing1{};
LL| 1| let mut LL| 1| let mut
@ -117,7 +116,6 @@
LL| 0| Ok(()) LL| 0| Ok(())
LL| 1|} LL| 1|}
LL| | LL| |
LL| |#[rustfmt::skip]
LL| 1|fn main() -> Result<(), ()> { LL| 1|fn main() -> Result<(), ()> {
LL| 1| test1().expect_err("test1 should fail"); LL| 1| test1().expect_err("test1 should fail");
LL| 1| test2() LL| 1| test2()

View File

@ -1,4 +1,5 @@
#![allow(unused_assignments)] #![allow(unused_assignments)]
#![cfg_attr(rustfmt, rustfmt::skip)]
//@ failure-status: 1 //@ failure-status: 1
fn call(return_error: bool) -> Result<(), ()> { fn call(return_error: bool) -> Result<(), ()> {
@ -9,7 +10,6 @@ fn call(return_error: bool) -> Result<(), ()> {
} }
} }
#[rustfmt::skip]
fn test1() -> Result<(), ()> { fn test1() -> Result<(), ()> {
let mut let mut
countdown = 10 countdown = 10
@ -58,7 +58,6 @@ fn call(&self, return_error: bool) -> Result<u32, ()> {
} }
} }
#[rustfmt::skip]
fn test2() -> Result<(), ()> { fn test2() -> Result<(), ()> {
let thing1 = Thing1{}; let thing1 = Thing1{};
let mut let mut
@ -111,7 +110,6 @@ fn test2() -> Result<(), ()> {
Ok(()) Ok(())
} }
#[rustfmt::skip]
fn main() -> Result<(), ()> { fn main() -> Result<(), ()> {
test1().expect_err("test1 should fail"); test1().expect_err("test1 should fail");
test2() test2()

View File

@ -19,69 +19,69 @@ $DIR/auxiliary/used_crate.rs:
LL| 1|} LL| 1|}
LL| | LL| |
LL| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { LL| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
LL| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg); LL| 2| println!("used_only_from_bin_crate_generic_function with {arg:?}");
LL| 2|} LL| 2|}
------------------ ------------------
| Unexecuted instantiation: used_crate::used_only_from_bin_crate_generic_function::<_> | Unexecuted instantiation: used_crate::used_only_from_bin_crate_generic_function::<_>
------------------ ------------------
| used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>: | used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
| LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); | LL| 1| println!("used_only_from_bin_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
| used_crate::used_only_from_bin_crate_generic_function::<&str>: | used_crate::used_only_from_bin_crate_generic_function::<&str>:
| LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); | LL| 1| println!("used_only_from_bin_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
LL| |// Expect for above function: `Unexecuted instantiation` (see below) LL| |// Expect for above function: `Unexecuted instantiation` (see below)
LL| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { LL| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
LL| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); LL| 2| println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
LL| 2|} LL| 2|}
------------------ ------------------
| used_crate::used_only_from_this_lib_crate_generic_function::<&str>: | used_crate::used_only_from_this_lib_crate_generic_function::<&str>:
| LL| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
| used_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>: | used_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
| LL| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
LL| | LL| |
LL| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { LL| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
LL| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); LL| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
LL| 2|} LL| 2|}
------------------ ------------------
| used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>: | used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>:
| LL| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
| used_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>: | used_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
| LL| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
LL| | LL| |
LL| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { LL| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
LL| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); LL| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
LL| 2|} LL| 2|}
------------------ ------------------
| used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>: | used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>:
| LL| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
| used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>: | used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>:
| LL| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
LL| | LL| |
LL| 0|pub fn unused_generic_function<T: Debug>(arg: T) { LL| 0|pub fn unused_generic_function<T: Debug>(arg: T) {
LL| 0| println!("unused_generic_function with {:?}", arg); LL| 0| println!("unused_generic_function with {arg:?}");
LL| 0|} LL| 0|}
LL| | LL| |
LL| 0|pub fn unused_function() { LL| 0|pub fn unused_function() {

View File

@ -34,74 +34,74 @@ $DIR/auxiliary/used_inline_crate.rs:
LL| | LL| |
LL| |#[inline(always)] LL| |#[inline(always)]
LL| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { LL| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
LL| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg); LL| 2| println!("used_only_from_bin_crate_generic_function with {arg:?}");
LL| 2|} LL| 2|}
------------------ ------------------
| Unexecuted instantiation: used_inline_crate::used_only_from_bin_crate_generic_function::<_> | Unexecuted instantiation: used_inline_crate::used_only_from_bin_crate_generic_function::<_>
------------------ ------------------
| used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>: | used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
| LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); | LL| 1| println!("used_only_from_bin_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
| used_inline_crate::used_only_from_bin_crate_generic_function::<&str>: | used_inline_crate::used_only_from_bin_crate_generic_function::<&str>:
| LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); | LL| 1| println!("used_only_from_bin_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
LL| |// Expect for above function: `Unexecuted instantiation` (see notes in `used_crate.rs`) LL| |// Expect for above function: `Unexecuted instantiation` (see notes in `used_crate.rs`)
LL| | LL| |
LL| |#[inline(always)] LL| |#[inline(always)]
LL| 4|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { LL| 4|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
LL| 4| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); LL| 4| println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
LL| 4|} LL| 4|}
------------------ ------------------
| used_inline_crate::used_only_from_this_lib_crate_generic_function::<&str>: | used_inline_crate::used_only_from_this_lib_crate_generic_function::<&str>:
| LL| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); | LL| 2| println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
| LL| 2|} | LL| 2|}
------------------ ------------------
| used_inline_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>: | used_inline_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
| LL| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); | LL| 2| println!("used_only_from_this_lib_crate_generic_function with {arg:?}");
| LL| 2|} | LL| 2|}
------------------ ------------------
LL| | LL| |
LL| |#[inline(always)] LL| |#[inline(always)]
LL| 3|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { LL| 3|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
LL| 3| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); LL| 3| println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
LL| 3|} LL| 3|}
------------------ ------------------
| used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>: | used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>:
| LL| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 2|} | LL| 2|}
------------------ ------------------
| used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>: | used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
| LL| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
LL| | LL| |
LL| |#[inline(always)] LL| |#[inline(always)]
LL| 3|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { LL| 3|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
LL| 3| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); LL| 3| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
LL| 3|} LL| 3|}
------------------ ------------------
| used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>: | used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>:
| LL| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 1|} | LL| 1|}
------------------ ------------------
| used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>: | used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>:
| LL| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { | LL| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
| LL| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); | LL| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {arg:?}");
| LL| 2|} | LL| 2|}
------------------ ------------------
LL| | LL| |
LL| |#[inline(always)] LL| |#[inline(always)]
LL| 0|pub fn unused_generic_function<T: Debug>(arg: T) { LL| 0|pub fn unused_generic_function<T: Debug>(arg: T) {
LL| 0| println!("unused_generic_function with {:?}", arg); LL| 0| println!("unused_generic_function with {arg:?}");
LL| 0|} LL| 0|}
LL| | LL| |
LL| |#[inline(always)] LL| |#[inline(always)]