Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/pretty/struct-pattern.rs

6 lines
155 B
Rust
Raw Permalink Normal View History

[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives
2024-02-22 12:10:29 +00:00
//@ pp-exact
//@ pretty-compare-only
Preserve struct field pattern shorthand in the prettyprinter. Use the `is_shorthand` field introduced by #17813 (ead6c4b) to make the prettyprinter output the shorthand form. Fixes a few places that set `is_shorthand: true` when the pattern is not a PatIdent with the same name as the field.
2014-10-27 00:11:26 -07:00
// Testing that shorthand struct patterns are preserved
fn main() { let Foo { a, ref b, mut c, x: y, z: z } = foo; }
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1188ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API