diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-03-19 21:32:34 +0400 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-03-22 13:55:55 +0400 |
| commit | 809dd77b8001f69bd5202f73d016f9ac8426b69e (patch) | |
| tree | ee125de5753b610bbd5dd5f1318ecc043031d920 /src/parse | |
| parent | 4e658cc01ef5190445016ea951e21a2d0ae02a33 (diff) | |
rustc: Remove unused `Session` argument from some attribute functions
Diffstat (limited to 'src/parse')
| -rw-r--r-- | src/parse/parser.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 7ab042506bd..6bc53159b38 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -2,13 +2,12 @@ use std::panic::{catch_unwind, AssertUnwindSafe}; use std::path::{Path, PathBuf}; use rustc_ast::token::TokenKind; -use rustc_ast::{ast, ptr}; +use rustc_ast::{ast, attr, ptr}; use rustc_errors::Diagnostic; use rustc_parse::{new_parser_from_file, parser::Parser as RawParser}; use rustc_span::{sym, Span}; use thin_vec::ThinVec; -use crate::attr::first_attr_value_str_by_name; use crate::parse::session::ParseSess; use crate::Input; @@ -93,7 +92,7 @@ pub(crate) enum ParserError { impl<'a> Parser<'a> { pub(crate) fn submod_path_from_attr(attrs: &[ast::Attribute], path: &Path) -> Option<PathBuf> { - let path_sym = first_attr_value_str_by_name(attrs, sym::path)?; + let path_sym = attr::first_attr_value_str_by_name(attrs, sym::path)?; let path_str = path_sym.as_str(); // On windows, the base path might have the form |
