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
58e901b6fd1163172149fd422565523b17eed5f0
rust/tests/ui/rfc-2005-default-binding-mode/for.rs

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

10 lines
215 B
Rust
Raw Normal View History

implement pattern-binding-modes RFC See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
2017-10-06 16:30:23 -04:00
struct Foo {}
pub fn main() {
move_ref_patterns: introduce tests bindings_after_at: harden tests
2020-01-19 02:47:01 +01:00
let mut tups = vec![(Foo {}, Foo {})];
implement pattern-binding-modes RFC See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
2017-10-06 16:30:23 -04:00
// The below desugars to &(ref n, mut m).
for (n, mut m) in &tups {
move_ref_patterns: introduce tests bindings_after_at: harden tests
2020-01-19 02:47:01 +01:00
//~^ ERROR cannot move out of a shared reference
implement pattern-binding-modes RFC See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md
2017-10-06 16:30:23 -04:00
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2564ms Template: 3ms
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