Split AllocatorKind::fn_name in global_fn_name and default_fn_name
This commit is contained in:
parent
4ce20663f7
commit
6ba7c5db07
6 changed files with 17 additions and 18 deletions
|
@ -4,7 +4,7 @@ use crate::errors;
|
|||
use crate::locator::{CrateError, CrateLocator, CratePaths};
|
||||
use crate::rmeta::{CrateDep, CrateMetadata, CrateNumMap, CrateRoot, MetadataBlob};
|
||||
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
use rustc_ast::expand::allocator::{alloc_error_handler_name, global_fn_name, AllocatorKind};
|
||||
use rustc_ast::{self as ast, *};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::svh::Svh;
|
||||
|
@ -1044,7 +1044,7 @@ fn global_allocator_spans(krate: &ast::Crate) -> Vec<Span> {
|
|||
}
|
||||
}
|
||||
|
||||
let name = Symbol::intern(&AllocatorKind::Global.fn_name(sym::alloc));
|
||||
let name = Symbol::intern(&global_fn_name(sym::alloc));
|
||||
let mut f = Finder { name, spans: Vec::new() };
|
||||
visit::walk_crate(&mut f, krate);
|
||||
f.spans
|
||||
|
@ -1066,7 +1066,7 @@ fn alloc_error_handler_spans(krate: &ast::Crate) -> Vec<Span> {
|
|||
}
|
||||
}
|
||||
|
||||
let name = Symbol::intern(&AllocatorKind::Global.fn_name(sym::oom));
|
||||
let name = Symbol::intern(alloc_error_handler_name(AllocatorKind::Global));
|
||||
let mut f = Finder { name, spans: Vec::new() };
|
||||
visit::walk_crate(&mut f, krate);
|
||||
f.spans
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue