rust/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
372 B
Rust
Raw Normal View History

//@ run-pass
#![allow(non_upper_case_globals)]
//@ pretty-expanded FIXME #23616
2024-02-07 02:42:01 +00:00
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);
}