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
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/issues/issue-63983.rs

16 lines
365 B
Rust
Raw Normal View History

unify errors for tuple/struct variants fix #63983
2019-09-21 23:36:12 +08:00
enum MyEnum {
Tuple(i32),
Struct{ s: i32 },
}
fn foo(en: MyEnum) {
match en {
MyEnum::Tuple => "",
Point at local similarly named element and tweak references to variants Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-14 17:20:50 -07:00
//~^ ERROR expected unit struct, unit variant or constant, found tuple variant `MyEnum::Tuple`
unify errors for tuple/struct variants fix #63983
2019-09-21 23:36:12 +08:00
MyEnum::Struct => "",
Point at local similarly named element and tweak references to variants Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
2019-10-14 17:20:50 -07:00
//~^ ERROR expected unit struct, unit variant or constant, found struct variant `MyEnum::Struct`
unify errors for tuple/struct variants fix #63983
2019-09-21 23:36:12 +08:00
};
}
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 4931ms Template: 4ms
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