Skip to content

Commit

Permalink
rewrite old test so that its attributes are consistent with what we w…
Browse files Browse the repository at this point in the history
…ant in the language.

(Note that the fact this test existed is a slight sign that we may need a crater
run on this bugfix...)
  • Loading branch information
pnkfelix authored and Mark-Simulacrum committed Oct 4, 2020
1 parent 0644cc1 commit b4e77d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/ui/rfc-2565-param-attrs/param-attrs-allowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ extern "C" {
#[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)] ...
);
}

type FnType = fn(
#[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
Expand Down

0 comments on commit b4e77d2

Please sign in to comment.