]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-67765-async-diagnostic.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / async-await / issue-67765-async-diagnostic.rs
CommitLineData
f035d41b
XL
1// edition:2018
2//
3// Regression test for issue #67765
4// Tests that we point at the proper location when giving
5// a lifetime error.
6fn main() {}
7
8async fn func<'a>() -> Result<(), &'a str> {
9 let s = String::new();
10
11 let b = &s[..];
12
13 Err(b)?; //~ ERROR cannot return value referencing local variable `s`
14
15 Ok(())
16}