diff options
| author | bors <bors@rust-lang.org> | 2014-02-10 08:16:35 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-10 08:16:35 -0800 |
| commit | 4f16e519f13cbfd78cd6c06fc0639df401bc0077 (patch) | |
| tree | 103dc3b55cceefc559e7b409b01f2d9fd57da9a9 /src | |
| parent | d32491759691b21fa3639ac86a1387c3e5a64fb6 (diff) | |
| parent | 266b7e0f71a1992d0120598b975fe21a2f39f288 (diff) | |
| download | rust-4f16e519f13cbfd78cd6c06fc0639df401bc0077.tar.gz rust-4f16e519f13cbfd78cd6c06fc0639df401bc0077.zip | |
auto merge of #12150 : jakerr/rust/patch-1, r=pnkfelix
The current comment actually describes *co*-variance. Fixing this to describe contravariance while keeping 'static in the definition was tricky so just changed to use 'short and 'long. I found the typo in my attempt to understand the concept of variance itself and the comment confused me. I mention this to point out that I'm new to the concept so may have still got the definition wrong, so please review with care :)
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/compile-fail/regions-variance-contravariant-use-covariant.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/compile-fail/regions-variance-contravariant-use-covariant.rs b/src/test/compile-fail/regions-variance-contravariant-use-covariant.rs index 3f0161d9deb..0fab8926460 100644 --- a/src/test/compile-fail/regions-variance-contravariant-use-covariant.rs +++ b/src/test/compile-fail/regions-variance-contravariant-use-covariant.rs @@ -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 } |
