diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-11-26 09:19:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 09:19:08 +0000 |
commit | 0024bc2f028369b871a65ceb11b2fddfb0f9c3aa (patch) | |
tree | 8996e916a4375af6f33d1a835218a0e1fb003fd6 /gcc/rust/backend/rust-compile-resolve-path.cc | |
parent | 3b8cbff816c969aa43aca9c611b3c3f9ef5a1af5 (diff) | |
parent | c7af812802ff64a88b4d251dae83377f45c0a8a3 (diff) | |
download | gcc-0024bc2f028369b871a65ceb11b2fddfb0f9c3aa.zip gcc-0024bc2f028369b871a65ceb11b2fddfb0f9c3aa.tar.gz gcc-0024bc2f028369b871a65ceb11b2fddfb0f9c3aa.tar.bz2 |
Merge #818
818: Deref operator overloading r=philberty a=philberty
This adds initial support for dereferencing operator overloading. We need to be able
to use this as part of the autoderef cycle next.
It has two default impl's one for '&T' and '&mut T' to apply genericly.
The reason it is interesting is from the prototype the deref lang item
always returns &Self::Target in all cases regardless of mutability, the
lang item here is designed to wrap up any dereference such that when
applied it guarentees the type system you will get back an immutable
reference to something. The reason for doing this is more clear when
thinking about autoderef and method-resolution and how you apply
dereference operations to custom types and a test case is included for
that.
Fixes #809
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
0 files changed, 0 insertions, 0 deletions