Rename Span::default -> Span::def_site.
This commit is contained in:
parent
8a98531973
commit
74cc1fdb52
3 changed files with 8 additions and 7 deletions
|
|
@ -18,7 +18,7 @@ use proc_macro::{TokenStream, TokenNode, Span, Diagnostic};
|
|||
|
||||
fn parse(input: TokenStream) -> Result<(), Diagnostic> {
|
||||
let mut count = 0;
|
||||
let mut last_span = Span::default();
|
||||
let mut last_span = Span::def_site();
|
||||
for tree in input {
|
||||
let span = tree.span;
|
||||
if count >= 3 {
|
||||
|
|
@ -37,7 +37,7 @@ fn parse(input: TokenStream) -> Result<(), Diagnostic> {
|
|||
}
|
||||
|
||||
if count < 3 {
|
||||
return Err(Span::default()
|
||||
return Err(Span::def_site()
|
||||
.error(format!("found {} equal signs, need exactly 3", count))
|
||||
.help("input must be: `===`"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue