Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
15
tests/ui/polymorphization/promoted-function.rs
Normal file
15
tests/ui/polymorphization/promoted-function.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
// run-pass
|
||||
// compile-flags:-Zpolymorphize=on
|
||||
|
||||
fn fop<T>() {}
|
||||
|
||||
fn bar<T>() -> &'static fn() {
|
||||
&(fop::<T> as fn())
|
||||
}
|
||||
pub const FN: &'static fn() = &(fop::<i32> as fn());
|
||||
|
||||
fn main() {
|
||||
bar::<u32>();
|
||||
bar::<i32>();
|
||||
(FN)();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue