Rename resolve_relative_path -> resolve_path

For things like `concant!(env!("OUT_DIR"))`, we need to support abs paths
This commit is contained in:
Aleksey Kladov 2020-06-05 14:55:23 +02:00
parent f98d057218
commit e63c00f100
7 changed files with 12 additions and 33 deletions

View file

@ -297,7 +297,7 @@ fn relative_file(db: &dyn AstDatabase, call_id: MacroCallId, path: &str) -> Opti
let call_site = call_id.as_file().original_file(db);
// Handle trivial case
if let Some(res) = db.resolve_relative_path(call_site, &RelativePath::new(&path)) {
if let Some(res) = db.resolve_path(call_site, &RelativePath::new(&path)) {
// Prevent include itself
return if res == call_site { None } else { Some(res) };
}