diff options
Diffstat (limited to 'tests/codegen/remap_path_prefix')
-rw-r--r-- | tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs | 4 | ||||
-rw-r--r-- | tests/codegen/remap_path_prefix/xcrate-generic.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs b/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs index 59092dbf6..15bd0f174 100644 --- a/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs +++ b/tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs @@ -3,4 +3,6 @@ #![crate_type = "lib"] -pub fn foo<T>() {} +pub fn foo<T: Default>() -> T { + T::default() +} diff --git a/tests/codegen/remap_path_prefix/xcrate-generic.rs b/tests/codegen/remap_path_prefix/xcrate-generic.rs index 7a9d2ca9b..399deec1f 100644 --- a/tests/codegen/remap_path_prefix/xcrate-generic.rs +++ b/tests/codegen/remap_path_prefix/xcrate-generic.rs @@ -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. |