We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a17951c commit 0a1bdd4Copy full SHA for 0a1bdd4
src/test/ui/async-await/async-fn-size-moved-locals.rs
@@ -93,9 +93,27 @@ async fn joined_with_noop() {
93
joiner.await
94
}
95
96
+async fn mixed_sizes() {
97
+ let a = BigFut::new();
98
+ let b = BigFut::new();
99
+ let c = BigFut::new();
100
+ let d = BigFut::new();
101
+ let e = BigFut::new();
102
+ let joiner = Joiner {
103
+ a: Some(a),
104
+ b: Some(b),
105
+ c: Some(c),
106
+ };
107
+
108
+ d.await;
109
+ e.await;
110
+ joiner.await;
111
+}
112
113
fn main() {
114
assert_eq!(1028, std::mem::size_of_val(&single()));
115
assert_eq!(1032, std::mem::size_of_val(&single_with_noop()));
116
assert_eq!(3084, std::mem::size_of_val(&joined()));
117
assert_eq!(3084, std::mem::size_of_val(&joined_with_noop()));
118
+ assert_eq!(7188, std::mem::size_of_val(&mixed_sizes()));
119
0 commit comments