diff options
| author | Oneirical <manchot@videotron.ca> | 2025-07-13 16:25:27 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2025-08-04 16:43:53 -0400 |
| commit | 7196d8cd661b875401126a81641d2effc40b3d85 (patch) | |
| tree | 4e3f314add6e442f40dc9cba83c397a942c01776 /tests/ui/trait-objects | |
| parent | 4b596bbd847672da87763b76171687d3544863c2 (diff) | |
| download | rust-7196d8cd661b875401126a81641d2effc40b3d85.tar.gz rust-7196d8cd661b875401126a81641d2effc40b3d85.zip | |
Rehome tests/ui/issues/ tests [3/?]
Diffstat (limited to 'tests/ui/trait-objects')
| -rw-r--r-- | tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs b/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs new file mode 100644 index 00000000000..c70dc74f3e5 --- /dev/null +++ b/tests/ui/trait-objects/trait-object-lifetime-conversion-47638.rs @@ -0,0 +1,11 @@ +// https://github.com/rust-lang/rust/issues/47638 +//@ run-pass +#![allow(unused_variables)] +fn id<'c, 'b>(f: &'c &'b dyn Fn(&i32)) -> &'c &'b dyn Fn(&'static i32) { + f +} + +fn main() { + let f: &dyn Fn(&i32) = &|x| {}; + id(&f); +} |
