diff options
| author | bors <bors@rust-lang.org> | 2022-04-29 22:27:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-29 22:27:10 +0000 |
| commit | 05c07386b45fbc540ec8cdc1bc41ae9c062b453b (patch) | |
| tree | 9026685f1048d847cd7af1f5b97cea3e33d3f5c1 /src/test/ui/lifetimes | |
| parent | a707f401074bc769bab4efb2bfdde7f6c5a4068d (diff) | |
| parent | 548fca6927a644b4cde66893f5db6f4aff3f8f33 (diff) | |
| download | rust-05c07386b45fbc540ec8cdc1bc41ae9c062b453b.tar.gz rust-05c07386b45fbc540ec8cdc1bc41ae9c062b453b.zip | |
Auto merge of #96566 - Dylan-DPC:rollup-fo7rd98, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #96390 (Switch JS code to ES6 - part 2) - #96527 (RustWrapper: explicitly don't handle DXILPointerTyID) - #96536 (rustdoc: fix missing method list for primitive deref target) - #96559 (Use the correct lifetime binder for elided lifetimes in path.) - #96560 (Remove unnecessary environment variable in cf-protection documentation) - #96562 (Fix duplicate directory separator in --remap-path-prefix.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/ui/lifetimes')
| -rw-r--r-- | src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs b/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs new file mode 100644 index 00000000000..9c9965d8fb8 --- /dev/null +++ b/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs @@ -0,0 +1,19 @@ +// check-pass + +struct Foo<'a>(&'a ()); + +fn with_fn() -> fn(Foo) { + |_| () +} + +fn with_impl_fn() -> impl Fn(Foo) { + |_| () +} + +fn with_where_fn<T>() +where + T: Fn(Foo), +{ +} + +fn main() {} |
