File: 05-variance.rs

package info (click to toggle)
rust-glib 0.21.2-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 2,452 kB
  • sloc: makefile: 18
file content (13 lines) | stat: -rw-r--r-- 237 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
use glib::MatchInfo;

// pass
fn covariance_check<'short>(input: MatchInfo<'static>) -> MatchInfo<'short> {
    input
}

// fail
fn contravariance_check<'short>(input: MatchInfo<'short>) -> MatchInfo<'static> {
    input
}

fn main() {}