]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-64391-2.rs
Rollup merge of #103766 - lukas-code:error-in-core, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / issues / issue-64391-2.rs
1 // Regression test for #64391
2 //
3 // As described on the issue, the (spurious) `DROP` inserted for the
4 // `"".to_string()` value was causing a (spurious) unwind path that
5 // led us to believe that the future might be dropped after `config`
6 // had been dropped. This cannot, in fact, happen.
7 //
8 // check-pass
9 // edition:2018
10
11 async fn connect() {
12     let config = 666;
13     connect2(&config, "".to_string()).await
14 }
15
16 async fn connect2(_config: &u32, _tls: String) {
17     unimplemented!()
18 }
19
20 fn main() { }