about summary refs log tree commit diff
path: root/src/librustc_parse/parser
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-12-31 20:15:40 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-01-01 09:15:18 +0300
commit70f1d57048d2c73c8c018d0d65ceb0e2ca5d9dae (patch)
treeed077cbfc27cfa99565965681f03138285b1cb00 /src/librustc_parse/parser
parent38aa6bdfd705ea0604d7d5dd9fabc5e8f853a4fc (diff)
downloadrust-70f1d57048d2c73c8c018d0d65ceb0e2ca5d9dae.tar.gz
rust-70f1d57048d2c73c8c018d0d65ceb0e2ca5d9dae.zip
Rename `syntax_pos` to `rustc_span` in source code
Diffstat (limited to 'src/librustc_parse/parser')
-rw-r--r--src/librustc_parse/parser/attr.rs2
-rw-r--r--src/librustc_parse/parser/diagnostics.rs4
-rw-r--r--src/librustc_parse/parser/expr.rs4
-rw-r--r--src/librustc_parse/parser/generics.rs2
-rw-r--r--src/librustc_parse/parser/item.rs6
-rw-r--r--src/librustc_parse/parser/mod.rs6
-rw-r--r--src/librustc_parse/parser/module.rs4
-rw-r--r--src/librustc_parse/parser/pat.rs4
-rw-r--r--src/librustc_parse/parser/path.rs4
-rw-r--r--src/librustc_parse/parser/stmt.rs4
-rw-r--r--src/librustc_parse/parser/ty.rs4
11 files changed, 22 insertions, 22 deletions
diff --git a/src/librustc_parse/parser/attr.rs b/src/librustc_parse/parser/attr.rs
index 26df4f1c090..81f31b2eda1 100644
--- a/src/librustc_parse/parser/attr.rs
+++ b/src/librustc_parse/parser/attr.rs
@@ -1,11 +1,11 @@
 use super::{Parser, PathStyle, TokenType};
 use rustc_errors::PResult;
+use rustc_span::{Span, Symbol};
 use syntax::ast;
 use syntax::attr;
 use syntax::print::pprust;
 use syntax::token::{self, Nonterminal};
 use syntax::util::comments;
-use syntax_pos::{Span, Symbol};
 
 use log::debug;
 
