]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/enum_glob_use.rs
Addition `manual_map` test for `unsafe` blocks
[rust.git] / tests / ui / enum_glob_use.rs
index e24e2fd8eb3e2daa60811e3798cf3d891e600498..5d929c9731d341993c9f096f195b7bd661f33dde 100644 (file)
@@ -1,42 +1,30 @@
-// 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.
+// run-rustfix
 
-
-#![feature(tool_lints)]
-
-#![warn(clippy::all, clippy::pedantic)]
-#![allow(unused_imports, dead_code, clippy::missing_docs_in_private_items)]
+#![warn(clippy::enum_glob_use)]
+#![allow(unused)]
+#![warn(unused_imports)]
 
 use std::cmp::Ordering::*;
 
 enum Enum {
-    _Foo,
+    Foo,
 }
 
 use self::Enum::*;
 
-fn blarg() {
-    use self::Enum::*; // ok, just for a function
+mod in_fn_test {
+    fn blarg() {
+        use crate::Enum::*;
+
+        let _ = Foo;
+    }
 }
 
 mod blurg {
     pub use std::cmp::Ordering::*; // ok, re-export
 }
 
-mod tests {
-    use super::*;
+fn main() {
+    let _ = Foo;
+    let _ = Less;
 }
-
-#[allow(non_snake_case)]
-mod CamelCaseName {
-}
-
-use CamelCaseName::*;
-
-fn main() {}