Fix parsing of extern paths in types and poly-traits

This commit is contained in:
Vadim Petrochenkov 2018-02-23 00:54:30 +03:00
parent b1f8e6fb06
commit 98eb4ddbce
3 changed files with 8 additions and 2 deletions

View file

@ -8,8 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub struct S;
#[derive(Debug)]
pub struct Z;
pub trait Tr<'a> {}

View file

@ -14,6 +14,9 @@
use extern::xcrate::Z;
type A = extern::xcrate::S;
type B = for<'a> extern::xcrate::Tr<'a>;
fn f() {
use extern::xcrate;
use extern::xcrate as ycrate;
@ -28,4 +31,5 @@ fn main() {
assert_eq!(format!("{:?}", s), "S");
let z = Z;
assert_eq!(format!("{:?}", z), "Z");
assert_eq!(A {}, extern::xcrate::S {});
}