proc_macro: remove Context trait, and put span methods directly on Server
This commit is contained in:
parent
55f052d9c9
commit
2456ff8928
2 changed files with 13 additions and 17 deletions
|
@ -372,7 +372,7 @@ impl<'a, 'b> Rustc<'a, 'b> {
|
|||
fn lit(&mut self, kind: token::LitKind, symbol: Symbol, suffix: Option<Symbol>) -> Literal {
|
||||
Literal {
|
||||
lit: token::Lit::new(kind, symbol, suffix),
|
||||
span: server::Context::call_site(self),
|
||||
span: server::Server::call_site(self),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ impl server::Group for Rustc<'_, '_> {
|
|||
Group {
|
||||
delimiter,
|
||||
stream: stream.unwrap_or_default(),
|
||||
span: DelimSpan::from_single(server::Context::call_site(self)),
|
||||
span: DelimSpan::from_single(server::Server::call_site(self)),
|
||||
flatten: false,
|
||||
}
|
||||
}
|
||||
|
@ -582,7 +582,7 @@ impl server::Group for Rustc<'_, '_> {
|
|||
|
||||
impl server::Punct for Rustc<'_, '_> {
|
||||
fn new(&mut self, ch: char, spacing: Spacing) -> Self::Punct {
|
||||
Punct::new(ch, spacing == Spacing::Joint, server::Context::call_site(self))
|
||||
Punct::new(ch, spacing == Spacing::Joint, server::Server::call_site(self))
|
||||
}
|
||||
|
||||
fn as_char(&mut self, punct: Self::Punct) -> char {
|
||||
|
@ -918,7 +918,7 @@ impl server::Span for Rustc<'_, '_> {
|
|||
}
|
||||
}
|
||||
|
||||
impl server::Context for Rustc<'_, '_> {
|
||||
impl server::Server for Rustc<'_, '_> {
|
||||
fn def_site(&mut self) -> Self::Span {
|
||||
self.def_site
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue