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
300901b70509a0af2d971aa6f6104300da24212c
rust/tests/ui/match/match-struct.rs

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

12 lines
200 B
Rust
Raw Normal View History

Update compile fail tests to use isize.
2015-01-08 21:54:35 +11:00
struct S { a: isize }
enum E { C(isize) }
Check type when struct is matched against enum-like pattern Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.
2013-02-20 01:43:15 +09:00
fn main() {
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 (S { a: 1 }) {
Fix testsuite errors
2015-01-12 01:01:44 -05:00
E::C(_) => (),
//~^ ERROR mismatched types
Modify primary span label for E0308 The previous output was unintuitive to users.
2023-01-02 18:00:33 -08:00
//~| expected `S`, found `E`
Check type when struct is matched against enum-like pattern Previously check always succeeded because struct type was derived from the matched expression, not the matched pattern.
2013-02-20 01:43:15 +09:00
_ => ()
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4803ms 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