mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 13:24:07 +00:00
18 lines
339 B
Rust
18 lines
339 B
Rust
//@ run-pass
|
|
#![allow(non_upper_case_globals)]
|
|
|
|
|
|
trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used
|
|
|
|
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);
|
|
}
|