Skip to content

Commit

Permalink
Elaborate on rustdoc example reason for being ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 26, 2021
1 parent 8909830 commit 07cd499
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/rustdoc/src/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ all type errors and name resolution errors with function bodies. Note that this
work for anything outside a function body: since Rustdoc documents your types, it has to
know what those types are! For example, this code will work regardless of the platform:

```rust,ignore (platform-specific)
```rust,ignore (platform-specific,rustdoc-specific-behavior)
pub fn f() {
use std::os::windows::ffi::OsStrExt;
}
```

but this will not, because the unknown type is part of the function signature:

```rust,ignore (platform-specific)
```rust,ignore (platform-specific,rustdoc-specific-behavior)
pub fn f() -> std::os::windows::ffi::EncodeWide<'static> {
unimplemented!()
}
Expand Down

0 comments on commit 07cd499

Please sign in to comment.