Skip to content

Commit afed1c4

Browse files
committed
Auto merge of #11859 - chaitanyav:master, r=weihanglo
Add --ignore-rust-version flag to cargo install `@weihanglo` Added the flag to cargo install fixes #11718
2 parents 94394eb + 1c84d82 commit afed1c4

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

src/bin/cargo/commands/install.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pub fn cli() -> Command {
8080
.requires("crate")
8181
.conflicts_with_all(&["git", "path", "index"]),
8282
)
83+
.arg_ignore_rust_version()
8384
.arg_message_format()
8485
.arg_timings()
8586
.after_help("Run `cargo help install` for more detailed information.\n")

src/doc/man/cargo-install.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ See also the `--profile` option for choosing a specific profile by name.
179179

180180
{{> options-profile }}
181181

182+
{{> options-ignore-rust-version }}
183+
182184
{{> options-timings }}
183185

184186
{{/options}}

src/doc/man/generated_txt/cargo-install.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ OPTIONS
215215
<https://doc.rust-lang.org/cargo/reference/profiles.html> for more
216216
details on profiles.
217217

218+
--ignore-rust-version
219+
Install the target even if the selected Rust compiler is older than
220+
the required Rust version as configured in the project’s
221+
rust-version field.
222+
218223
--timings=fmts
219224
Output information how long each compilation takes, and track
220225
concurrency information over time. Accepts an optional

src/doc/src/commands/cargo-install.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ See the <a href="../reference/profiles.html">the reference</a> for more details
248248

249249

250250

251+
<dt class="option-term" id="option-cargo-install---ignore-rust-version"><a class="option-anchor" href="#option-cargo-install---ignore-rust-version"></a><code>--ignore-rust-version</code></dt>
252+
<dd class="option-desc">Install the target even if the selected Rust compiler is older than the
253+
required Rust version as configured in the project’s <code>rust-version</code> field.</dd>
254+
255+
256+
251257
<dt class="option-term" id="option-cargo-install---timings=fmts"><a class="option-anchor" href="#option-cargo-install---timings=fmts"></a><code>--timings=</code><em>fmts</em></dt>
252258
<dd class="option-desc">Output information how long each compilation takes, and track concurrency
253259
information over time. Accepts an optional comma-separated list of output

src/etc/man/cargo-install.1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ Install with the given profile.
273273
See the \fIthe reference\fR <https://doc.rust\-lang.org/cargo/reference/profiles.html> for more details on profiles.
274274
.RE
275275
.sp
276+
\fB\-\-ignore\-rust\-version\fR
277+
.RS 4
278+
Install the target even if the selected Rust compiler is older than the
279+
required Rust version as configured in the project\[cq]s \fBrust\-version\fR field.
280+
.RE
281+
.sp
276282
\fB\-\-timings=\fR\fIfmts\fR
277283
.RS 4
278284
Output information how long each compilation takes, and track concurrency

0 commit comments

Comments
 (0)