File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -437,7 +437,7 @@ fn test_option_dance() {
437
437
}
438
438
#[ test] #[ should_fail] #[ ignore( cfg( windows) ) ]
439
439
fn test_option_too_much_dance ( ) {
440
- let mut y = Some ( util:: NonCopyable ( ) ) ;
440
+ let mut y = Some ( util:: NonCopyable :: new ( ) ) ;
441
441
let _y2 = y. swap_unwrap ( ) ;
442
442
let _y3 = y. swap_unwrap ( ) ;
443
443
}
Original file line number Diff line number Diff line change @@ -79,13 +79,15 @@ pub struct NonCopyable {
79
79
priv i: ( ) ,
80
80
}
81
81
82
+ impl NonCopyable {
83
+ /// Creates a dummy non-copyable structure and returns it for use.
84
+ pub fn new ( ) -> NonCopyable { NonCopyable { i : ( ) } }
85
+ }
86
+
82
87
impl Drop for NonCopyable {
83
88
fn finalize ( & self ) { }
84
89
}
85
90
86
- /// Creates a dummy non-copyable structure and returns it for use.
87
- pub fn NonCopyable ( ) -> NonCopyable { NonCopyable { i : ( ) } }
88
-
89
91
90
92
/// A type with no inhabitants
91
93
pub enum Void { }
You can’t perform that action at this time.
0 commit comments