Martin Nordholts
c369e4b489
phantom-data: Add `Send` and `Sync` columns ( #411 )
1 year ago
Daniel Henry-Mantilla
7284d09164
Update the now stale warning about `PhantomData<T>` and dropck ( #363 )
...
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
3 years ago
Arthur Milchior
784685cc48
Introduce and avoid dropck ( #353 )
3 years ago
chubei
c6b4bf831e
Replace some use of variant with covariant ( #322 )
3 years ago
Yuki Okushi
0d8cefe8dd
Add a link to show why unused lifetimes on structs are forbidden
4 years ago
Hu Shuai
b5d7df3c9a
fix a typo
4 years ago
Peter Todd
ce08025be2
Remove mention of contravariance possibly getting scrapped
...
Contravariance is part of stable Rust, and it's a natural outcome of how
`fn(T)` interacts with lifetimes, so it's hard to imagine this ever
going away.
tl;dr: LONG LIVE CONTRAVARIANCE!
5 years ago
Alexis Beingessner
02ef0fbb2d
Merge pull request #131 from anderejd/master
...
Added missing "things".
6 years ago
anderejd
5fb237f0f8
Added a missing word.
6 years ago
Michal 'vorner' Vaner
5d56de9fcc
Minor improvements
...
* Prefer compile_fail over ignore, to catch if the code accidentally
starts compiling in future versions.
* Make an example compile by providing mocked environment around it in
case it should be correct.
* Links into std.
6 years ago
Bruno Kirschner
a73391dd35
Add missing source code language hints in drop-flags and phantom-data.
6 years ago
Hidehito Yabuuchi
89f36d58fc
Replace word 'covariance' with 'variance' for consistency.
7 years ago
Phil Ruffwind
d08fe97d12
Add Gankro's table to nomicon/src/phantom-data.md
...
Original: https://github.com/rust-lang/rust/issues/30069#issuecomment-159928136
Testing confirms that:
- PhantomData<fn() -> T> does not actually enable drop checking.
- PhantomData<fn(T) -> T> is neither variant nor contravariant.
8 years ago
Steve Klabnik
0e6c680ebd
Port Nomicon to mdbook
...
1. move everything under a src directory
2. add README.md to the SUMMARY.md
8 years ago