2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2018-08-31 13:02:01 +00:00
|
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
|
2015-03-22 20:13:15 +00:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2024-02-07 02:42:01 +00:00
|
|
|
trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used
|
2014-12-20 10:29:19 +00:00
|
|
|
|
2015-03-26 00:06:52 +00:00
|
|
|
impl TheTrait for &'static isize { }
|
2014-12-20 10:29:19 +00:00
|
|
|
|
|
|
|
fn foo<'a,T>(_: &'a T) where &'a T : TheTrait { }
|
|
|
|
|
|
|
|
fn bar<T>(_: &'static T) where &'static T : TheTrait { }
|
|
|
|
|
|
|
|
fn main() {
|
2015-03-26 00:06:52 +00:00
|
|
|
static x: isize = 1;
|
2014-12-20 10:29:19 +00:00
|
|
|
foo(&x);
|
|
|
|
bar(&x);
|
|
|
|
}
|