diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-13 17:38:24 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-05 06:37:38 -0400 |
| commit | e8472e84e3e1ef614b97896d42e0a6976fb02855 (patch) | |
| tree | b3a7f79347f0dbedec7c913d544097890d5970ff /tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs | |
| parent | eb33b43bab08223fa6b46abacc1e95e859fe375d (diff) | |
| download | rust-e8472e84e3e1ef614b97896d42e0a6976fb02855.tar.gz rust-e8472e84e3e1ef614b97896d42e0a6976fb02855.zip | |
Check unnormalized signature on pointer cast
Diffstat (limited to 'tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs')
| -rw-r--r-- | tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs index f3401f34eec..d40418a4e90 100644 --- a/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs +++ b/tests/ui/implied-bounds/implied-bounds-on-nested-references-plus-variance.rs @@ -1,15 +1,10 @@ -//@ check-pass -//@ known-bug: #25860 - -// Should fail. The combination of variance and implied bounds for nested -// references allows us to infer a longer lifetime than we can prove. - static UNIT: &'static &'static () = &&(); fn foo<'a, 'b, T>(_: &'a &'b (), v: &'b T) -> &'a T { v } fn bad<'a, T>(x: &'a T) -> &'static T { let f: fn(_, &'a T) -> &'static T = foo; + //~^ ERROR lifetime may not live long enough f(UNIT, x) } |
