Skip to content

Commit

Permalink
The 'io' module was renamed to 'old_io'
Browse files Browse the repository at this point in the history
This makes racer compile again as of rustc 1.0.0-dev (d77f6d536 2015-01-27 11:07:26 +0000)

See rust-lang/rust#21543 for details
  • Loading branch information
renato-zannon committed Jan 27, 2015
1 parent 4cc7b47 commit ebbc1da
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/racer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::io::File;
use std::io::BufferedReader;
use std::old_io::File;
use std::old_io::BufferedReader;
use std::{str,vec,fmt,path};

pub mod scopes;
Expand Down Expand Up @@ -234,7 +234,7 @@ pub fn complete_from_file(src: &str, filepath: &path::Path, pos: usize) -> vec::
CompletionType::CompletePath => {
let mut v = expr.split_str("::").collect::<Vec<_>>();
let mut global = false;
if v[0] == "" { // i.e. starts with '::' e.g. ::std::io::blah
if v[0] == "" { // i.e. starts with '::' e.g. ::std::old_io::blah
v.remove(0);
global = true;
}
Expand Down Expand Up @@ -285,7 +285,7 @@ pub fn find_definition_(src: &str, filepath: &path::Path, pos: usize) -> Option<
CompletionType::CompletePath => {
let mut v = expr.split_str("::").collect::<Vec<_>>();
let mut global = false;
if v[0] == "" { // i.e. starts with '::' e.g. ::std::io::blah
if v[0] == "" { // i.e. starts with '::' e.g. ::std::old_io::blah
v.remove(0);
global = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/racer/nameres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use racer::ast;
use racer::util;
use racer::util::{symbol_matches, txt_matches, find_ident_end};
use racer::scopes;
use std::io::{File};
use std::old_io::{File};
use std::{vec};
use std::iter::Iterator;
use std;
Expand Down Expand Up @@ -315,7 +315,7 @@ pub fn do_file_search(searchstr: &str, currentdir: &Path) -> vec::IntoIter<Match
v.push(currentdir.as_str().unwrap());
debug!("do_file_search v is {:?}",v);
for srcpath in v.into_iter() {
match std::io::fs::readdir(&Path::new(srcpath)) {
match std::old_io::fs::readdir(&Path::new(srcpath)) {
Ok(v) => {
for fpath in v.iter() {
//debug!("fpath {}",fpath.as_str());
Expand Down
4 changes: 2 additions & 2 deletions src/racer/scopes.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::io::File;
use std::io::BufferedReader;
use std::old_io::File;
use std::old_io::BufferedReader;

use racer;
use racer::util;
Expand Down
4 changes: 2 additions & 2 deletions src/racer/util.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Small functions of utility
use std::io::{File, BufferedReader};
use std::old_io::{File, BufferedReader};
use racer::{SearchType};
use racer::SearchType::{ExactMatch, StartsWith};
use std;
Expand Down Expand Up @@ -75,7 +75,7 @@ pub fn symbol_matches(stype: SearchType, searchstr: &str, candidate: &str) -> bo
}

pub fn get_backtrace() -> String {
let mut m = std::io::MemWriter::new();
let mut m = std::old_io::MemWriter::new();
let s = std::rt::backtrace::write(&mut m)
.ok().map_or("NO backtrace".to_string(),
|_| String::from_utf8_lossy(m.get_ref()).to_string());
Expand Down

0 comments on commit ebbc1da

Please sign in to comment.