MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / type_id

Function type_id

src/buffer.rs:165–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163
164 #[test]
165 fn type_id() {
166 assert_ne!(non_static_type_id::<u8>(), non_static_type_id::<i8>());
167 assert_ne!(non_static_type_id::<()>(), non_static_type_id::<[(); 1]>());
168 assert_ne!(
169 non_static_type_id::<&'static mut [u8]>(),
170 non_static_type_id::<&'static [u8]>()
171 );
172 assert_ne!(
173 non_static_type_id::<*mut u8>(),
174 non_static_type_id::<*const u8>()
175 );
176 fn f<'a>(_: &'a ()) {
177 assert_eq!(
178 non_static_type_id::<&'static [u8]>(),
179 non_static_type_id::<&'a [u8]>()
180 );
181 assert_eq!(
182 non_static_type_id::<&'static ()>(),
183 non_static_type_id::<&'a ()>()
184 );
185 }
186 f(&());
187 }
188
189 #[test]
190 fn erased_box() {

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected