aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-11-25 15:28:54 +0000
committerGitHub <noreply@github.com>2021-11-25 15:28:54 +0000
commit98fb902fb3029da33c5a8d2fd4bd7d7bcb7271ee (patch)
tree7f218adb953e271d4e9053a28d91554600df66d9 /gcc/rust/backend/rust-compile-expr.cc
parent295f0ae16613b44c13a15ae5ada080761b62ff54 (diff)
parenta2f59f14ceace0b8e614f972beacd45acfb284c7 (diff)
downloadgcc-98fb902fb3029da33c5a8d2fd4bd7d7bcb7271ee.zip
gcc-98fb902fb3029da33c5a8d2fd4bd7d7bcb7271ee.tar.gz
gcc-98fb902fb3029da33c5a8d2fd4bd7d7bcb7271ee.tar.bz2
Merge #820
820: Bug fix mutability checks in can_eq for autoderef r=philberty a=philberty 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. Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
0 files changed, 0 insertions, 0 deletions