mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
14 lines
223 B
Rust
14 lines
223 B
Rust
pub fn foo<T>() -> &'static isize {
|
|
if false {
|
|
static a: isize = 4;
|
|
return &a;
|
|
} else {
|
|
static a: isize = 5;
|
|
return &a;
|
|
}
|
|
}
|
|
|
|
pub fn bar() -> &'static isize {
|
|
foo::<isize>()
|
|
}
|