Skip to content

Commit

Permalink
Auto merge of #11859 - chaitanyav:master, r=weihanglo
Browse files Browse the repository at this point in the history
Add --ignore-rust-version flag to cargo install

`@weihanglo` Added the flag to cargo install
fixes #11718
  • Loading branch information
bors committed Mar 16, 2023
2 parents 94394eb + 1c84d82 commit afed1c4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/cargo/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub fn cli() -> Command {
.requires("crate")
.conflicts_with_all(&["git", "path", "index"]),
)
.arg_ignore_rust_version()
.arg_message_format()
.arg_timings()
.after_help("Run `cargo help install` for more detailed information.\n")
Expand Down
2 changes: 2 additions & 0 deletions src/doc/man/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ See also the `--profile` option for choosing a specific profile by name.

{{> options-profile }}

{{> options-ignore-rust-version }}

{{> options-timings }}

{{/options}}
Expand Down
5 changes: 5 additions & 0 deletions src/doc/man/generated_txt/cargo-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ OPTIONS
<https://doc.rust-lang.org/cargo/reference/profiles.html> for more
details on profiles.

--ignore-rust-version
Install the target even if the selected Rust compiler is older than
the required Rust version as configured in the project’s
rust-version field.

--timings=fmts
Output information how long each compilation takes, and track
concurrency information over time. Accepts an optional
Expand Down
6 changes: 6 additions & 0 deletions src/doc/src/commands/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ See the <a href="../reference/profiles.html">the reference</a> for more details



<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>
<dd class="option-desc">Install the target even if the selected Rust compiler is older than the
required Rust version as configured in the project’s <code>rust-version</code> field.</dd>



<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>
<dd class="option-desc">Output information how long each compilation takes, and track concurrency
information over time. Accepts an optional comma-separated list of output
Expand Down
6 changes: 6 additions & 0 deletions src/etc/man/cargo-install.1
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ Install with the given profile.
See the \fIthe reference\fR <https://doc.rust\-lang.org/cargo/reference/profiles.html> for more details on profiles.
.RE
.sp
\fB\-\-ignore\-rust\-version\fR
.RS 4
Install the target even if the selected Rust compiler is older than the
required Rust version as configured in the project\[cq]s \fBrust\-version\fR field.
.RE
.sp
\fB\-\-timings=\fR\fIfmts\fR
.RS 4
Output information how long each compilation takes, and track concurrency
Expand Down

0 comments on commit afed1c4

Please sign in to comment.