File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,9 @@ fn main() {
14
14
let x = S . other ( S . id ( ) ) ;
15
15
}
16
16
17
- // no_mangle and extern C to make sure this gets instantiated even in an
18
- // executable.
17
+ // no_mangle to make sure this gets instantiated even in an executable.
19
18
#[ no_mangle]
20
- pub extern "C" fn test ( ) {
19
+ pub fn test ( ) {
21
20
let u = S ;
22
21
let mut v = S ;
23
22
drop ( v) ;
Original file line number Diff line number Diff line change @@ -18,15 +18,19 @@ fn guard2(_:i32) -> bool {
18
18
true
19
19
}
20
20
21
- fn full_tested_match ( ) {
21
+ // no_mangle to make sure this gets instantiated even in an executable.
22
+ #[ no_mangle]
23
+ pub fn full_tested_match ( ) {
22
24
let _ = match Some ( 42 ) {
23
25
Some ( x) if guard ( ) => ( 1 , x) ,
24
26
Some ( y) => ( 2 , y) ,
25
27
None => ( 3 , 3 ) ,
26
28
} ;
27
29
}
28
30
29
- fn full_tested_match2 ( ) {
31
+ // no_mangle to make sure this gets instantiated even in an executable.
32
+ #[ no_mangle]
33
+ pub fn full_tested_match2 ( ) {
30
34
let _ = match Some ( 42 ) {
31
35
Some ( x) if guard ( ) => ( 1 , x) ,
32
36
None => ( 3 , 3 ) ,
You can’t perform that action at this time.
0 commit comments