move Directory -> parser::module
This commit is contained in:
parent
f1ca9969bf
commit
ddcc8ec89d
4 changed files with 24 additions and 23 deletions
|
@ -14,7 +14,7 @@ use rustc_errors::{Diagnostic, FatalError, Level, PResult};
|
|||
use rustc_session::parse::ParseSess;
|
||||
use rustc_span::{FileName, SourceFile, Span};
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::Path;
|
||||
use std::str;
|
||||
|
||||
use log::info;
|
||||
|
@ -29,22 +29,6 @@ pub mod validate_attr;
|
|||
#[macro_use]
|
||||
pub mod config;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Directory {
|
||||
pub path: PathBuf,
|
||||
pub ownership: DirectoryOwnership,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum DirectoryOwnership {
|
||||
Owned {
|
||||
// None if `mod.rs`, `Some("foo")` if we're in `foo.rs`.
|
||||
relative: Option<ast::Ident>,
|
||||
},
|
||||
UnownedViaBlock,
|
||||
UnownedViaMod,
|
||||
}
|
||||
|
||||
// A bunch of utility functions of the form `parse_<thing>_from_<source>`
|
||||
// where <thing> includes crate, expr, item, stmt, tts, and one that
|
||||
// uses a HOF to parse anything, and <source> includes file and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue