Use $crate in loc macro instead of outside imports

This commit is contained in:
Richard Feldman 2019-11-20 05:50:32 -05:00
parent cc74c37045
commit 76b815ab77
4 changed files with 4 additions and 3 deletions

View file

@ -1348,6 +1348,8 @@ where
macro_rules! loc {
($parser:expr) => {
move |arena, state: State<'a>| {
use $crate::region::{Located, Region};
let start_col = state.column;
let start_line = state.line;

View file

@ -5,7 +5,7 @@ use parse::blankspace::{space0, space0_before};
use parse::collection::collection;
use parse::ident::unqualified_ident;
use parse::parser::{and, char, map_with_arena, optional, skip_first, Parser, State};
use region::{Located, Region};
use region::Located;
/// Parse a record - generally one of these two:
///

View file

@ -9,7 +9,7 @@ use parse::parser::{
unexpected_eof, zero_or_more, ParseResult, Parser, State,
};
use parse::record::record;
use region::{Located, Region};
use region::Located;
pub fn located<'a>(min_indent: u16) -> impl Parser<'a, Located<TypeAnnotation<'a>>> {
one_of5(

View file

@ -13,7 +13,6 @@ mod test_format {
use roc::parse::ast::{format, Attempting, Expr};
use roc::parse::blankspace::space0_before;
use roc::parse::parser::{Fail, Parser, State};
use roc::region::{Located, Region};
fn parse_with<'a>(arena: &'a Bump, input: &'a str) -> Result<Expr<'a>, Fail> {
let state = State::new(&input, Attempting::Module);