rust/tests/ui/regions/issue-5243.rs

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

18 lines
347 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
// Check that merely having lifetime parameters is not
2018-05-08 21:10:16 +08:00
// enough for codegen to consider this as non-monomorphic,
// which led to various assertions and failures in turn.
//@ pretty-expanded FIXME #23616
struct S<'a> {
v: &'a isize
}
fn f<'lt>(_s: &'lt S<'lt>) {}
2013-03-28 00:58:28 +08:00
pub fn main() {
f(& S { v: &42 });
}