diff options
author | Philip Herron <herron.philip@googlemail.com> | 2024-11-01 14:07:54 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-21 12:32:55 +0100 |
commit | 9725d15a88376b69e61bb5a3a5385145e1a5b5f7 (patch) | |
tree | 051404291674a2bdcd4d47f48e3d5436380e0175 /gcc/rust/backend/rust-compile-proc-macro.cc | |
parent | bf8781394505f141c9b08aceafca6d7ab48c2a21 (diff) | |
download | gcc-9725d15a88376b69e61bb5a3a5385145e1a5b5f7.zip gcc-9725d15a88376b69e61bb5a3a5385145e1a5b5f7.tar.gz gcc-9725d15a88376b69e61bb5a3a5385145e1a5b5f7.tar.bz2 |
gccrs: add test case to show method resolution is working
The issue here was that the impl block for Cell<T> defines that T must have
the bound of Copy implemented. But simultaneously if you do an deref
you get direct access to the unsafe cell which also defines a get method
so these are two valid ways of accessing the method in question but
when Copy is implementet the simplest case is prefered so it does resolve
to Cell<T>::get.
Fixes #3033
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: nr can't handle this
* rust/compile/issue-3033.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-proc-macro.cc')
0 files changed, 0 insertions, 0 deletions