Remove proc_macro::SourceFile::is_real().
This commit is contained in:
parent
81d8c747fb
commit
6788ce76c9
5 changed files with 3 additions and 37 deletions
|
@ -10,21 +10,11 @@ pub fn reemit(input: TokenStream) -> TokenStream {
|
|||
input.to_string().parse().unwrap()
|
||||
}
|
||||
|
||||
#[proc_macro]
|
||||
pub fn assert_fake_source_file(input: TokenStream) -> TokenStream {
|
||||
for tk in input {
|
||||
let source_file = tk.span().source_file();
|
||||
assert!(!source_file.is_real(), "Source file is real: {:?}", source_file);
|
||||
}
|
||||
|
||||
"".parse().unwrap()
|
||||
}
|
||||
|
||||
#[proc_macro]
|
||||
pub fn assert_source_file(input: TokenStream) -> TokenStream {
|
||||
for tk in input {
|
||||
let source_file = tk.span().source_file();
|
||||
assert!(source_file.is_real(), "Source file is not real: {:?}", source_file);
|
||||
assert!(!source_file.as_os_str().is_empty(), "No source file for span: {:?}", tk.span());
|
||||
}
|
||||
|
||||
"".parse().unwrap()
|
||||
|
|
|
@ -8,8 +8,6 @@ extern crate span_test_macros;
|
|||
|
||||
extern crate span_api_tests;
|
||||
|
||||
// FIXME(69775): Investigate `assert_fake_source_file`.
|
||||
|
||||
use span_api_tests::{reemit, assert_source_file, macro_stringify};
|
||||
|
||||
macro_rules! say_hello {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue