Skip to content

Commit e88e2af

Browse files
committed
Give the cross-crate generic some work to do
1 parent e3126b1 commit e88e2af

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/codegen/remap_path_prefix/auxiliary/xcrate-generic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33

44
#![crate_type = "lib"]
55

6-
pub fn foo<T>() {}
6+
pub fn foo<T: Default>() -> T {
7+
T::default()
8+
}

tests/codegen/remap_path_prefix/xcrate-generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
extern crate xcrate_generic;
88

99
pub fn foo() {
10-
xcrate_generic::foo::<u32>();
10+
println!("{}", xcrate_generic::foo::<u32>());
1111
}
1212

1313
// Here we check that local debuginfo is mapped correctly.

0 commit comments

Comments
 (0)