aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-expr.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-01-22 13:07:05 +0000
committerGitHub <noreply@github.com>2022-01-22 13:07:05 +0000
commit2cce6b8919ce16acd37a7a203049a52925a7e295 (patch)
tree0ac934a218d9f65af25065aa4abe94976533cb4a /gcc/rust/resolve/rust-ast-resolve-expr.h
parent6c9e57efa5474cfe5d0440e1022ee3c4a8400199 (diff)
parentee794effe3b55d2aa8acc108fb36bd8d05672dfa (diff)
downloadgcc-2cce6b8919ce16acd37a7a203049a52925a7e295.zip
gcc-2cce6b8919ce16acd37a7a203049a52925a7e295.tar.gz
gcc-2cce6b8919ce16acd37a7a203049a52925a7e295.tar.bz2
Merge #873
873: Method resolution should respect deref lang-items r=philberty a=philberty Method resolution in rust must respect the autoderef cycle by calling into the deref lang items as required. This allows for method resolution behind boxing for example. See below for an example gimple dump of two levels of deref operator overloads. The commit message ee794effe3b55d2aa8acc108fb36bd8d05672dfa holds much more detail on the changes in this patch. ``` void main () { const struct bar; const struct foo; const i32 foobar; try { bar.0 = 123; foo.0 = &bar; RUSTTMP.3 = <Foo as Deref>::deref<&Bar> (&foo); RUSTTMP.5 = <&T as Deref>::deref<Bar> (RUSTTMP.3); foobar = Bar::foobar (*RUSTTMP.5); } finally { bar = {CLOBBER}; foo = {CLOBBER}; } } ``` Fixes #884 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.h')
0 files changed, 0 insertions, 0 deletions