Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
7c811203cd3e3f0bcdaedb6b51a81be2765bc635
rust/tests/ui/parser/bind-struct-early-modifiers.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
151 B
Rust
Raw Normal View History

Allow ref and mut modifiers for short form field patterns Previously, if you wanted to bind a field mutably or by ref, you had to do something like Foo { x: ref mut x }. You can now just do Foo { ref mut x }. Closes #6137
2013-12-06 00:15:02 -08:00
fn main() {
Update compile fail tests to use isize.
2015-01-08 21:54:35 +11:00
struct Foo { x: isize }
libsyntax: Disallow struct literals after `if`, `while`, `match`, and `for...in`. Closes #14803. If you used a structure literal after one of these keywords, surround it in parentheses. [breaking-change]
2014-06-13 19:09:12 -07:00
match (Foo { x: 10 }) {
Account for comma in suggestion
2018-05-30 11:04:39 -07:00
Foo { ref x: ref x } => {}, //~ ERROR expected `,`
Allow ref and mut modifiers for short form field patterns Previously, if you wanted to bind a field mutably or by ref, you had to do something like Foo { x: ref mut x }. You can now just do Foo { ref mut x }. Closes #6137
2013-12-06 00:15:02 -08:00
_ => {}
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3885ms 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