Skip to content

Commit 9add993

Browse files
committed
1 parent 96bfbc6 commit 9add993

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

cargo-dylint/tests/boundary_toolchains.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,21 @@ use dylint_internal::{
66
};
77
use tempfile::tempdir;
88

9-
// smoelius: The channel date is one day later than the `rustc --version` date.
9+
// smoelius: The channel date is one day later than the `rustc --version` date. For example, suppose
10+
// the code contains:
11+
// ```
12+
// #[rustversion::since(2024-03-29)] ...
13+
// ```
14+
// Then the boundary should be:
15+
// ```
16+
// ("2024-03-29", "2024-03-30"),
17+
// ```
1018
// smoelius: Put recent boundaries first, since they're more likely to cause problems.
1119
// smoelius: The relevant PRs and merge commits appear before each boundary.
1220
const BOUNDARIES: &[(&str, &str)] = &[
21+
// https://github.com/rust-lang/rust/pull/122450
22+
// https://github.com/rust-lang/rust/commit/685927aae69657b46323cffbeb0062835bd7fa2b
23+
("2024-03-29", "2024-03-30"),
1324
// https://github.com/rust-lang/rust/pull/121780
1425
// https://github.com/rust-lang/rust/commit/1547c076bfec8abb819d6a81e1e4095d267bd5b4
1526
// https://github.com/rust-lang/rust/pull/121969

utils/linting/src/lib.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,20 @@ fn local_crate_source_file(sess: &rustc_session::Session) -> Option<PathBuf> {
671671
// smoelius: Relevant PR and merge commit:
672672
// - https://github.com/rust-lang/rust/pull/106810
673673
// - https://github.com/rust-lang/rust/commit/65d2f2a5f9c323c88d1068e8e90d0b47a20d491c
674-
#[rustversion::since(2023-01-19)]
674+
#[rustversion::all(since(2023-01-19), before(2024-03-29))]
675675
fn local_crate_source_file(sess: &rustc_session::Session) -> Option<PathBuf> {
676676
sess.local_crate_source_file()
677677
}
678678

679+
// smoelius: Relevant PR and merge commit:
680+
// - https://github.com/rust-lang/rust/pull/122450
681+
// - https://github.com/rust-lang/rust/commit/685927aae69657b46323cffbeb0062835bd7fa2b
682+
#[rustversion::since(2024-03-29)]
683+
fn local_crate_source_file(sess: &rustc_session::Session) -> Option<PathBuf> {
684+
sess.local_crate_source_file()
685+
.and_then(rustc_span::RealFileName::into_local_path)
686+
}
687+
679688
#[rustversion::before(2023-06-28)]
680689
fn early_error(msg: String) -> ! {
681690
rustc_session::early_error(

0 commit comments

Comments
 (0)