mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
19 lines
332 B
Rust
19 lines
332 B
Rust
// run-pass
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
trait TheTrait { fn dummy(&self) { } }
|
|
|
|
impl TheTrait for &'static isize { }
|
|
|
|
fn foo<'a,T>(_: &'a T) where &'a T : TheTrait { }
|
|
|
|
fn bar<T>(_: &'static T) where &'static T : TheTrait { }
|
|
|
|
fn main() {
|
|
static x: isize = 1;
|
|
foo(&x);
|
|
bar(&x);
|
|
}
|