Skip to content

Commit

Permalink
No msrv is 1.60.0 so we don't need code that handle rust previous 1.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
la10736 committed May 5, 2024
1 parent b55dbc4 commit 021299d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
3 changes: 0 additions & 3 deletions rstest_reuse/Cargo.toml
Expand Up @@ -31,6 +31,3 @@ rstest_test = { path = "../rstest_test" }
temp_testdir = "0.2.3"
# To compile doc tests
rstest = { version = "0.19.0" }

[build-dependencies]
rustc_version = "0.4.0"
10 changes: 0 additions & 10 deletions rstest_reuse/build.rs

This file was deleted.

22 changes: 0 additions & 22 deletions rstest_reuse/src/lib.rs
Expand Up @@ -210,24 +210,6 @@ impl Parse for MergeAttrs {
}
}

#[cfg(sanitize_multiple_should_panic_compiler_bug)]
fn is_should_panic(attr: &syn::Attribute) -> bool {
let should_panic: Ident = syn::parse_str("should_panic").unwrap();
attr.path.is_ident(&should_panic)
}

#[cfg(sanitize_multiple_should_panic_compiler_bug)]
fn sanitize_should_panic_duplication_bug(
mut attributes: Vec<syn::Attribute>,
) -> Vec<syn::Attribute> {
if attributes.len() != 2 || attributes[0] != attributes[1] || !is_should_panic(&attributes[0]) {
// Nothing to do
return attributes;
}
attributes.pop();
attributes
}

fn collect_template_args(template: &ItemFn) -> HashMap<&Ident, &PatType> {
template
.sig
Expand Down Expand Up @@ -289,10 +271,6 @@ pub fn merge_attrs(item: TokenStream) -> TokenStream {
expand_function_arguments(&mut function, &template);

let mut attrs = template.attrs;
#[cfg(sanitize_multiple_should_panic_compiler_bug)]
{
function.attrs = sanitize_should_panic_duplication_bug(function.attrs);
}
attrs.append(&mut function.attrs);
function.attrs = attrs;

Expand Down

0 comments on commit 021299d

Please sign in to comment.