mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update Having a safe `fn` in an `unsafe trait` vs an `unsafe fn` in a safe `trait` are pretty different situations, but the distinction is subtle and can confuse even seasoned Rust developers. So let's have explicit examples of both. I also removed the existing `unsafe trait` example since it was rather strange. Also the `unsafe_op_in_unsafe_fn` lint can help disentangle the two sides of `unsafe`, so update the docs to account for that. |
||
---|---|---|
.. | ||
benches | ||
primitive_docs | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |