Skip to content

Commit

Permalink
Auto merge of rust-lang#14765 - weihanglo:rustfix, r=epage
Browse files Browse the repository at this point in the history
test(rustfix): switch to a simpler case for dedup-suggestions
  • Loading branch information
bors committed Nov 1, 2024
2 parents 57ffbb6 + 8aec0a4 commit 40d6078
Show file tree
Hide file tree
Showing 4 changed files with 363 additions and 51 deletions.
16 changes: 5 additions & 11 deletions crates/rustfix/tests/everything/dedup-suggestions.fixed.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
// This fixes rust-lang/rust#123304.
// If that lint stops emitting duplicate suggestions,
// we might need to find a substitution.
#![warn(unsafe_op_in_unsafe_fn)]

// See <https://github.com/rust-lang/cargo/issues/13027>
macro_rules! foo {
($x:ident) => {
pub unsafe fn $x() { unsafe {
let _ = String::new().as_mut_vec();
}}
() => {
let _ = &1;
};
}

fn main() {
foo!(a);
foo!(b);
foo!();
foo!();
}
Loading

0 comments on commit 40d6078

Please sign in to comment.