Skip to content

Commit ed313a0

Browse files
committed
Fix invalid definition of strlen in error codes documentation
1 parent bc58224 commit ed313a0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_error_codes/src/error_codes/E0755.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ side effects or infinite loops:
2020
2121
extern "C" {
2222
#[unsafe(ffi_pure)] // ok!
23-
pub fn strlen(s: *const i8) -> isize;
23+
pub fn strlen(s: *const std::ffi::c_char) -> usize;
2424
}
2525
# fn main() {}
2626
```

compiler/rustc_error_codes/src/error_codes/E0756.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ which have no side effects except for their return value:
2121
2222
extern "C" {
2323
#[unsafe(ffi_const)] // ok!
24-
pub fn strlen(s: *const i8) -> i32;
24+
pub fn strlen(s: *const std::ffi::c_char) -> usize;
2525
}
2626
# fn main() {}
2727
```

0 commit comments

Comments
 (0)