This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Support bare-identifier field initializers in Rust
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 19 Mar 2018 13:31:32 -0400
- Subject: [binutils-gdb] Support bare-identifier field initializers in Rust
*** TEST RESULTS FOR COMMIT 926300415b642367cdc2febac6619f8cb8a80b46 ***
Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 926300415b642367cdc2febac6619f8cb8a80b46
Support bare-identifier field initializers in Rust
In Rust one can initialize a struct member from an identically-named
local variable by simply mentioning the member name in the
initializer, like:
let x = 0;
let y = Struct { x };
This initializes "Struct::x" from "x".
This patch adds this form of initializer to the Rust expression parser
and adds a test.
Tested on x86-64 Fedora 26 using rustc 1.23.
2018-03-19 Tom Tromey <tom@tromey.com>
* rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
"IDENT" production.
2018-03-19 Tom Tromey <tom@tromey.com>
* gdb.rust/simple.rs (main): Add local variables field1, field2,
y0.
* gdb.rust/simple.exp: Test bare identifier form of struct
initializer.
- Follow-Ups:
- Failures on RHEL-s390x-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE ***
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Ubuntu-AArch32-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master