diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-17 23:30:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-17 23:30:50 +0200 |
| commit | bfbb15a47915e10c92ec85308993b00c593976a4 (patch) | |
| tree | 5aebd998aa79d1b571800afbb8b6e42a17cb0922 /src/test | |
| parent | 36b066daa45e17b0590bddb619a0f0ffcaf33b05 (diff) | |
| parent | 4279bd56fc3598fa129759efb4bc466dcfc06348 (diff) | |
| download | rust-bfbb15a47915e10c92ec85308993b00c593976a4.tar.gz rust-bfbb15a47915e10c92ec85308993b00c593976a4.zip | |
Rollup merge of #101826 - andrewpollack:fix-joined-without-noop, r=Mark-Simulacrum
Enforce "joined()" and "joined_with_noop()" test Several similar tests come in the form of `joined()` and `joined_with_noop()`. In this test, the `joined()` has two calls to a noop, making it functionally equivalent to `joined_with_noop()`. This doesn't seem intended, and this PR removes those calls and changes the memory size to reflect the change For my education, why do tests with `noop()` calls sometimes have `noop()` contributing to the size, while others do not? E.g. https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L115 and https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L116 have no size difference, whereas https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L113 and https://github.com/rust-lang/rust/blob/master/src/test/ui/async-await/async-fn-size-moved-locals.rs#L114 have a size difference. Thank you!
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/async-await/async-fn-size-uninit-locals.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/ui/async-await/async-fn-size-uninit-locals.rs b/src/test/ui/async-await/async-fn-size-uninit-locals.rs index 31a086ba975..28b3280fed5 100644 --- a/src/test/ui/async-await/async-fn-size-uninit-locals.rs +++ b/src/test/ui/async-await/async-fn-size-uninit-locals.rs @@ -67,9 +67,7 @@ async fn joined() { let c = Big::new(); fut().await; - noop(); joiner = Joiner { a: Some(a), b: Some(b), c: Some(c) }; - noop(); } async fn joined_with_noop() { @@ -97,7 +95,7 @@ async fn join_retval() -> Joiner { fn main() { assert_eq!(2, std::mem::size_of_val(&single())); assert_eq!(3, std::mem::size_of_val(&single_with_noop())); - assert_eq!(3078, std::mem::size_of_val(&joined())); + assert_eq!(3074, std::mem::size_of_val(&joined())); assert_eq!(3078, std::mem::size_of_val(&joined_with_noop())); assert_eq!(3074, std::mem::size_of_val(&join_retval())); } |
