diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-07-30 17:58:26 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-07-30 17:58:26 +0200 |
| commit | ec3f3074a1d2f0c3f8a4fd245c79a774cf19a7ca (patch) | |
| tree | 8f2ceee0a6806e44f716c82e906ee596b93a6060 /src/test | |
| parent | 2643b16468fda787470340890212591d8bc832b7 (diff) | |
| download | rust-ec3f3074a1d2f0c3f8a4fd245c79a774cf19a7ca.tar.gz rust-ec3f3074a1d2f0c3f8a4fd245c79a774cf19a7ca.zip | |
Always create elided lifetimes, even if inferred.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs b/src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs new file mode 100644 index 00000000000..b9d2711fd9c --- /dev/null +++ b/src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs @@ -0,0 +1,17 @@ +// check-pass + +struct Sqlite {} + +trait HasArguments<'q> { + type Arguments; +} + +impl<'q> HasArguments<'q> for Sqlite { + type Arguments = std::marker::PhantomData<&'q ()>; +} + +fn foo() { + let _ = <Sqlite as HasArguments>::Arguments::default(); +} + +fn main() {} |
