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
bae2b51c5f45856eb9c214e5454d2edc48b38c24
rust/tests/ui/pattern/move-ref-patterns/issue-53840.rs

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

21 lines
328 B
Rust
Raw Normal View History

move_ref_patterns: introduce tests bindings_after_at: harden tests
2020-01-19 02:47:01 +01:00
//@ check-pass
Consolidate pattern check errors we are consolidating `cannot bind by-move and by-ref in the same pattern` message present on the different lines into single diagnostic message. To do this, we are first gathering those spans into the vector after that we are throwing them with the help of MultiSpan in a separate block. Addresses: #53840
2018-10-02 05:51:02 +00:00
enum E {
Foo(String, String, String),
}
struct Bar {
a: String,
b: String,
}
fn main() {
let bar = Bar { a: "1".to_string(), b: "2".to_string() };
match E::Foo("".into(), "".into(), "".into()) {
E::Foo(a, b, ref c) => {}
}
match bar {
move_ref_patterns: introduce tests bindings_after_at: harden tests
2020-01-19 02:47:01 +01:00
Bar { a, ref b } => {}
Consolidate pattern check errors we are consolidating `cannot bind by-move and by-ref in the same pattern` message present on the different lines into single diagnostic message. To do this, we are first gathering those spans into the vector after that we are throwing them with the help of MultiSpan in a separate block. Addresses: #53840
2018-10-02 05:51:02 +00:00
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2106ms 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