File tree 3 files changed +8
-2
lines changed
test/run-pass/rfc-2126-extern-absolute-paths
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1321,7 +1321,7 @@ impl<'a> Parser<'a> {
1321
1321
pub fn token_is_bare_fn_keyword ( & mut self ) -> bool {
1322
1322
self . check_keyword ( keywords:: Fn ) ||
1323
1323
self . check_keyword ( keywords:: Unsafe ) ||
1324
- self . check_keyword ( keywords:: Extern )
1324
+ self . check_keyword ( keywords:: Extern ) && self . is_extern_non_path ( )
1325
1325
}
1326
1326
1327
1327
fn eat_label ( & mut self ) -> Option < Label > {
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- #[ derive( Debug ) ]
11
+ #[ derive( Debug , PartialEq ) ]
12
12
pub struct S ;
13
13
14
14
#[ derive( Debug ) ]
15
15
pub struct Z ;
16
+
17
+ pub trait Tr < ' a > { }
Original file line number Diff line number Diff line change 14
14
15
15
use extern:: xcrate:: Z ;
16
16
17
+ type A = extern :: xcrate:: S ;
18
+ type B = for <' a > extern :: xcrate:: Tr < ' a > ;
19
+
17
20
fn f ( ) {
18
21
use extern:: xcrate;
19
22
use extern:: xcrate as ycrate;
@@ -28,4 +31,5 @@ fn main() {
28
31
assert_eq ! ( format!( "{:?}" , s) , "S" ) ;
29
32
let z = Z ;
30
33
assert_eq ! ( format!( "{:?}" , z) , "Z" ) ;
34
+ assert_eq ! ( A { } , extern:: xcrate:: S { } ) ;
31
35
}
You can’t perform that action at this time.
0 commit comments