File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
gcc/testsuite/rust/compile Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ pub enum TypeCtor {
2+ Slice ,
3+ Array ,
4+ }
5+ pub struct B < T > ( T ) ;
6+
7+ macro_rules! ty_app {
8+ ( $_a: pat) => {
9+ ApplicationTy ( $ctor) // { dg-error "unexpected token '$' in typle struct items" "4140" { target *-*-* } . }
10+ // { dg-error "failed to parse typle struct items" "4140" { target *-*-*} .-1 }
11+ } ;
12+ }
13+
14+ pub fn foo ( ty : ApplicationTy ) { // { dg-error "could not resolve type path 'ApplicationTy'" "4140" { target *-*-* } .-1 }
15+ match ty {
16+ ty_app ! ( bean:: Array ) => { }
17+ }
18+ }
Original file line number Diff line number Diff line change 1+ macro_rules! ty_app {
2+ ( $_a: pat) => {
3+ ( $ctor) // { dg-error "unrecognised token '$' in grouped or tuple pattern after first pattern" "4140" { target *-*-* } . }
4+ } ;
5+ }
6+
7+ pub fn foo ( ) {
8+ match ty { // { dg-error "Cannot find path 'ty' in this scope" "4140" { target *-*-* } .-1 }
9+ ty_app ! ( bean:: Array ) => { }
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments