aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-20 08:33:46 +0000
committerGitHub <noreply@github.com>2022-04-20 08:33:46 +0000
commit14dbac9a8bbc7f3cf37679e91ea56e449a64bde7 (patch)
tree37c16bbb73f388b0c9851f3a945b03c545a8ec50 /gcc/rust/parse
parentdc57f4ced0d168be911ca22db81fe9526e2d70a8 (diff)
parentc3a3e1053f41819d1f6ff8fa68bcd4aca9fc5f80 (diff)
downloadgcc-14dbac9a8bbc7f3cf37679e91ea56e449a64bde7.zip
gcc-14dbac9a8bbc7f3cf37679e91ea56e449a64bde7.tar.gz
gcc-14dbac9a8bbc7f3cf37679e91ea56e449a64bde7.tar.bz2
Merge #1138
1138: Support pattern bindings within function signitures r=philberty a=philberty This reuses our code to handle match-arms within MatchExpressions, we resolve the pattern's type's and implicitly create types for that binding. For code-generation we create a tmp var name for the name of the parameter which is the base type and for the destructuring we reuse the same match arm code to generate the implicit bindings to the parts of the structure ```c __attribute__((cdecl)) i32 test::pattern_as_arg (const struct test::Pattern RSTPRM.0) { i32 RUSTTMP.1; return RSTPRM.0.0; } ``` Fixes #995 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/parse')
0 files changed, 0 insertions, 0 deletions