File tree 3 files changed +65
-0
lines changed
3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change
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.
4
+ //
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.
10
+
11
+ // error-pattern: missing type param `Z` in the substitution of `Z`
12
+
13
+ fn f < Z > ( ) -> bool {
14
+ enum E { V ( Z ) }
15
+
16
+ true
17
+ }
18
+
19
+ fn main ( ) {
20
+ let b = f :: < int > ( ) ;
21
+ assert ! ( b) ;
22
+ }
Original file line number Diff line number Diff line change
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.
4
+ //
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.
10
+
11
+ fn f < T > ( ) -> bool {
12
+ struct S ( T ) ; //~ ERROR use of undeclared type name `T`
13
+ //~^ ERROR attempt to use a type argument out of scope
14
+
15
+ true
16
+ }
17
+
18
+ fn main ( ) {
19
+ let b = f :: < int > ( ) ;
20
+ assert ! ( b) ;
21
+ }
Original file line number Diff line number Diff line change
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.
4
+ //
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.
10
+
11
+ fn f < T > ( ) -> bool {
12
+ enum E < T > { V ( T ) }
13
+
14
+ struct S < T > ( T ) ;
15
+
16
+ true
17
+ }
18
+
19
+ fn main ( ) {
20
+ let b = f :: < int > ( ) ;
21
+ assert ! ( b) ;
22
+ }
You can’t perform that action at this time.
0 commit comments