Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed May 23, 2023
1 parent 1a97f32 commit 48bd444
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
12 changes: 11 additions & 1 deletion cargo-dylint/tests/boundary_toolchains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ use test_log::test;

// smoelius: The channel date is one day later than the `rustc --version` date.
// smoelius: Put recent boundaries first, since they're more likely to cause problems.
const BOUNDARIES: [(&str, &str); 3] = [
// smoelius: The relevant PRs and merge commits appear before each boundary.
const BOUNDARIES: [(&str, &str); 4] = [
// https://github.com/rust-lang/rust/pull/111633
// https://github.com/rust-lang/rust/commit/08efb9d652c840715d15954592426e2befe13b36
("2023-05-18", "2023-05-19"),
// https://github.com/rust-lang/rust/pull/106810
// https://github.com/rust-lang/rust/commit/65d2f2a5f9c323c88d1068e8e90d0b47a20d491c
("2023-01-19", "2023-01-20"),
// https://github.com/rust-lang/rust/pull/101501
// https://github.com/rust-lang/rust/commit/87788097b776f8e3662f76627944230684b671bd
("2022-09-08", "2022-09-09"),
// https://github.com/rust-lang/rust/pull/98975
// https://github.com/rust-lang/rust/commit/0ed9c64c3e63acac9bd77abce62501696c390450
("2022-07-14", "2022-07-15"),
];

Expand Down
7 changes: 5 additions & 2 deletions driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,16 @@ impl Callbacks {
let result = libloading::Library::new(&path);

let lib = result.unwrap_or_else(|err| {
// smoelius: rust-lang/rust#111633 changed the type of `early_error`'s `msg`
// argument from `&str` to `impl Into<DiagnosticMessage>`.
rustc_session::early_error(
rustc_session::config::ErrorOutputType::default(),
&format!(
format!(
"could not load library `{}`: {}",
path.to_string_lossy(),
err
),
)
.as_str(),
);
});

Expand Down
2 changes: 1 addition & 1 deletion utils/linting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ pub fn init_config(sess: &rustc_session::Session) {
try_init_config(sess).unwrap_or_else(|err| {
rustc_session::early_error(
rustc_session::config::ErrorOutputType::default(),
&format!("could not read configuration file: {err}"),
format!("could not read configuration file: {err}").as_str(),
);
});
}
Expand Down

0 comments on commit 48bd444

Please sign in to comment.