]> git.lizzy.rs Git - rust.git/commitdiff
rewrite old test so that its attributes are consistent with what we want in the language.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Mon, 15 Jun 2020 15:50:58 +0000 (11:50 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Sun, 4 Oct 2020 16:45:53 +0000 (12:45 -0400)
(Note that the fact this test existed is a slight sign that we may need a crater
run on this bugfix...)

src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs

index 1217f89cb316863d0ea3e802faed1d591c776353..a547d09d04822f08e2fb3bb41ea22fe75ed20b2f 100644 (file)
@@ -8,8 +8,8 @@ fn ffi(
         #[allow(unused_mut)] a: i32,
         #[cfg(something)] b: i32,
         #[cfg_attr(something, cfg(nothing))] c: i32,
-        #[deny(unused_mut)] d: i32,
-        #[forbid(unused_mut)] #[warn(unused_mut)] ...
+        #[forbid(unused_mut)] d: i32,
+        #[deny(unused_mut)] #[warn(unused_mut)] ...
     );
 }
 
@@ -17,16 +17,16 @@ fn ffi(
     #[allow(unused_mut)] a: i32,
     #[cfg(something)] b: i32,
     #[cfg_attr(something, cfg(nothing))] c: i32,
-    #[deny(unused_mut)] d: i32,
-    #[forbid(unused_mut)] #[warn(unused_mut)] e: i32
+    #[forbid(unused_mut)] d: i32,
+    #[deny(unused_mut)] #[warn(unused_mut)] e: i32
 );
 
 pub fn foo(
     #[allow(unused_mut)] a: i32,
     #[cfg(something)] b: i32,
     #[cfg_attr(something, cfg(nothing))] c: i32,
-    #[deny(unused_mut)] d: i32,
-    #[forbid(unused_mut)] #[warn(unused_mut)] _e: i32
+    #[forbid(unused_mut)] d: i32,
+    #[deny(unused_mut)] #[warn(unused_mut)] _e: i32
 ) {}
 
 // self