Make new_without_default ignore const fns; fixes #977

This commit is contained in:
Manish Goregaokar 2016-06-03 20:15:07 +05:30
parent d7df882fa0
commit bf4ce86e9e
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
2 changed files with 11 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#![feature(plugin)]
#![feature(plugin, const_fn)]
#![plugin(clippy)]
#![allow(dead_code)]
@ -70,4 +70,9 @@ impl Private {
fn new() -> Private { unimplemented!() } // We don't lint private items
}
struct Const;
impl Const {
pub const fn new() -> Const { Const } // const fns can't be implemented via Default
}
fn main() {}