Update comment in contravariant test
The previous definition was actually describing covariance. Fixing to describe contravariance while keeping 'static in the definition was tricky so just changed to use 'short and 'long.
This commit is contained in:
parent
d440a569bb
commit
266b7e0f71
@ -15,8 +15,8 @@
|
||||
// variance inference works in the first place.
|
||||
|
||||
// This is contravariant with respect to 'a, meaning that
|
||||
// Contravariant<'foo> <: Contravariant<'static> because
|
||||
// 'foo <= 'static
|
||||
// Contravariant<'long> <: Contravariant<'short> iff
|
||||
// 'short <= 'long
|
||||
struct Contravariant<'a> {
|
||||
f: &'a int
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user