File tree 28 files changed +68
-10
lines changed
28 files changed +68
-10
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ pub trait AppExt: Sized {
142
142
}
143
143
144
144
fn arg_release ( self , release : & ' static str ) -> Self {
145
- self . _arg ( opt ( "release" , release) )
145
+ self . _arg ( opt ( "release" , release) . short ( "r" ) )
146
146
}
147
147
148
148
fn arg_profile ( self , profile : & ' static str ) -> Self {
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ OPTIONS
142
142
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
143
143
documentation for more details.
144
144
145
- --release
145
+ -r, - -release
146
146
Build optimized artifacts with the release profile. See also the
147
147
--profile option for choosing a specific profile by name.
148
148
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ OPTIONS
148
148
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
149
149
documentation for more details.
150
150
151
- --release
151
+ -r, - -release
152
152
Check optimized artifacts with the release profile. See also the
153
153
--profile option for choosing a specific profile by name.
154
154
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ OPTIONS
126
126
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
127
127
documentation for more details.
128
128
129
- --release
129
+ -r, - -release
130
130
Document optimized artifacts with the release profile. See also the
131
131
--profile option for choosing a specific profile by name.
132
132
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ OPTIONS
221
221
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
222
222
documentation for more details.
223
223
224
- --release
224
+ -r, - -release
225
225
Fix optimized artifacts with the release profile. See also the
226
226
--profile option for choosing a specific profile by name.
227
227
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ OPTIONS
71
71
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
72
72
documentation for more details.
73
73
74
- --release
74
+ -r, - -release
75
75
Run optimized artifacts with the release profile. See also the
76
76
--profile option for choosing a specific profile by name.
77
77
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ OPTIONS
133
133
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
134
134
documentation for more details.
135
135
136
- --release
136
+ -r, - -release
137
137
Build optimized artifacts with the release profile. See also the
138
138
--profile option for choosing a specific profile by name.
139
139
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ OPTIONS
142
142
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
143
143
documentation for more details.
144
144
145
- --release
145
+ -r, - -release
146
146
Document optimized artifacts with the release profile. See also the
147
147
--profile option for choosing a specific profile by name.
148
148
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ OPTIONS
219
219
<https://doc.rust-lang.org/cargo/guide/build-cache.html>
220
220
documentation for more details.
221
221
222
- --release
222
+ -r, - -release
223
223
Test optimized artifacts with the release profile. See also the
224
224
--profile option for choosing a specific profile by name.
225
225
Original file line number Diff line number Diff line change 1
- {{#option "` --release ` "}}
1
+ {{#option "` -r ` " " ` - -release` "}}
2
2
{{actionverb}} optimized artifacts with the ` release ` profile.
3
3
See also the ` --profile ` option for choosing a specific profile by name.
4
4
{{/option}}
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ target artifacts are placed in a separate directory. See the
181
181
182
182
183
183
184
+ <dt class =" option-term " id =" option-cargo-build--r " ><a class =" option-anchor " href =" #option-cargo-build--r " ></a ><code >-r</code ></dt >
184
185
<dt class =" option-term " id =" option-cargo-build---release " ><a class =" option-anchor " href =" #option-cargo-build---release " ></a ><code >--release</code ></dt >
185
186
<dd class =" option-desc " >Build optimized artifacts with the <code >release</code > profile.
186
187
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ target artifacts are placed in a separate directory. See the
186
186
187
187
188
188
189
+ <dt class =" option-term " id =" option-cargo-check--r " ><a class =" option-anchor " href =" #option-cargo-check--r " ></a ><code >-r</code ></dt >
189
190
<dt class =" option-term " id =" option-cargo-check---release " ><a class =" option-anchor " href =" #option-cargo-check---release " ></a ><code >--release</code ></dt >
190
191
<dd class =" option-desc " >Check optimized artifacts with the <code >release</code > profile.
191
192
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ target artifacts are placed in a separate directory. See the
164
164
165
165
166
166
167
+ <dt class =" option-term " id =" option-cargo-doc--r " ><a class =" option-anchor " href =" #option-cargo-doc--r " ></a ><code >-r</code ></dt >
167
168
<dt class =" option-term " id =" option-cargo-doc---release " ><a class =" option-anchor " href =" #option-cargo-doc---release " ></a ><code >--release</code ></dt >
168
169
<dd class =" option-desc " >Document optimized artifacts with the <code >release</code > profile.
169
170
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ target artifacts are placed in a separate directory. See the
266
266
267
267
268
268
269
+ <dt class =" option-term " id =" option-cargo-fix--r " ><a class =" option-anchor " href =" #option-cargo-fix--r " ></a ><code >-r</code ></dt >
269
270
<dt class =" option-term " id =" option-cargo-fix---release " ><a class =" option-anchor " href =" #option-cargo-fix---release " ></a ><code >--release</code ></dt >
270
271
<dd class =" option-desc " >Fix optimized artifacts with the <code >release</code > profile.
271
272
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ target artifacts are placed in a separate directory. See the
99
99
100
100
101
101
102
+ <dt class =" option-term " id =" option-cargo-run--r " ><a class =" option-anchor " href =" #option-cargo-run--r " ></a ><code >-r</code ></dt >
102
103
<dt class =" option-term " id =" option-cargo-run---release " ><a class =" option-anchor " href =" #option-cargo-run---release " ></a ><code >--release</code ></dt >
103
104
<dd class =" option-desc " >Run optimized artifacts with the <code >release</code > profile.
104
105
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ target artifacts are placed in a separate directory. See the
168
168
169
169
170
170
171
+ <dt class =" option-term " id =" option-cargo-rustc--r " ><a class =" option-anchor " href =" #option-cargo-rustc--r " ></a ><code >-r</code ></dt >
171
172
<dt class =" option-term " id =" option-cargo-rustc---release " ><a class =" option-anchor " href =" #option-cargo-rustc---release " ></a ><code >--release</code ></dt >
172
173
<dd class =" option-desc " >Build optimized artifacts with the <code >release</code > profile.
173
174
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ target artifacts are placed in a separate directory. See the
183
183
184
184
185
185
186
+ <dt class =" option-term " id =" option-cargo-rustdoc--r " ><a class =" option-anchor " href =" #option-cargo-rustdoc--r " ></a ><code >-r</code ></dt >
186
187
<dt class =" option-term " id =" option-cargo-rustdoc---release " ><a class =" option-anchor " href =" #option-cargo-rustdoc---release " ></a ><code >--release</code ></dt >
187
188
<dd class =" option-desc " >Document optimized artifacts with the <code >release</code > profile.
188
189
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ target artifacts are placed in a separate directory. See the
262
262
263
263
264
264
265
+ <dt class =" option-term " id =" option-cargo-test--r " ><a class =" option-anchor " href =" #option-cargo-test--r " ></a ><code >-r</code ></dt >
265
266
<dt class =" option-term " id =" option-cargo-test---release " ><a class =" option-anchor " href =" #option-cargo-test---release " ></a ><code >--release</code ></dt >
266
267
<dd class =" option-desc " >Test optimized artifacts with the <code >release</code > profile.
267
268
See also the <code >--profile</code > option for choosing a specific profile by name.</dd >
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ target artifacts are placed in a separate directory. See the
169
169
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
170
170
.RE
171
171
.sp
172
+ \fB \- r \fR ,
172
173
\fB \-\- release \fR
173
174
.RS 4
174
175
Build optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ target artifacts are placed in a separate directory. See the
174
174
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
175
175
.RE
176
176
.sp
177
+ \fB \- r \fR ,
177
178
\fB \-\- release \fR
178
179
.RS 4
179
180
Check optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ target artifacts are placed in a separate directory. See the
147
147
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
148
148
.RE
149
149
.sp
150
+ \fB \- r \fR ,
150
151
\fB \-\- release \fR
151
152
.RS 4
152
153
Document optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ target artifacts are placed in a separate directory. See the
269
269
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
270
270
.RE
271
271
.sp
272
+ \fB \- r \fR ,
272
273
\fB \-\- release \fR
273
274
.RS 4
274
275
Fix optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ target artifacts are placed in a separate directory. See the
80
80
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
81
81
.RE
82
82
.sp
83
+ \fB \- r \fR ,
83
84
\fB \-\- release \fR
84
85
.RS 4
85
86
Run optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ target artifacts are placed in a separate directory. See the
155
155
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
156
156
.RE
157
157
.sp
158
+ \fB \- r \fR ,
158
159
\fB \-\- release \fR
159
160
.RS 4
160
161
Build optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ target artifacts are placed in a separate directory. See the
166
166
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
167
167
.RE
168
168
.sp
169
+ \fB \- r \fR ,
169
170
\fB \-\- release \fR
170
171
.RS 4
171
172
Document optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ target artifacts are placed in a separate directory. See the
266
266
\fI build cache \fR <https://doc.rust\- lang.org/cargo/guide/build\- cache.html> documentation for more details.
267
267
.RE
268
268
.sp
269
+ \fB \- r \fR ,
269
270
\fB \-\- release \fR
270
271
.RS 4
271
272
Test optimized artifacts with the \fB release \fR profile.
Original file line number Diff line number Diff line change @@ -1775,6 +1775,25 @@ fn verbose_release_build() {
1775
1775
. run ( ) ;
1776
1776
}
1777
1777
1778
+ #[ cargo_test]
1779
+ fn verbose_release_build_short ( ) {
1780
+ let p = project ( ) . file ( "src/lib.rs" , "" ) . build ( ) ;
1781
+ p. cargo ( "build -v -r" )
1782
+ . with_stderr (
1783
+ "\
1784
+ [COMPILING] foo v0.0.1 ([CWD])
1785
+ [RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
1786
+ --emit=[..]link[..]\
1787
+ -C opt-level=3[..]\
1788
+ -C metadata=[..] \
1789
+ --out-dir [..] \
1790
+ -L dependency=[CWD]/target/release/deps`
1791
+ [FINISHED] release [optimized] target(s) in [..]
1792
+ " ,
1793
+ )
1794
+ . run ( ) ;
1795
+ }
1796
+
1778
1797
#[ cargo_test]
1779
1798
fn verbose_release_build_deps ( ) {
1780
1799
let p = project ( )
Original file line number Diff line number Diff line change @@ -936,6 +936,29 @@ fn release_works() {
936
936
assert ! ( p. release_bin( "foo" ) . is_file( ) ) ;
937
937
}
938
938
939
+ #[ cargo_test]
940
+ fn release_short_works ( ) {
941
+ let p = project ( )
942
+ . file (
943
+ "src/main.rs" ,
944
+ r#"
945
+ fn main() { if cfg!(debug_assertions) { panic!() } }
946
+ "# ,
947
+ )
948
+ . build ( ) ;
949
+
950
+ p. cargo ( "run -r" )
951
+ . with_stderr (
952
+ "\
953
+ [COMPILING] foo v0.0.1 ([CWD])
954
+ [FINISHED] release [optimized] target(s) in [..]
955
+ [RUNNING] `target/release/foo[EXE]`
956
+ " ,
957
+ )
958
+ . run ( ) ;
959
+ assert ! ( p. release_bin( "foo" ) . is_file( ) ) ;
960
+ }
961
+
939
962
#[ cargo_test]
940
963
fn run_bin_different_name ( ) {
941
964
let p = project ( )
You can’t perform that action at this time.
0 commit comments