From f897877ae7e835a57601b191565f527896bb1fb8 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 14 Jun 2022 00:03:23 +0900 Subject: [PATCH 1/3] Pin clap to ~3.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 43424972..6860a658 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ anyhow = "1.0.34" atty = "0.2.11" camino = "1.0.3" cargo_metadata = "0.14" -clap = { version = "3.1", features = ["derive"] } +clap = { version = "~3.1", features = ["derive"] } # https://github.com/clap-rs/clap/issues/3822 duct = "0.13.1" fs-err = "2.5" glob = "0.3" From 1efe61dc29242fd921f02eefb03e4f1872584957 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 14 Jun 2022 00:10:49 +0900 Subject: [PATCH 2/3] Bump MSRV to 1.56 ``` error: failed to download `clap_lex v0.2.2` Caused by: unable to get packages from source Caused by: failed to parse manifest at `/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_lex-0.2.2/Cargo.toml` Caused by: feature `edition2021` is required this Cargo does not support nightly features, but if you switch to nightly channel you can add `cargo-features = ["edition2021"]` to enable this feature ``` --- .clippy.toml | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.clippy.toml b/.clippy.toml index 7a4ac970..1b74ecd7 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,4 +1,4 @@ -msrv = "1.54" +msrv = "1.56" disallowed-methods = [ # https://internals.rust-lang.org/t/synchronized-ffi-access-to-posix-environment-variable-functions/15475 { path = "std::env::remove_var", reason = "this function should be considered `unsafe`" }, diff --git a/Cargo.toml b/Cargo.toml index 6860a658..e2001b95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cargo-llvm-cov" version = "0.4.6" #publish:version edition = "2018" -rust-version = "1.54" +rust-version = "1.56" license = "Apache-2.0 OR MIT" repository = "https://github.com/taiki-e/cargo-llvm-cov" keywords = ["cargo", "coverage", "subcommand", "testing"] diff --git a/README.md b/README.md index d8e1d238..843d0dcb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![crates.io](https://img.shields.io/crates/v/cargo-llvm-cov?style=flat-square&logo=rust)](https://crates.io/crates/cargo-llvm-cov) [![license](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue?style=flat-square)](#license) -[![rustc](https://img.shields.io/badge/rustc-1.54+-blue?style=flat-square&logo=rust)](https://www.rust-lang.org) +[![rustc](https://img.shields.io/badge/rustc-1.56+-blue?style=flat-square&logo=rust)](https://www.rust-lang.org) [![build status](https://img.shields.io/github/workflow/status/taiki-e/cargo-llvm-cov/CI/main?style=flat-square&logo=github)](https://github.com/taiki-e/cargo-llvm-cov/actions) Cargo subcommand to easily use LLVM source-based code coverage. @@ -457,7 +457,7 @@ Running cargo-llvm-cov requires rustc 1.60+. cargo install cargo-llvm-cov ``` -Currently, installing cargo-llvm-cov requires rustc 1.54+. +Currently, installing cargo-llvm-cov requires rustc 1.56+. ### From prebuilt binaries From 2b527ae0e4284f9ed9fae1c25c37f815448d5054 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 14 Jun 2022 00:17:47 +0900 Subject: [PATCH 3/3] Migrate to Rust 2021 --- .rustfmt.toml | 2 +- Cargo.toml | 2 +- src/main.rs | 1 - tests/auxiliary/mod.rs | 1 - tests/fixtures/crates/coverage_helper/Cargo.toml | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.rustfmt.toml b/.rustfmt.toml index e4f858c7..0d7adea5 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -26,7 +26,7 @@ use_try_shorthand = true # Set the default settings again to always apply the proper formatting without # being affected by the editor settings. -edition = "2018" +edition = "2021" hard_tabs = false newline_style = "Unix" tab_spaces = 4 diff --git a/Cargo.toml b/Cargo.toml index e2001b95..ae554559 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cargo-llvm-cov" version = "0.4.6" #publish:version -edition = "2018" +edition = "2021" rust-version = "1.56" license = "Apache-2.0 OR MIT" repository = "https://github.com/taiki-e/cargo-llvm-cov" diff --git a/src/main.rs b/src/main.rs index 371984eb..0fbf1595 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,6 @@ mod fs; use std::{ collections::HashMap, - convert::TryInto, ffi::{OsStr, OsString}, fmt::Write as _, path::Path, diff --git a/tests/auxiliary/mod.rs b/tests/auxiliary/mod.rs index f965ef71..cabc3b6a 100644 --- a/tests/auxiliary/mod.rs +++ b/tests/auxiliary/mod.rs @@ -1,5 +1,4 @@ use std::{ - convert::TryInto, env, ffi::OsStr, io::{Read, Seek, Write}, diff --git a/tests/fixtures/crates/coverage_helper/Cargo.toml b/tests/fixtures/crates/coverage_helper/Cargo.toml index c2d3325a..a9376cb3 100644 --- a/tests/fixtures/crates/coverage_helper/Cargo.toml +++ b/tests/fixtures/crates/coverage_helper/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "no_coverage_coverage_helper" version = "0.0.0" -edition = "2018" +edition = "2021" [workspace]