about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorBryan Garza <1396101+bryangarza@users.noreply.github.com>2022-11-08 23:45:55 +0000
committerBryan Garza <1396101+bryangarza@users.noreply.github.com>2022-11-09 23:27:14 +0000
commitfa99cb82690d99c0df2018d37aedaed29e40e131 (patch)
tree9310734b5f13537a4a3ef7fdf817d808be5cbe4a /src/test
parent3db41d13f08db377c9bc516d8f285f61ed668edd (diff)
downloadrust-fa99cb82690d99c0df2018d37aedaed29e40e131.tar.gz
rust-fa99cb82690d99c0df2018d37aedaed29e40e131.zip
Allow and add `track_caller` to generators
This patch allows the usage of the `track_caller` annotation on
generators, as well as sets them conditionally if the parent also has
`track_caller` set.

Also add this annotation on the `GenFuture`'s `poll()` function.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/async-await/track-caller/panic-track-caller.rs (renamed from src/test/ui/async-await/panic-track-caller.rs)4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/async-await/panic-track-caller.rs b/src/test/ui/async-await/track-caller/panic-track-caller.rs
index 76776d41c57..4e659da9ee0 100644
--- a/src/test/ui/async-await/panic-track-caller.rs
+++ b/src/test/ui/async-await/track-caller/panic-track-caller.rs
@@ -70,6 +70,6 @@ fn panicked_at(f: impl FnOnce() + panic::UnwindSafe) -> u32 {
 }
 
 fn main() {
-    assert_eq!(panicked_at(|| block_on(foo())), 39);
-    assert_eq!(panicked_at(|| block_on(foo_track_caller())), 52);
+    assert_eq!(panicked_at(|| block_on(foo())), 40);
+    assert_eq!(panicked_at(|| block_on(foo_track_caller())), 53);
 }