]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-64130-3-other.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / async-await / issue-64130-3-other.rs
CommitLineData
60c5eb7d 1#![feature(optin_builtin_traits)]
ba9703b0 2#![feature(negative_impls)]
60c5eb7d
XL
3// edition:2018
4
5// This tests the the unspecialized async-await-specific error when futures don't implement an
6// auto trait (which is not Send or Sync) due to some type that was captured.
7
8auto trait Qux { }
9
10struct Foo;
11
12impl !Qux for Foo {}
13
14fn is_qux<T: Qux>(t: T) { }
15
16async fn bar() {
17 let x = Foo;
18 baz().await;
19}
20
21async fn baz() { }
22
23fn main() {
24 is_qux(bar());
25 //~^ ERROR the trait bound `Foo: Qux` is not satisfied in `impl std::future::Future`
26}