diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-04-01 22:12:17 -0400 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-04-05 11:42:44 -0400 |
| commit | 1c1d01eb495fb663f64766a5e7e1e23b9a2590e7 (patch) | |
| tree | cb3ca5e7f17ded8fffccfdeea3707d86d1f51281 /src/test/ui/variance/variance-use-invariant-struct-1.rs | |
| parent | 72e3e0e6f5fb72d5f947e07ef89455d71a6ff3ff (diff) | |
| download | rust-1c1d01eb495fb663f64766a5e7e1e23b9a2590e7.tar.gz rust-1c1d01eb495fb663f64766a5e7e1e23b9a2590e7.zip | |
More nll revisions
Diffstat (limited to 'src/test/ui/variance/variance-use-invariant-struct-1.rs')
| -rw-r--r-- | src/test/ui/variance/variance-use-invariant-struct-1.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.rs b/src/test/ui/variance/variance-use-invariant-struct-1.rs index 4772a9fb878..7be03514e01 100644 --- a/src/test/ui/variance/variance-use-invariant-struct-1.rs +++ b/src/test/ui/variance/variance-use-invariant-struct-1.rs @@ -1,7 +1,9 @@ // Test various uses of structs with distint variances to make sure // they permit lifetimes to be approximated as expected. - +// revisions: base nll +// ignore-compare-mode-nll +//[nll] compile-flags: -Z borrowck=mir struct SomeStruct<T>(*mut T); @@ -9,14 +11,18 @@ fn foo<'min,'max>(v: SomeStruct<&'max ()>) -> SomeStruct<&'min ()> where 'max : 'min { - v //~ ERROR mismatched types + v + //[base]~^ ERROR mismatched types + //[nll]~^^ ERROR lifetime may not live long enough } fn bar<'min,'max>(v: SomeStruct<&'min ()>) -> SomeStruct<&'max ()> where 'max : 'min { - v //~ ERROR mismatched types + v + //[base]~^ ERROR mismatched types + //[nll]~^^ ERROR lifetime may not live long enough } |
