1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 EnumStructVariant { x: u8, y: u8, z: u8 }
16 pub fn get_enum_struct_variant() -> () {
17 Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
18 //~^ ERROR mismatched types
19 //~| expected type `()`
20 //~| found type `a::Enum`
21 //~| expected (), found enum `a::Enum`
29 fn test_enum_struct_variant() {
30 let enum_struct_variant = ::a::get_enum_struct_variant();
31 match enum_struct_variant {
32 a::Enum::EnumStructVariant { x, y, z } => {
33 //~^ ERROR mismatched types
34 //~| expected type `()`
35 //~| found type `a::Enum`
36 //~| expected (), found enum `a::Enum`