diff --git a/src/librustc_parse/parser/diagnostics.rs b/src/librustc_parse/parser/diagnostics.rs
index 05754357bc8..bf03f731c9f 100644
--- a/src/librustc_parse/parser/diagnostics.rs
+++ b/src/librustc_parse/parser/diagnostics.rs
@@ -3,6 +3,8 @@ use super::{BlockMode, Parser, PathStyle, SemiColonMode, SeqSep, TokenExpectType
 use rustc_data_structures::fx::FxHashSet;
 use rustc_error_codes::*;
 use rustc_errors::{self, pluralize, Applicability, DiagnosticBuilder, Handler, PResult};
+use rustc_span::symbol::kw;
+use rustc_span::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
 use syntax::ast::{
     self, BinOpKind, BindingMode, BlockCheckMode, Expr, ExprKind, Ident, Item, Param,
 };
@@ -12,8 +14,6 @@ use syntax::ptr::P;
 use syntax::struct_span_err;
 use syntax::token::{self, token_can_begin_expr, TokenKind};
 use syntax::util::parser::AssocOp;
-use syntax_pos::symbol::kw;
-use syntax_pos::{MultiSpan, Span, SpanSnippetError, DUMMY_SP};
 
 use log::{debug, trace};
 use std::mem;
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs
index ab7c156e370..90f15375aec 100644
--- a/src/librustc_parse/parser/expr.rs
+++ b/src/librustc_parse/parser/expr.rs
@@ -5,6 +5,8 @@ use super::{SemiColonMode, SeqSep, TokenExpectType};
 use crate::maybe_recover_from_interpolated_ty_qpath;
 
 use rustc_errors::{Applicability, PResult};
+use rustc_span::source_map::{self, Span};
+use rustc_span::symbol::{kw, sym, Symbol};
 use std::mem;
 use syntax::ast::{self, AttrStyle, AttrVec, CaptureBy, Field, Ident, Lit, DUMMY_NODE_ID};
 use syntax::ast::{
@@ -17,8 +19,6 @@ use syntax::token::{self, Token, TokenKind};
 use syntax::util::classify;
 use syntax::util::literal::LitError;
 use syntax::util::parser::{prec_let_scrutinee_needs_par, AssocOp, Fixity};
-use syntax_pos::source_map::{self, Span};
-use syntax_pos::symbol::{kw, sym, Symbol};
 
 /// Possibly accepts an `token::Interpolated` expression (a pre-parsed expression
 /// dropped into the token stream, which happens while parsing the result of
diff --git a/src/librustc_parse/parser/generics.rs b/src/librustc_parse/parser/generics.rs
index 113a613b913..c0cc9deafb8 100644
--- a/src/librustc_parse/parser/generics.rs
+++ b/src/librustc_parse/parser/generics.rs
@@ -1,10 +1,10 @@
 use super::Parser;
 
 use rustc_errors::PResult;
+use rustc_span::symbol::{kw, sym};
 use syntax::ast::{self, Attribute, GenericBounds, GenericParam, GenericParamKind, WhereClause};
 use syntax::source_map::DUMMY_SP;
 use syntax::token;
-use syntax_pos::symbol::{kw, sym};
 
 impl<'a> Parser<'a> {
     /// Parses bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`.
diff --git a/src/librustc_parse/parser/item.rs b/src/librustc_parse/parser/item.rs
index e5a7361b12a..a05bc48981e 100644
--- a/src/librustc_parse/parser/item.rs
+++ b/src/librustc_parse/parser/item.rs
@@ -5,6 +5,9 @@ use crate::maybe_whole;
 
 use rustc_error_codes::*;
 use rustc_errors::{Applicability, DiagnosticBuilder, PResult, StashKey};
+use rustc_span::source_map::{self, respan, Span};
+use rustc_span::symbol::{kw, sym, Symbol};
+use rustc_span::BytePos;
 use syntax::ast::{self, AttrKind, AttrStyle, AttrVec, Attribute, Ident, DUMMY_NODE_ID};
 use syntax::ast::{AssocItem, AssocItemKind, Item, ItemKind, UseTree, UseTreeKind};
 use syntax::ast::{BindingMode, Block, FnDecl, FnSig, Mac, MacArgs, MacDelimiter, Param, SelfKind};
@@ -16,9 +19,6 @@ use syntax::ptr::P;
 use syntax::struct_span_err;
 use syntax::token;
 use syntax::tokenstream::{DelimSpan, TokenStream, TokenTree};
-use syntax_pos::source_map::{self, respan, Span};
-use syntax_pos::symbol::{kw, sym, Symbol};
-use syntax_pos::BytePos;
 
 use log::debug;
 use std::mem;
diff --git a/src/librustc_parse/parser/mod.rs b/src/librustc_parse/parser/mod.rs
index ec6468f4f0a..6dcffcf0bd7 100644
--- a/src/librustc_parse/parser/mod.rs
+++ b/src/librustc_parse/parser/mod.rs
@@ -16,6 +16,9 @@ use crate::{Directory, DirectoryOwnership};
 
 use log::debug;
 use rustc_errors::{Applicability, DiagnosticBuilder, FatalError, PResult};
+use rustc_span::source_map::respan;
+use rustc_span::symbol::{kw, sym, Symbol};
+use rustc_span::{BytePos, FileName, Span, DUMMY_SP};
 use syntax::ast::{self, AttrStyle, AttrVec, CrateSugar, Extern, Ident, Unsafety, DUMMY_NODE_ID};
 use syntax::ast::{IsAsync, MacArgs, MacDelimiter, Mutability, StrLit, Visibility, VisibilityKind};
 use syntax::print::pprust;
@@ -25,9 +28,6 @@ use syntax::struct_span_err;
 use syntax::token::{self, DelimToken, Token, TokenKind};
 use syntax::tokenstream::{self, DelimSpan, TokenStream, TokenTree, TreeAndJoint};
 use syntax::util::comments::{doc_comment_style, strip_doc_comment_decoration};
-use syntax_pos::source_map::respan;
-use syntax_pos::symbol::{kw, sym, Symbol};
-use syntax_pos::{BytePos, FileName, Span, DUMMY_SP};
 
 use std::borrow::Cow;
 use std::path::PathBuf;
diff --git a/src/librustc_parse/parser/module.rs b/src/librustc_parse/parser/module.rs
index 84ffa6f7fcd..3254ab5b463 100644
--- a/src/librustc_parse/parser/module.rs
+++ b/src/librustc_parse/parser/module.rs
@@ -5,11 +5,11 @@ use super::Parser;
 use crate::{new_sub_parser_from_file, DirectoryOwnership};
 
 use rustc_errors::PResult;
+use rustc_span::source_map::{FileName, SourceMap, Span, DUMMY_SP};
+use rustc_span::symbol::sym;
 use syntax::ast::{self, Attribute, Crate, Ident, ItemKind, Mod};
 use syntax::attr;
 use syntax::token::{self, TokenKind};
-use syntax_pos::source_map::{FileName, SourceMap, Span, DUMMY_SP};
-use syntax_pos::symbol::sym;
 
 use std::path::{self, Path, PathBuf};
 
diff --git a/src/librustc_parse/parser/pat.rs b/src/librustc_parse/parser/pat.rs
index e608b86c76a..bf7f5735f13 100644
--- a/src/librustc_parse/parser/pat.rs
+++ b/src/librustc_parse/parser/pat.rs
@@ -1,14 +1,14 @@
 use super::{Parser, PathStyle};
 use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole};
 use rustc_errors::{Applicability, DiagnosticBuilder, PResult};
+use rustc_span::source_map::{respan, Span, Spanned};
+use rustc_span::symbol::{kw, sym};
 use syntax::ast::{self, AttrVec, Attribute, FieldPat, Mac, Pat, PatKind, RangeEnd, RangeSyntax};
 use syntax::ast::{BindingMode, Expr, ExprKind, Ident, Mutability, Path, QSelf};
 use syntax::mut_visit::{noop_visit_mac, noop_visit_pat, MutVisitor};
 use syntax::print::pprust;
 use syntax::ptr::P;
 use syntax::token;
-use syntax_pos::source_map::{respan, Span, Spanned};
-use syntax_pos::symbol::{kw, sym};
 
 type Expected = Option<&'static str>;
 
diff --git a/src/librustc_parse/parser/path.rs b/src/librustc_parse/parser/path.rs
index 325ad56cd2a..0358458c099 100644
--- a/src/librustc_parse/parser/path.rs
+++ b/src/librustc_parse/parser/path.rs
@@ -1,13 +1,13 @@
 use super::{Parser, TokenType};
 use crate::maybe_whole;
 use rustc_errors::{pluralize, Applicability, PResult};
+use rustc_span::source_map::{BytePos, Span};
+use rustc_span::symbol::{kw, sym};
 use syntax::ast::{self, AngleBracketedArgs, Ident, ParenthesizedArgs, Path, PathSegment, QSelf};
 use syntax::ast::{
     AnonConst, AssocTyConstraint, AssocTyConstraintKind, BlockCheckMode, GenericArg,
 };
 use syntax::token::{self, Token};
-use syntax_pos::source_map::{BytePos, Span};
-use syntax_pos::symbol::{kw, sym};
 
 use log::debug;
 use std::mem;
diff --git a/src/librustc_parse/parser/stmt.rs b/src/librustc_parse/parser/stmt.rs
index bf092ed14e3..a94d8228bbe 100644
--- a/src/librustc_parse/parser/stmt.rs
+++ b/src/librustc_parse/parser/stmt.rs
@@ -7,14 +7,14 @@ use crate::maybe_whole;
 use crate::DirectoryOwnership;
 
 use rustc_errors::{Applicability, PResult};
+use rustc_span::source_map::{respan, Span};
+use rustc_span::symbol::{kw, sym, Symbol};
 use syntax::ast;
 use syntax::ast::{AttrStyle, AttrVec, Attribute, Mac, MacStmtStyle, VisibilityKind};
 use syntax::ast::{Block, BlockCheckMode, Expr, ExprKind, Local, Stmt, StmtKind, DUMMY_NODE_ID};
 use syntax::ptr::P;
 use syntax::token;
 use syntax::util::classify;
-use syntax_pos::source_map::{respan, Span};
-use syntax_pos::symbol::{kw, sym, Symbol};
 
 use std::mem;
 
diff --git a/src/librustc_parse/parser/ty.rs b/src/librustc_parse/parser/ty.rs
index 4f7bcf01e1b..4122aa17f83 100644
--- a/src/librustc_parse/parser/ty.rs
+++ b/src/librustc_parse/parser/ty.rs
@@ -5,6 +5,8 @@ use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole};
 
 use rustc_error_codes::*;
 use rustc_errors::{pluralize, Applicability, PResult};
+use rustc_span::source_map::Span;
+use rustc_span::symbol::kw;
 use syntax::ast::{
     self, BareFnTy, FunctionRetTy, GenericParam, Ident, Lifetime, MutTy, Ty, TyKind,
 };
@@ -15,8 +17,6 @@ use syntax::ast::{Mac, Mutability};
 use syntax::ptr::P;
 use syntax::struct_span_err;
 use syntax::token::{self, Token};
-use syntax_pos::source_map::Span;
-use syntax_pos::symbol::kw;
 
 /// Returns `true` if `IDENT t` can start a type -- `IDENT::a::b`, `IDENT<u8, u8>`,
 /// `IDENT<<u8 as Trait>::AssocTy>`.