Validate the location of crate in paths

This commit is contained in:
John Renner 2020-04-27 10:02:47 -07:00
parent 7a9ba1657d
commit 0af727da91
5 changed files with 121 additions and 1 deletions

View file

@ -1249,6 +1249,7 @@ pub struct PathSegment {
}
impl PathSegment {
pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }