microsoft / rust-for-dotnet-devs

Rust for C#/.NET Developers
https://microsoft.github.io/rust-for-dotnet-devs/latest/
Other
356 stars 50 forks source link

Allow markers for problematic Rust code #26

Closed atifaziz closed 1 year ago

atifaziz commented 1 year ago

This PR adds Ferris from The Rust Programming Language and as used there to mark-up problematic Rust code. In fenced code, one of the following additional tags may be used after the rust language:

Tag Ferris Meaning
does_not_compile This code does not compile!
panics This code panics!
not_desired_behavior This code does not produce the desired behavior.

For example:

```rust,does_not_compile
// code for illustration, but that does not compile 
```

Unfortunately, due to relative path use in ferris.js, the images folder (img) is (symbolically) linked into every folder.