Refactor parsing of trait object types · rust-lang/rust@b5e8897 (original) (raw)
`@@ -17,7 +17,7 @@ pub use self::PathParameters::*;
`
17
17
`pub use symbol::Symbol as Name;
`
18
18
`pub use util::ThinVec;
`
19
19
``
20
``
`-
use syntax_pos::{mk_sp, Span, DUMMY_SP, ExpnId};
`
``
20
`+
use syntax_pos::{mk_sp, BytePos, Span, DUMMY_SP, ExpnId};
`
21
21
`use codemap::{respan, Spanned};
`
22
22
`use abi::Abi;
`
23
23
`use ext:🪥:SyntaxContext;
`
`@@ -1716,6 +1716,16 @@ pub struct PolyTraitRef {
`
1716
1716
`pub span: Span,
`
1717
1717
`}
`
1718
1718
``
``
1719
`+
impl PolyTraitRef {
`
``
1720
`+
pub fn new(lifetimes: Vec, path: Path, lo: BytePos, hi: BytePos) -> Self {
`
``
1721
`+
PolyTraitRef {
`
``
1722
`+
bound_lifetimes: lifetimes,
`
``
1723
`+
trait_ref: TraitRef { path: path, ref_id: DUMMY_NODE_ID },
`
``
1724
`+
span: mk_sp(lo, hi),
`
``
1725
`+
}
`
``
1726
`+
}
`
``
1727
`+
}
`
``
1728
+
1719
1729
`#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
`
1720
1730
`pub enum Visibility {
`
1721
1731
`Public,
`