Skip to content

Commit d3a2f0f

Browse files
committed
Bump MSRV to 1.88
1 parent 6398737 commit d3a2f0f

File tree

7 files changed

+17
-31
lines changed

7 files changed

+17
-31
lines changed

cargo-dylint/tests/ci.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,6 @@ fn markdown_link_check() {
615615
}
616616
}
617617

618-
#[ignore = "disabled until `dylint` package switches to edition 2024"]
619618
#[test]
620619
fn msrv() {
621620
for package in &METADATA.packages {

cargo-dylint/tests/integration/package_options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use tempfile::tempdir;
2626
// smoelius: `[email protected]` (2024-12-16) requires rustc 1.81.
2727
// smoelius: `[email protected]` and several other packages require rustc 1.82.
2828
// smoelius: Edition 2024 was stabilized with Rust 1.85.
29-
const RUST_VERSION: &str = "1.86.0";
29+
const RUST_VERSION: &str = "1.88.0";
3030

3131
#[test]
3232
fn new_package() {

dylint/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = "A tool for running Rust lints from dynamic libraries"
77
edition = "2021"
88
license = "MIT OR Apache-2.0"
99
repository = "https://github.com/trailofbits/dylint"
10-
rust-version = "1.81"
10+
rust-version = "1.88"
1111

1212
[dependencies]
1313
anstyle = { workspace = true }

dylint/src/driver_builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ use crate::{error::warn, opts};
22
use anyhow::{Context, Result, anyhow, ensure};
33
use cargo_metadata::MetadataCommand;
44
use dylint_internal::{
5-
CommandExt, driver as dylint_driver, env, home,
5+
CommandExt, driver as dylint_driver, env,
66
rustup::{SanitizeEnvironment, toolchain_path},
77
};
88
use semver::Version;
99
use std::{
10-
env::consts,
10+
env::{consts, home_dir},
1111
fs::{copy, create_dir_all, rename, write},
1212
path::{Path, PathBuf},
1313
};
@@ -97,7 +97,7 @@ fn dylint_drivers() -> Result<PathBuf> {
9797
ensure!(dylint_drivers.is_dir());
9898
Ok(dylint_drivers.to_path_buf())
9999
} else {
100-
let home = home::home_dir().ok_or_else(|| anyhow!("Could not find HOME directory"))?;
100+
let home = home_dir().ok_or_else(|| anyhow!("Could not find HOME directory"))?;
101101
let dylint_drivers = Path::new(&home).join(".dylint_drivers");
102102
if !dylint_drivers.is_dir() {
103103
create_dir_all(&dylint_drivers).with_context(|| {

examples/general/abs_home_path/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ extern crate rustc_hir;
66
extern crate rustc_span;
77

88
use clippy_utils::{diagnostics::span_lint, is_in_test};
9-
use dylint_internal::home;
109
use once_cell::unsync::OnceCell;
1110
use rustc_ast::ast::LitKind;
1211
use rustc_hir::{Expr, ExprKind};
1312
use rustc_lint::{LateContext, LateLintPass, LintContext};
1413
use rustc_span::Span;
15-
use std::path::{Path, PathBuf};
14+
use std::{
15+
env::home_dir,
16+
path::{Path, PathBuf},
17+
};
1618

1719
dylint_linting::impl_late_lint! {
1820
/// ### What it does
@@ -84,7 +86,7 @@ impl<'tcx> LateLintPass<'tcx> for AbsHomePath {
8486
&& path.is_absolute()
8587
&& self
8688
.home
87-
.get_or_init(home::home_dir)
89+
.get_or_init(home_dir)
8890
.as_ref()
8991
.is_some_and(|dir| path.starts_with(dir))
9092
{
@@ -114,7 +116,7 @@ fn ui() {
114116

115117
// smoelius: On GitHub, `dylint` is stored on the D drive, not in the user's home directory on
116118
// the C drive.
117-
if let Some(home) = home::home_dir()
119+
if let Some(home) = home_dir()
118120
&& !Path::new(env!("CARGO_MANIFEST_DIR")).starts_with(home)
119121
{
120122
#[expect(clippy::explicit_write)]
@@ -189,7 +191,7 @@ fn context_allowance() {
189191
];
190192

191193
// Skip tests if repository is not stored in the user's home directory
192-
if let Some(home) = home::home_dir()
194+
if let Some(home) = home_dir()
193195
&& !Path::new(env!("CARGO_MANIFEST_DIR")).starts_with(home)
194196
{
195197
#[expect(clippy::explicit_write)]

expensive/tests/boundary_toolchains.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ const BOUNDARIES: &[(&str, &str)] = &[
2222
// https://github.com/rust-lang/rust/commit/0abc6c6e9859bc6915ddc76d484117ff626481c6
2323
// smoelius: 2025-05-15 is skipped because there is no release for that date.
2424
("nightly-2025-05-14", "nightly-2025-05-16"),
25+
// smoelius: `libloading-0.9.0` rustc 1.88.
2526
// https://github.com/rust-lang/rust/pull/135880
2627
// https://github.com/rust-lang/rust/commit/7d31ae7f351b4aa0fcb47d1d22e04c275bef0653
27-
("nightly-2025-01-24", "nightly-2025-01-25"),
28+
// ("nightly-2025-01-24", "nightly-2025-01-25"),
2829
// smoelius: `[email protected]` and `[email protected]` require rustc 1.86.
2930
// nightly-2024-03-17 is Rust 1.85.
3031
// https://github.com/rust-lang/rust/pull/133567

internal/src/home.rs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
1-
use crate::env;
2-
use std::path::PathBuf;
1+
use std::{env, path::PathBuf};
32

43
#[must_use]
54
pub fn cargo_home() -> Option<PathBuf> {
6-
if let Ok(cargo_home) = env::var(env::CARGO_HOME) {
5+
if let Ok(cargo_home) = env::var(crate::env::CARGO_HOME) {
76
Some(PathBuf::from(cargo_home))
87
} else {
9-
home_dir().map(|path| path.join(".cargo"))
8+
env::home_dir().map(|path| path.join(".cargo"))
109
}
1110
}
12-
13-
// smoelius: https://github.com/rust-lang/cargo/commit/014378f8c07bec557b6c6608e5baf0761a12d504
14-
#[rustversion::before(1.86)]
15-
pub use home::home_dir;
16-
17-
#[rustversion::since(1.86)]
18-
#[must_use]
19-
pub fn home_dir() -> Option<PathBuf> {
20-
// smoelius: The `deprecated` attribute hasn't been removed yet:
21-
// https://github.com/rust-lang/rust/pull/132515#discussion_r1829715262
22-
// smoelius: The attribute is removed in Rust's master branch:
23-
// https://github.com/rust-lang/rust/commit/2c752bcf559975995eb8086a7fa6a7f9b5ba0de8
24-
#[allow(deprecated)]
25-
std::env::home_dir()
26-
}

0 commit comments

Comments
 (0)