Skip to content

Commit 266b7e0

Browse files
committed
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.
1 parent d440a56 commit 266b7e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/compile-fail/regions-variance-contravariant-use-covariant.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// variance inference works in the first place.
1616

1717
// This is contravariant with respect to 'a, meaning that
18-
// Contravariant<'foo> <: Contravariant<'static> because
19-
// 'foo <= 'static
18+
// Contravariant<'long> <: Contravariant<'short> iff
19+
// 'short <= 'long
2020
struct Contravariant<'a> {
2121
f: &'a int
2222
}

0 commit comments

Comments
 (0)