Remove deprecated Path::from_ast

Long term, we probably should make hir::Path private to hir.
This commit is contained in:
Aleksey Kladov 2020-08-15 18:22:16 +02:00
parent f0ad68b962
commit 2052d33b9b
2 changed files with 13 additions and 25 deletions

View file

@ -153,12 +153,6 @@ pub enum GenericArg {
}
impl Path {
/// Converts an `ast::Path` to `Path`. Works with use trees.
#[deprecated = "Doesn't handle hygiene, don't add new calls, remove old ones"]
pub fn from_ast(path: ast::Path) -> Option<Path> {
lower::lower_path(path, &Hygiene::new_unhygienic())
}
/// Converts an `ast::Path` to `Path`. Works with use trees.
/// It correctly handles `$crate` based path from macro call.
pub fn from_src(path: ast::Path, hygiene: &Hygiene) -> Option<Path> {