]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/missing_inline.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / missing_inline.rs
index 7fbb01c6d2b8c3cb8ffed239f78632e8b6130e5b..c9e946e14e6564114082da51bdcb1576714d9a00 100644 (file)
@@ -1,4 +1,11 @@
-#![feature(tool_lints)]
+// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
 
 /* This file incorporates work covered by the following copyright and
  * permission notice:
@@ -22,7 +29,7 @@
 pub type PubTypedef = String;
 
 struct Foo {} // ok
-pub struct PubFoo { } // ok
+pub struct PubFoo {} // ok
 enum FooE {} // ok
 pub enum PubFooE {} // ok
 
@@ -31,8 +38,10 @@ pub mod pub_module {} // ok
 
 fn foo() {}
 pub fn pub_foo() {} // missing #[inline]
-#[inline] pub fn pub_foo_inline() {} // ok
-#[inline(always)] pub fn pub_foo_inline_always() {} // ok
+#[inline]
+pub fn pub_foo_inline() {} // ok
+#[inline(always)]
+pub fn pub_foo_inline_always() {} // ok
 
 #[allow(clippy::missing_inline_in_public_items)]
 pub fn pub_foo_no_inline() {}
@@ -42,11 +51,11 @@ trait Bar {
     fn Bar_b() {} // ok
 }
 
-
 pub trait PubBar {
     fn PubBar_a(); // ok
     fn PubBar_b() {} // missing #[inline]
-    #[inline] fn PubBar_c() {} // ok
+    #[inline]
+    fn PubBar_c() {} // ok
 }
 
 // none of these need inline because Foo is not exported