File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,12 @@ jobs:
233
233
# Allows installing for a different base target
234
234
target : ${{ matrix.rust.target || matrix.target }}
235
235
236
+ - name : Build
237
+ uses : actions-rs/cargo@v1
238
+ with :
239
+ command : build
240
+ args : ${{ matrix.args }}
241
+
236
242
- name : Check documentation
237
243
uses : actions-rs/cargo@v1
238
244
with :
@@ -251,6 +257,12 @@ jobs:
251
257
command : test
252
258
args : --no-fail-fast --features ${{ env.FEATURES }} ${{ matrix.args }} ${{ matrix.test-args }}
253
259
260
+ - name : Test in release mode
261
+ uses : actions-rs/cargo@v1
262
+ with :
263
+ command : test
264
+ args : --no-fail-fast --features ${{ env.FEATURES }} ${{ matrix.args }} ${{ matrix.test-args }} --release
265
+
254
266
- name : Test with unstable features
255
267
if : matrix.rust.toolchain == 'nightly'
256
268
uses : actions-rs/cargo@v1
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ pub mod __gnustep_hack {
180
180
}
181
181
182
182
pub unsafe fn get_class_to_force_linkage ( ) -> & ' static Class {
183
- unsafe { & _OBJC_CLASS_NSObject }
183
+ unsafe { core :: ptr :: read_volatile ( & & _OBJC_CLASS_NSObject) }
184
184
}
185
185
186
186
#[ test]
Original file line number Diff line number Diff line change @@ -276,8 +276,8 @@ impl !AutoreleaseSafe for AutoreleasePool {}
276
276
/// });
277
277
/// ```
278
278
///
279
- /// Incorrect usage which panics because we tried to pass an outer pool to an
280
- /// inner pool:
279
+ /// Incorrect usage which panics (with debug assertions enabled) because we
280
+ /// tried to pass an outer pool to an inner pool:
281
281
///
282
282
#[ cfg_attr( feature = "unstable_autoreleasesafe" , doc = "```compile_fail" ) ]
283
283
#[ cfg_attr( not( feature = "unstable_autoreleasesafe" ) , doc = "```should_panic" ) ]
@@ -300,6 +300,8 @@ impl !AutoreleaseSafe for AutoreleasePool {}
300
300
/// // assigned to the outer pool, even though it was released by the
301
301
/// // inner pool already.
302
302
/// });
303
+ /// #
304
+ /// # panic!("Does not panic in release mode, so for testing we make it!");
303
305
/// ```
304
306
#[ doc( alias = "@autoreleasepool" ) ]
305
307
pub fn autoreleasepool < T , F > ( f : F ) -> T
You can’t perform that action at this time.
0 commit comments