Add test for new() -> Self<'static>

This commit is contained in:
Manish Goregaokar 2016-03-27 02:44:55 +05:30
parent e37ff5a5c7
commit 3d9a7d9140
1 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,15 @@ impl<'a> Lt2<'a> {
pub fn new(s: &str) -> Lt2 { unimplemented!() }
}
struct Lt3<'a> {
foo: &'a u32,
}
impl<'a> Lt3<'a> {
// The lifetime is different, but thats irrelevant, see #734
pub fn new() -> Lt3<'static> { unimplemented!() }
}
#[derive(Clone,Copy)]
struct U;