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-invariant-arg-object.rs | |
| parent | 72e3e0e6f5fb72d5f947e07ef89455d71a6ff3ff (diff) | |
| download | rust-1c1d01eb495fb663f64766a5e7e1e23b9a2590e7.tar.gz rust-1c1d01eb495fb663f64766a5e7e1e23b9a2590e7.zip | |
More nll revisions
Diffstat (limited to 'src/test/ui/variance/variance-invariant-arg-object.rs')
| -rw-r--r-- | src/test/ui/variance/variance-invariant-arg-object.rs | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/src/test/ui/variance/variance-invariant-arg-object.rs b/src/test/ui/variance/variance-invariant-arg-object.rs index 886d263c457..cc8820fbac6 100644 --- a/src/test/ui/variance/variance-invariant-arg-object.rs +++ b/src/test/ui/variance/variance-invariant-arg-object.rs @@ -1,5 +1,9 @@ #![allow(dead_code)] +// revisions: base nll +// ignore-compare-mode-nll +//[nll] compile-flags: -Z borrowck=mir + trait Get<T> : 'static { fn get(&self, t: T) -> T; } @@ -8,14 +12,18 @@ fn get_min_from_max<'min, 'max>(v: Box<dyn Get<&'max i32>>) -> Box<dyn Get<&'min i32>> where 'max : 'min { - v //~ ERROR mismatched types + v + //[base]~^ ERROR mismatched types + //[nll]~^^ ERROR lifetime may not live long enough } fn get_max_from_min<'min, 'max, G>(v: Box<dyn Get<&'min i32>>) -> Box<dyn Get<&'max i32>> where 'max : 'min { - v //~ ERROR mismatched types + v + //[base]~^ ERROR mismatched types + //[nll]~^^ ERROR lifetime may not live long enough } fn main() { } | 
