Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled #14459

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cargo/ops/cargo_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,5 +1121,9 @@ fn annotate_required_rust_version(
.map(|(dep, _)| (Some(required_rust_version.clone()), dep)),
);
}
} else {
for change in changes.values_mut() {
change.required_rust_version = rustc_version.clone();
}
}
}
8 changes: 6 additions & 2 deletions tests/testsuite/cargo_add/rustc_ignore/stderr.term.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions tests/testsuite/rust_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ fn lint_dep_incompatible_with_rust_version() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 3 packages to latest compatible versions
[ADDING] too_new_child v0.0.1 (requires Rust 1.2345.0)
[ADDING] too_new_parent v0.0.1 (requires Rust 1.2345.0)

"#]])
.run();
Expand Down Expand Up @@ -296,6 +298,8 @@ fn resolve_with_rustc() {
.with_stderr_data(str![[r#"
[UPDATING] `dummy-registry` index
[LOCKING] 2 packages to latest compatible versions
[ADDING] newer-and-older v1.6.0 (requires Rust 1.2345)
[ADDING] only-newer v1.6.0 (requires Rust 1.2345)

"#]])
.run();
Expand Down