aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-11-24 22:52:28 +0000
committerPhilip Herron <philip.herron@embecosm.com>2021-11-25 13:32:49 +0000
commita2f59f14ceace0b8e614f972beacd45acfb284c7 (patch)
treecef0f5c313734f997a2a60539c1824ee0bd26c24 /gcc/rust/backend/rust-compile-expr.cc
parent717b6da459b26ace9a3c303cfa5e485ff8935709 (diff)
downloadgcc-a2f59f14ceace0b8e614f972beacd45acfb284c7.zip
gcc-a2f59f14ceace0b8e614f972beacd45acfb284c7.tar.gz
gcc-a2f59f14ceace0b8e614f972beacd45acfb284c7.tar.bz2
Bug fix mutability checks in can_eq for autoderef
Rust is permissive about mutablity in type checking for example, if we have a function: fn foo(a:&bar) { ... } fn caller() { let a:&mut bar = ...; foo(a); } This is valid since the mutable reference to bar is valid to be turned into an immutable reference without any conversion. Like in C a non-const pointer is valid to be passed to a const pointer inferface.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
0 files changed, 0 insertions, 0 deletions