File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
test/run-pass/rfc-2126-extern-absolute-paths Expand file tree Collapse file tree 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> {
13211321 pub fn token_is_bare_fn_keyword ( & mut self ) -> bool {
13221322 self . check_keyword ( keywords:: Fn ) ||
13231323 self . check_keyword ( keywords:: Unsafe ) ||
1324- self . check_keyword ( keywords:: Extern )
1324+ self . check_keyword ( keywords:: Extern ) && self . is_extern_non_path ( )
13251325 }
13261326
13271327 fn eat_label ( & mut self ) -> Option < Label > {
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- #[ derive( Debug ) ]
11+ #[ derive( Debug , PartialEq ) ]
1212pub struct S ;
1313
1414#[ derive( Debug ) ]
1515pub struct Z ;
16+
17+ pub trait Tr < ' a > { }
Original file line number Diff line number Diff line change 1414
1515use extern:: xcrate:: Z ;
1616
17+ type A = extern :: xcrate:: S ;
18+ type B = for <' a > extern :: xcrate:: Tr < ' a > ;
19+
1720fn f ( ) {
1821 use extern:: xcrate;
1922 use extern:: xcrate as ycrate;
@@ -28,4 +31,5 @@ fn main() {
2831 assert_eq ! ( format!( "{:?}" , s) , "S" ) ;
2932 let z = Z ;
3033 assert_eq ! ( format!( "{:?}" , z) , "Z" ) ;
34+ assert_eq ! ( A { } , extern:: xcrate:: S { } ) ;
3135}
You can’t perform that action at this time.
0 commit comments