Navigation Menu

Skip to content

Commit

Permalink
syntax: Remove #[feature(path_ext)]
Browse files Browse the repository at this point in the history
Replace Path::exists with stable metadata call.
  • Loading branch information
erickt committed Apr 21, 2015
1 parent c3da1a1 commit 83b1d7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/libsyntax/lib.rs
Expand Up @@ -31,7 +31,6 @@
#![feature(rustc_private)]
#![feature(staged_api)]
#![feature(unicode)]
#![feature(path_ext)]
#![feature(str_char)]

extern crate arena;
Expand Down
5 changes: 3 additions & 2 deletions src/libsyntax/parse/parser.rs
Expand Up @@ -78,6 +78,7 @@ use parse::PResult;
use diagnostic::FatalError;

use std::collections::HashSet;
use std::fs;
use std::io::prelude::*;
use std::mem;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -4775,8 +4776,8 @@ impl<'a> Parser<'a> {
let secondary_path_str = format!("{}/mod.rs", mod_name);
let default_path = dir_path.join(&default_path_str[..]);
let secondary_path = dir_path.join(&secondary_path_str[..]);
let default_exists = default_path.exists();
let secondary_exists = secondary_path.exists();
let default_exists = fs::metadata(&default_path).is_ok();
let secondary_exists = fs::metadata(&secondary_path).is_ok();

if !self.owns_directory {
self.span_err(id_sp,
Expand Down

0 comments on commit 83b1d7f

Please sign in to comment.