|
31 | 31 | 29| 1| use_this_lib_crate();
|
32 | 32 | 30| 1|}
|
33 | 33 | 31| |
|
34 |
| - 32| |#[inline(always)] |
35 |
| - 33| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { |
36 |
| - 34| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg); |
37 |
| - 35| 2|} |
| 34 | + 32| | |
| 35 | + 33| | |
| 36 | + 34| | |
| 37 | + 35| | |
| 38 | + 36| | |
| 39 | + 37| | |
| 40 | + 38| |#[inline(always)] |
| 41 | + 39| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { |
| 42 | + 40| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg); |
| 43 | + 41| 2|} |
38 | 44 | ------------------
|
39 | 45 | | used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
|
40 |
| - | 33| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { |
41 |
| - | 34| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); |
42 |
| - | 35| 1|} |
| 46 | + | 39| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { |
| 47 | + | 40| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); |
| 48 | + | 41| 1|} |
43 | 49 | ------------------
|
44 | 50 | | used_inline_crate::used_only_from_bin_crate_generic_function::<&str>:
|
45 |
| - | 33| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { |
46 |
| - | 34| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); |
47 |
| - | 35| 1|} |
| 51 | + | 39| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { |
| 52 | + | 40| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); |
| 53 | + | 41| 1|} |
48 | 54 | ------------------
|
49 | 55 | | Unexecuted instantiation: used_inline_crate::used_only_from_bin_crate_generic_function::<_>
|
50 | 56 | ------------------
|
51 |
| - 36| |// Expect for above function: `Unexecuted instantiation` (see notes in `used_crate.rs`) |
52 |
| - 37| | |
53 |
| - 38| |#[inline(always)] |
54 |
| - 39| 4|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { |
55 |
| - 40| 4| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); |
56 |
| - 41| 4|} |
| 57 | + 42| |// Expect for above function: `Unexecuted instantiation` (see notes in `used_crate.rs`) |
| 58 | + 43| | |
| 59 | + 44| |#[inline(always)] |
| 60 | + 45| 4|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { |
| 61 | + 46| 4| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); |
| 62 | + 47| 4|} |
57 | 63 | ------------------
|
58 | 64 | | used_inline_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
|
59 |
| - | 39| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { |
60 |
| - | 40| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); |
61 |
| - | 41| 2|} |
| 65 | + | 45| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { |
| 66 | + | 46| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); |
| 67 | + | 47| 2|} |
62 | 68 | ------------------
|
63 | 69 | | used_inline_crate::used_only_from_this_lib_crate_generic_function::<&str>:
|
64 |
| - | 39| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { |
65 |
| - | 40| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); |
66 |
| - | 41| 2|} |
| 70 | + | 45| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) { |
| 71 | + | 46| 2| println!("used_only_from_this_lib_crate_generic_function with {:?}", arg); |
| 72 | + | 47| 2|} |
67 | 73 | ------------------
|
68 |
| - 42| | |
69 |
| - 43| |#[inline(always)] |
70 |
| - 44| 3|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
71 |
| - 45| 3| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
72 |
| - 46| 3|} |
| 74 | + 48| | |
| 75 | + 49| |#[inline(always)] |
| 76 | + 50| 3|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
| 77 | + 51| 3| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
| 78 | + 52| 3|} |
73 | 79 | ------------------
|
74 | 80 | | used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
|
75 |
| - | 44| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
76 |
| - | 45| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
77 |
| - | 46| 1|} |
| 81 | + | 50| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
| 82 | + | 51| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
| 83 | + | 52| 1|} |
78 | 84 | ------------------
|
79 | 85 | | used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>:
|
80 |
| - | 44| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
81 |
| - | 45| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
82 |
| - | 46| 2|} |
| 86 | + | 50| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
| 87 | + | 51| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
| 88 | + | 52| 2|} |
83 | 89 | ------------------
|
84 |
| - 47| | |
85 |
| - 48| |#[inline(always)] |
86 |
| - 49| 3|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
87 |
| - 50| 3| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
88 |
| - 51| 3|} |
| 90 | + 53| | |
| 91 | + 54| |#[inline(always)] |
| 92 | + 55| 3|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
| 93 | + 56| 3| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
| 94 | + 57| 3|} |
89 | 95 | ------------------
|
90 | 96 | | used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>:
|
91 |
| - | 49| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
92 |
| - | 50| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
93 |
| - | 51| 1|} |
| 97 | + | 55| 1|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
| 98 | + | 56| 1| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
| 99 | + | 57| 1|} |
94 | 100 | ------------------
|
95 | 101 | | used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>:
|
96 |
| - | 49| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
97 |
| - | 50| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
98 |
| - | 51| 2|} |
| 102 | + | 55| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) { |
| 103 | + | 56| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg); |
| 104 | + | 57| 2|} |
99 | 105 | ------------------
|
100 |
| - 52| | |
101 |
| - 53| |#[inline(always)] |
102 |
| - 54| 0|pub fn unused_generic_function<T: Debug>(arg: T) { |
103 |
| - 55| 0| println!("unused_generic_function with {:?}", arg); |
104 |
| - 56| 0|} |
105 |
| - 57| | |
106 |
| - 58| |#[inline(always)] |
107 |
| - 59| 0|pub fn unused_function() { |
108 |
| - 60| 0| let is_true = std::env::args().len() == 1; |
109 |
| - 61| 0| let mut countdown = 2; |
110 |
| - 62| 0| if !is_true { |
111 |
| - 63| 0| countdown = 20; |
112 |
| - 64| 0| } |
113 |
| - 65| 0|} |
114 |
| - 66| | |
115 |
| - 67| |#[inline(always)] |
116 |
| - 68| 0|fn unused_private_function() { |
117 |
| - 69| 0| let is_true = std::env::args().len() == 1; |
118 |
| - 70| 0| let mut countdown = 2; |
119 |
| - 71| 0| if !is_true { |
120 |
| - 72| 0| countdown = 20; |
121 |
| - 73| 0| } |
122 |
| - 74| 0|} |
123 |
| - 75| | |
124 |
| - 76| 2|fn use_this_lib_crate() { |
125 |
| - 77| 2| used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs"); |
126 |
| - 78| 2| used_with_same_type_from_bin_crate_and_lib_crate_generic_function( |
127 |
| - 79| 2| "used from library used_crate.rs", |
128 |
| - 80| 2| ); |
129 |
| - 81| 2| let some_vec = vec![5, 6, 7, 8]; |
130 |
| - 82| 2| used_only_from_this_lib_crate_generic_function(some_vec); |
131 |
| - 83| 2| used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs"); |
132 |
| - 84| 2|} |
| 106 | + 58| | |
| 107 | + 59| |#[inline(always)] |
| 108 | + 60| 0|pub fn unused_generic_function<T: Debug>(arg: T) { |
| 109 | + 61| 0| println!("unused_generic_function with {:?}", arg); |
| 110 | + 62| 0|} |
| 111 | + 63| | |
| 112 | + 64| |#[inline(always)] |
| 113 | + 65| 0|pub fn unused_function() { |
| 114 | + 66| 0| let is_true = std::env::args().len() == 1; |
| 115 | + 67| 0| let mut countdown = 2; |
| 116 | + 68| 0| if !is_true { |
| 117 | + 69| 0| countdown = 20; |
| 118 | + 70| 0| } |
| 119 | + 71| 0|} |
| 120 | + 72| | |
| 121 | + 73| |#[inline(always)] |
| 122 | + 74| 0|fn unused_private_function() { |
| 123 | + 75| 0| let is_true = std::env::args().len() == 1; |
| 124 | + 76| 0| let mut countdown = 2; |
| 125 | + 77| 0| if !is_true { |
| 126 | + 78| 0| countdown = 20; |
| 127 | + 79| 0| } |
| 128 | + 80| 0|} |
| 129 | + 81| | |
| 130 | + 82| 2|fn use_this_lib_crate() { |
| 131 | + 83| 2| used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs"); |
| 132 | + 84| 2| used_with_same_type_from_bin_crate_and_lib_crate_generic_function( |
| 133 | + 85| 2| "used from library used_crate.rs", |
| 134 | + 86| 2| ); |
| 135 | + 87| 2| let some_vec = vec![5, 6, 7, 8]; |
| 136 | + 88| 2| used_only_from_this_lib_crate_generic_function(some_vec); |
| 137 | + 89| 2| used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs"); |
| 138 | + 90| 2|} |
133 | 139 |
|
0 commit comments