Skip to content

Commit 362057d

Browse files
committed
Add a main() to the doctest
1 parent 161f2d3 commit 362057d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/doc/rustc/src/platform-support/hexagon-unknown-qurt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ pub extern "C" fn rust_function() -> i32 {
158158
// Your Rust code here
159159
42
160160
}
161+
162+
fn main() {
163+
// Example usage
164+
let result = rust_function();
165+
assert_eq!(result, 42);
166+
}
161167
```
162168

163169
```c

0 commit comments

Comments
 (0)