Give the cross-crate generic some work to do

This commit is contained in:
Ben Kimock 2023-03-24 16:24:37 -04:00
parent e3126b1084
commit e88e2af959
2 changed files with 4 additions and 2 deletions

View File

@ -3,4 +3,6 @@
#![crate_type = "lib"]
pub fn foo<T>() {}
pub fn foo<T: Default>() -> T {
T::default()
}

View File

@ -7,7 +7,7 @@
extern crate xcrate_generic;
pub fn foo() {
xcrate_generic::foo::<u32>();
println!("{}", xcrate_generic::foo::<u32>());
}
// Here we check that local debuginfo is mapped correctly.