1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
11 #![feature(tool_lints)]
14 #![warn(clippy::wrong_self_convention)]
15 #![warn(clippy::wrong_pub_self_convention)]
16 #![allow(dead_code, clippy::trivially_copy_pass_by_ref)]
20 #[derive(Clone, Copy)]
33 pub fn as_i64(self) {}
34 pub fn into_i64(self) {}
35 pub fn is_i64(self) {}
36 pub fn to_i64(self) {}
37 pub fn from_i64(self) {}
38 // check whether the lint can be allowed at the function level
39 #[allow(clippy::wrong_self_convention)]
40 pub fn from_cake(self) {}
42 fn as_x<F: AsRef<Self>>(_: F) { }
43 fn as_y<F: AsRef<Foo>>(_: F) { }
60 pub fn as_i64(self) {}
61 pub fn into_i64(&self) {}
62 pub fn is_i64(self) {}
63 pub fn to_i64(self) {}
64 pub fn from_i64(self) {}
66 // test for false positives
72 fn to_mut(&mut self) {}