Auto merge of #23806 - Manishearth:rollup, r=Manishearth
- Successful merges: #23332, #23751, #23788, #23803, #23804 - Failed merges:
This commit is contained in:
commit
3e7385aae9
@ -6,14 +6,14 @@ Linux or a Mac, all you need to do is this (note that you don't need to type
|
|||||||
in the `$`s, they just indicate the start of each command):
|
in the `$`s, they just indicate the start of each command):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl -L https://static.rust-lang.org/rustup.sh | sudo sh
|
$ curl -sf -L https://static.rust-lang.org/rustup.sh | sudo sh
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're concerned about the [potential insecurity](http://curlpipesh.tumblr.com/) of using `curl | sudo sh`,
|
If you're concerned about the [potential insecurity](http://curlpipesh.tumblr.com/) of using `curl | sudo sh`,
|
||||||
please keep reading and see our disclaimer below. And feel free to use a two-step version of the installation and examine our installation script:
|
please keep reading and see our disclaimer below. And feel free to use a two-step version of the installation and examine our installation script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl -L https://static.rust-lang.org/rustup.sh -O
|
$ curl -f -L https://static.rust-lang.org/rustup.sh -O
|
||||||
$ sudo sh rustup.sh
|
$ sudo sh rustup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -51,7 +51,8 @@ You can think of this first parameter as being the `x` in `x.foo()`. The three
|
|||||||
variants correspond to the three kinds of thing `x` could be: `self` if it's
|
variants correspond to the three kinds of thing `x` could be: `self` if it's
|
||||||
just a value on the stack, `&self` if it's a reference, and `&mut self` if it's
|
just a value on the stack, `&self` if it's a reference, and `&mut self` if it's
|
||||||
a mutable reference. We should default to using `&self`, as it's the most
|
a mutable reference. We should default to using `&self`, as it's the most
|
||||||
common. Here's an example of all three variants:
|
common, as Rustaceans prefer borrowing over taking ownership, and references
|
||||||
|
over mutable references. Here's an example of all three variants:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
struct Circle {
|
struct Circle {
|
||||||
@ -100,8 +101,8 @@ impl Circle {
|
|||||||
std::f64::consts::PI * (self.radius * self.radius)
|
std::f64::consts::PI * (self.radius * self.radius)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn grow(&self) -> Circle {
|
fn grow(&self, increment: f64) -> Circle {
|
||||||
Circle { x: self.x, y: self.y, radius: (self.radius * 10.0) }
|
Circle { x: self.x, y: self.y, radius: self.radius + increment }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +110,7 @@ fn main() {
|
|||||||
let c = Circle { x: 0.0, y: 0.0, radius: 2.0 };
|
let c = Circle { x: 0.0, y: 0.0, radius: 2.0 };
|
||||||
println!("{}", c.area());
|
println!("{}", c.area());
|
||||||
|
|
||||||
let d = c.grow().area();
|
let d = c.grow(2.0).area();
|
||||||
println!("{}", d);
|
println!("{}", d);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -124,7 +125,7 @@ fn grow(&self) -> Circle {
|
|||||||
```
|
```
|
||||||
|
|
||||||
We just say we're returning a `Circle`. With this method, we can grow a new
|
We just say we're returning a `Circle`. With this method, we can grow a new
|
||||||
circle with an area that's 100 times larger than the old one.
|
circle to any arbitrary size.
|
||||||
|
|
||||||
## Static methods
|
## Static methods
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ impl Foo for OverrideDefault {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let default = UseDefault;
|
let default = UseDefault;
|
||||||
default.baz(); // prints "We called bar."
|
default.baz(); // prints "We called baz."
|
||||||
|
|
||||||
let over = OverrideDefault;
|
let over = OverrideDefault;
|
||||||
over.baz(); // prints "Override baz!"
|
over.baz(); // prints "Override baz!"
|
||||||
|
@ -76,7 +76,7 @@ use core::prelude::*;
|
|||||||
use core::atomic;
|
use core::atomic;
|
||||||
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
|
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::cmp::{Ordering};
|
use core::cmp::Ordering;
|
||||||
use core::default::Default;
|
use core::default::Default;
|
||||||
use core::mem::{min_align_of, size_of};
|
use core::mem::{min_align_of, size_of};
|
||||||
use core::mem;
|
use core::mem;
|
||||||
|
@ -24,7 +24,7 @@ use core::default::Default;
|
|||||||
use core::fmt::Debug;
|
use core::fmt::Debug;
|
||||||
use core::hash::{Hash, Hasher};
|
use core::hash::{Hash, Hasher};
|
||||||
use core::iter::{Map, FromIterator, IntoIterator};
|
use core::iter::{Map, FromIterator, IntoIterator};
|
||||||
use core::ops::{Index};
|
use core::ops::Index;
|
||||||
use core::{iter, fmt, mem, usize};
|
use core::{iter, fmt, mem, usize};
|
||||||
use Bound::{self, Included, Excluded, Unbounded};
|
use Bound::{self, Included, Excluded, Unbounded};
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ use core::prelude::*;
|
|||||||
use alloc::boxed::Box;
|
use alloc::boxed::Box;
|
||||||
use alloc::heap::{EMPTY, allocate, reallocate, deallocate};
|
use alloc::heap::{EMPTY, allocate, reallocate, deallocate};
|
||||||
use core::cmp::max;
|
use core::cmp::max;
|
||||||
use core::cmp::{Ordering};
|
use core::cmp::Ordering;
|
||||||
use core::default::Default;
|
use core::default::Default;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::hash::{self, Hash};
|
use core::hash::{self, Hash};
|
||||||
|
@ -148,7 +148,7 @@ use self::Option::*;
|
|||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
use cmp::{Eq, Ord};
|
use cmp::{Eq, Ord};
|
||||||
use default::Default;
|
use default::Default;
|
||||||
use iter::{ExactSizeIterator};
|
use iter::ExactSizeIterator;
|
||||||
use iter::{Iterator, IteratorExt, DoubleEndedIterator, FromIterator, IntoIterator};
|
use iter::{Iterator, IteratorExt, DoubleEndedIterator, FromIterator, IntoIterator};
|
||||||
use mem;
|
use mem;
|
||||||
use ops::FnOnce;
|
use ops::FnOnce;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
// this is surprisingly complicated to be both generic & correct
|
// this is surprisingly complicated to be both generic & correct
|
||||||
|
|
||||||
use core::prelude::{PartialOrd};
|
use core::prelude::PartialOrd;
|
||||||
use core::num::Int;
|
use core::num::Int;
|
||||||
use core::num::wrapping::WrappingOps;
|
use core::num::wrapping::WrappingOps;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ use metadata::cstore;
|
|||||||
use metadata::decoder;
|
use metadata::decoder;
|
||||||
use metadata::tyencode;
|
use metadata::tyencode;
|
||||||
use middle::def;
|
use middle::def;
|
||||||
use middle::ty::{lookup_item_type};
|
use middle::ty::lookup_item_type;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::stability;
|
use middle::stability;
|
||||||
use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
|
use util::nodemap::{FnvHashMap, NodeMap, NodeSet};
|
||||||
|
@ -212,7 +212,7 @@
|
|||||||
//! no means all of the necessary details. Take a look at the rest of
|
//! no means all of the necessary details. Take a look at the rest of
|
||||||
//! metadata::loader or metadata::creader for all the juicy details!
|
//! metadata::loader or metadata::creader for all the juicy details!
|
||||||
|
|
||||||
use back::archive::{METADATA_FILENAME};
|
use back::archive::METADATA_FILENAME;
|
||||||
use back::svh::Svh;
|
use back::svh::Svh;
|
||||||
use session::Session;
|
use session::Session;
|
||||||
use session::search_paths::PathKind;
|
use session::search_paths::PathKind;
|
||||||
|
@ -50,7 +50,7 @@ use rbml::writer::Encoder;
|
|||||||
use rbml;
|
use rbml;
|
||||||
use serialize;
|
use serialize;
|
||||||
use serialize::{Decodable, Decoder, DecoderHelpers, Encodable};
|
use serialize::{Decodable, Decoder, DecoderHelpers, Encodable};
|
||||||
use serialize::{EncoderHelpers};
|
use serialize::EncoderHelpers;
|
||||||
|
|
||||||
#[cfg(test)] use std::io::Cursor;
|
#[cfg(test)] use std::io::Cursor;
|
||||||
#[cfg(test)] use syntax::parse;
|
#[cfg(test)] use syntax::parse;
|
||||||
|
@ -18,7 +18,7 @@ use middle::const_eval::{const_expr_to_pat, lookup_const_by_id};
|
|||||||
use middle::def::*;
|
use middle::def::*;
|
||||||
use middle::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor, Init};
|
use middle::expr_use_visitor::{ConsumeMode, Delegate, ExprUseVisitor, Init};
|
||||||
use middle::expr_use_visitor::{JustWrite, LoanCause, MutateMode};
|
use middle::expr_use_visitor::{JustWrite, LoanCause, MutateMode};
|
||||||
use middle::expr_use_visitor::{WriteAndRead};
|
use middle::expr_use_visitor::WriteAndRead;
|
||||||
use middle::expr_use_visitor as euv;
|
use middle::expr_use_visitor as euv;
|
||||||
use middle::mem_categorization::cmt;
|
use middle::mem_categorization::cmt;
|
||||||
use middle::pat_util::*;
|
use middle::pat_util::*;
|
||||||
|
@ -25,13 +25,13 @@
|
|||||||
//! In particular, it might be enough to say (A,B) are bivariant for
|
//! In particular, it might be enough to say (A,B) are bivariant for
|
||||||
//! all (A,B).
|
//! all (A,B).
|
||||||
|
|
||||||
use middle::ty::{BuiltinBounds};
|
use middle::ty::BuiltinBounds;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::ty::TyVar;
|
use middle::ty::TyVar;
|
||||||
use middle::infer::combine::*;
|
use middle::infer::combine::*;
|
||||||
use middle::infer::{cres};
|
use middle::infer::cres;
|
||||||
use middle::infer::type_variable::{BiTo};
|
use middle::infer::type_variable::BiTo;
|
||||||
use util::ppaux::{Repr};
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
pub struct Bivariate<'f, 'tcx: 'f> {
|
pub struct Bivariate<'f, 'tcx: 'f> {
|
||||||
fields: CombineFields<'f, 'tcx>
|
fields: CombineFields<'f, 'tcx>
|
||||||
|
@ -46,7 +46,7 @@ use middle::subst;
|
|||||||
use middle::subst::{ErasedRegions, NonerasedRegions, Substs};
|
use middle::subst::{ErasedRegions, NonerasedRegions, Substs};
|
||||||
use middle::ty::{FloatVar, FnSig, IntVar, TyVar};
|
use middle::ty::{FloatVar, FnSig, IntVar, TyVar};
|
||||||
use middle::ty::{IntType, UintType};
|
use middle::ty::{IntType, UintType};
|
||||||
use middle::ty::{BuiltinBounds};
|
use middle::ty::BuiltinBounds;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::ty_fold;
|
use middle::ty_fold;
|
||||||
use middle::ty_fold::{TypeFolder, TypeFoldable};
|
use middle::ty_fold::{TypeFolder, TypeFoldable};
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::ty::TyVar;
|
use middle::ty::TyVar;
|
||||||
use middle::infer::combine::*;
|
use middle::infer::combine::*;
|
||||||
use middle::infer::{cres};
|
use middle::infer::cres;
|
||||||
use middle::infer::{Subtype};
|
use middle::infer::Subtype;
|
||||||
use middle::infer::type_variable::{EqTo};
|
use middle::infer::type_variable::EqTo;
|
||||||
use util::ppaux::{Repr};
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
pub struct Equate<'f, 'tcx: 'f> {
|
pub struct Equate<'f, 'tcx: 'f> {
|
||||||
fields: CombineFields<'f, 'tcx>
|
fields: CombineFields<'f, 'tcx>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
use super::combine::*;
|
use super::combine::*;
|
||||||
use super::lattice::*;
|
use super::lattice::*;
|
||||||
use super::higher_ranked::HigherRankedRelations;
|
use super::higher_ranked::HigherRankedRelations;
|
||||||
use super::{cres};
|
use super::cres;
|
||||||
use super::Subtype;
|
use super::Subtype;
|
||||||
|
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
|
@ -34,7 +34,7 @@ use super::combine::*;
|
|||||||
use super::glb::Glb;
|
use super::glb::Glb;
|
||||||
use super::lub::Lub;
|
use super::lub::Lub;
|
||||||
|
|
||||||
use middle::ty::{TyVar};
|
use middle::ty::TyVar;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
use super::combine::*;
|
use super::combine::*;
|
||||||
use super::higher_ranked::HigherRankedRelations;
|
use super::higher_ranked::HigherRankedRelations;
|
||||||
use super::lattice::*;
|
use super::lattice::*;
|
||||||
use super::{cres};
|
use super::cres;
|
||||||
use super::{Subtype};
|
use super::Subtype;
|
||||||
|
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
@ -28,14 +28,14 @@ use middle::ty::{TyVid, IntVid, FloatVid, RegionVid, UnconstrainedNumeric};
|
|||||||
use middle::ty::replace_late_bound_regions;
|
use middle::ty::replace_late_bound_regions;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::ty_fold::{TypeFolder, TypeFoldable};
|
use middle::ty_fold::{TypeFolder, TypeFoldable};
|
||||||
use std::cell::{RefCell};
|
use std::cell::RefCell;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap;
|
use syntax::codemap;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use util::nodemap::FnvHashMap;
|
use util::nodemap::FnvHashMap;
|
||||||
use util::ppaux::{ty_to_string};
|
use util::ppaux::ty_to_string;
|
||||||
use util::ppaux::{Repr, UserString};
|
use util::ppaux::{Repr, UserString};
|
||||||
|
|
||||||
use self::combine::{Combine, Combineable, CombineFields};
|
use self::combine::{Combine, Combineable, CombineFields};
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use super::combine::*;
|
use super::combine::*;
|
||||||
use super::{cres};
|
use super::cres;
|
||||||
use super::higher_ranked::HigherRankedRelations;
|
use super::higher_ranked::HigherRankedRelations;
|
||||||
use super::{Subtype};
|
use super::Subtype;
|
||||||
use super::type_variable::{SubtypeOf, SupertypeOf};
|
use super::type_variable::{SubtypeOf, SupertypeOf};
|
||||||
|
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::ty::TyVar;
|
use middle::ty::TyVar;
|
||||||
use util::ppaux::{Repr};
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
/// "Greatest lower bound" (common subtype)
|
/// "Greatest lower bound" (common subtype)
|
||||||
pub struct Sub<'f, 'tcx: 'f> {
|
pub struct Sub<'f, 'tcx: 'f> {
|
||||||
|
@ -75,7 +75,7 @@ use middle::check_const;
|
|||||||
use middle::def;
|
use middle::def;
|
||||||
use middle::region;
|
use middle::region;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use util::nodemap::{NodeMap};
|
use util::nodemap::NodeMap;
|
||||||
use util::ppaux::{Repr, UserString};
|
use util::ppaux::{Repr, UserString};
|
||||||
|
|
||||||
use syntax::ast::{MutImmutable, MutMutable};
|
use syntax::ast::{MutImmutable, MutMutable};
|
||||||
|
@ -13,7 +13,7 @@ use middle::ty;
|
|||||||
use util::nodemap::FnvHashMap;
|
use util::nodemap::FnvHashMap;
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_util::{walk_pat};
|
use syntax::ast_util::walk_pat;
|
||||||
use syntax::codemap::{Span, DUMMY_SP};
|
use syntax::codemap::{Span, DUMMY_SP};
|
||||||
|
|
||||||
pub type PatIdMap = FnvHashMap<ast::Ident, ast::NodeId>;
|
pub type PatIdMap = FnvHashMap<ast::Ident, ast::NodeId>;
|
||||||
|
@ -25,7 +25,7 @@ use std::cell::RefCell;
|
|||||||
use syntax::codemap::{self, Span};
|
use syntax::codemap::{self, Span};
|
||||||
use syntax::{ast, visit};
|
use syntax::{ast, visit};
|
||||||
use syntax::ast::{Block, Item, FnDecl, NodeId, Arm, Pat, Stmt, Expr, Local};
|
use syntax::ast::{Block, Item, FnDecl, NodeId, Arm, Pat, Stmt, Expr, Local};
|
||||||
use syntax::ast_util::{stmt_id};
|
use syntax::ast_util::stmt_id;
|
||||||
use syntax::ast_map;
|
use syntax::ast_map;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::visit::{Visitor, FnKind};
|
use syntax::visit::{Visitor, FnKind};
|
||||||
|
@ -28,7 +28,7 @@ use syntax::ast;
|
|||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token::special_idents;
|
use syntax::parse::token::special_idents;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::print::pprust::{lifetime_to_string};
|
use syntax::print::pprust::lifetime_to_string;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
use syntax::visit::Visitor;
|
use syntax::visit::Visitor;
|
||||||
use util::nodemap::NodeMap;
|
use util::nodemap::NodeMap;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
use super::Normalized;
|
use super::Normalized;
|
||||||
use super::SelectionContext;
|
use super::SelectionContext;
|
||||||
use super::{ObligationCause};
|
use super::ObligationCause;
|
||||||
use super::PredicateObligation;
|
use super::PredicateObligation;
|
||||||
use super::project;
|
use super::project;
|
||||||
use super::util;
|
use super::util;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use middle::infer::{InferCtxt};
|
use middle::infer::InferCtxt;
|
||||||
use middle::ty::{self, RegionEscape, Ty};
|
use middle::ty::{self, RegionEscape, Ty};
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
|
@ -21,16 +21,16 @@ use super::DerivedObligationCause;
|
|||||||
use super::project;
|
use super::project;
|
||||||
use super::project::{normalize_with_depth, Normalized};
|
use super::project::{normalize_with_depth, Normalized};
|
||||||
use super::{PredicateObligation, TraitObligation, ObligationCause};
|
use super::{PredicateObligation, TraitObligation, ObligationCause};
|
||||||
use super::{report_overflow_error};
|
use super::report_overflow_error;
|
||||||
use super::{ObligationCauseCode, BuiltinDerivedObligation, ImplDerivedObligation};
|
use super::{ObligationCauseCode, BuiltinDerivedObligation, ImplDerivedObligation};
|
||||||
use super::{SelectionError, Unimplemented, OutputTypeParameterMismatch};
|
use super::{SelectionError, Unimplemented, OutputTypeParameterMismatch};
|
||||||
use super::{Selection};
|
use super::Selection;
|
||||||
use super::{SelectionResult};
|
use super::SelectionResult;
|
||||||
use super::{VtableBuiltin, VtableImpl, VtableParam, VtableClosure,
|
use super::{VtableBuiltin, VtableImpl, VtableParam, VtableClosure,
|
||||||
VtableFnPointer, VtableObject, VtableDefaultImpl};
|
VtableFnPointer, VtableObject, VtableDefaultImpl};
|
||||||
use super::{VtableImplData, VtableObjectData, VtableBuiltinData, VtableDefaultImplData};
|
use super::{VtableImplData, VtableObjectData, VtableBuiltinData, VtableDefaultImplData};
|
||||||
use super::object_safety;
|
use super::object_safety;
|
||||||
use super::{util};
|
use super::util;
|
||||||
|
|
||||||
use middle::fast_reject;
|
use middle::fast_reject;
|
||||||
use middle::subst::{Subst, Substs, TypeSpace, VecPerParamSpace};
|
use middle::subst::{Subst, Substs, TypeSpace, VecPerParamSpace};
|
||||||
|
@ -64,7 +64,7 @@ use util::ppaux::ty_to_string;
|
|||||||
use util::ppaux::{Repr, UserString};
|
use util::ppaux::{Repr, UserString};
|
||||||
use util::common::{memoized, ErrorReported};
|
use util::common::{memoized, ErrorReported};
|
||||||
use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet};
|
use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet};
|
||||||
use util::nodemap::{FnvHashMap};
|
use util::nodemap::FnvHashMap;
|
||||||
|
|
||||||
use arena::TypedArena;
|
use arena::TypedArena;
|
||||||
use std::borrow::{Borrow, Cow};
|
use std::borrow::{Borrow, Cow};
|
||||||
|
@ -15,7 +15,7 @@ use session::Session;
|
|||||||
|
|
||||||
use syntax::ext::base::{SyntaxExtension, NamedSyntaxExtension, NormalTT};
|
use syntax::ext::base::{SyntaxExtension, NamedSyntaxExtension, NormalTT};
|
||||||
use syntax::ext::base::{IdentTT, Decorator, Modifier, MultiModifier, MacroRulesTT};
|
use syntax::ext::base::{IdentTT, Decorator, Modifier, MultiModifier, MacroRulesTT};
|
||||||
use syntax::ext::base::{MacroExpanderFn};
|
use syntax::ext::base::MacroExpanderFn;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
||||||
use std::collections::hash_state::{DefaultState};
|
use std::collections::hash_state::DefaultState;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
use std::hash::{Hasher, Hash};
|
use std::hash::{Hasher, Hash};
|
||||||
|
@ -21,7 +21,7 @@ use middle::ty::{mt, Ty, ParamTy};
|
|||||||
use middle::ty::{ty_bool, ty_char, ty_struct, ty_enum};
|
use middle::ty::{ty_bool, ty_char, ty_struct, ty_enum};
|
||||||
use middle::ty::{ty_err, ty_str, ty_vec, ty_float, ty_bare_fn};
|
use middle::ty::{ty_err, ty_str, ty_vec, ty_float, ty_bare_fn};
|
||||||
use middle::ty::{ty_param, ty_ptr, ty_rptr, ty_tup};
|
use middle::ty::{ty_param, ty_ptr, ty_rptr, ty_tup};
|
||||||
use middle::ty::{ty_closure};
|
use middle::ty::ty_closure;
|
||||||
use middle::ty::{ty_uniq, ty_trait, ty_int, ty_uint, ty_infer};
|
use middle::ty::{ty_uniq, ty_trait, ty_int, ty_uint, ty_infer};
|
||||||
use middle::ty;
|
use middle::ty;
|
||||||
use middle::ty_fold::TypeFoldable;
|
use middle::ty_fold::TypeFoldable;
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
use self::Fragment::*;
|
use self::Fragment::*;
|
||||||
|
|
||||||
use borrowck::InteriorKind::{InteriorField, InteriorElement};
|
use borrowck::InteriorKind::{InteriorField, InteriorElement};
|
||||||
use borrowck::{LoanPath};
|
use borrowck::LoanPath;
|
||||||
use borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
|
use borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
|
||||||
use borrowck::LoanPathElem::{LpDeref, LpInterior};
|
use borrowck::LoanPathElem::{LpDeref, LpInterior};
|
||||||
use borrowck::move_data::{InvalidMovePathIndex};
|
use borrowck::move_data::InvalidMovePathIndex;
|
||||||
use borrowck::move_data::{MoveData, MovePathIndex};
|
use borrowck::move_data::{MoveData, MovePathIndex};
|
||||||
use rustc::middle::ty;
|
use rustc::middle::ty;
|
||||||
use rustc::middle::mem_categorization as mc;
|
use rustc::middle::mem_categorization as mc;
|
||||||
|
@ -22,7 +22,7 @@ use rustc::middle::expr_use_visitor as euv;
|
|||||||
use rustc::middle::mem_categorization as mc;
|
use rustc::middle::mem_categorization as mc;
|
||||||
use rustc::middle::region;
|
use rustc::middle::region;
|
||||||
use rustc::middle::ty;
|
use rustc::middle::ty;
|
||||||
use rustc::util::ppaux::{Repr};
|
use rustc::util::ppaux::Repr;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
|
@ -20,7 +20,7 @@ use rustc::middle::cfg::graphviz as cfg_dot;
|
|||||||
use borrowck;
|
use borrowck;
|
||||||
use borrowck::{BorrowckCtxt, LoanPath};
|
use borrowck::{BorrowckCtxt, LoanPath};
|
||||||
use dot;
|
use dot;
|
||||||
use rustc::middle::cfg::{CFGIndex};
|
use rustc::middle::cfg::CFGIndex;
|
||||||
use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
|
use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
|
||||||
use rustc::middle::dataflow;
|
use rustc::middle::dataflow;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -39,7 +39,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_map;
|
use syntax::ast_map;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::attr::{AttrMetaMethods};
|
use syntax::attr::AttrMetaMethods;
|
||||||
use syntax::diagnostics;
|
use syntax::diagnostics;
|
||||||
use syntax::parse;
|
use syntax::parse;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
|
@ -35,7 +35,7 @@ use middle::ty::{self, Ty};
|
|||||||
use middle::{def, pat_util, stability};
|
use middle::{def, pat_util, stability};
|
||||||
use middle::const_eval::{eval_const_expr_partial, const_int, const_uint};
|
use middle::const_eval::{eval_const_expr_partial, const_int, const_uint};
|
||||||
use middle::cfg;
|
use middle::cfg;
|
||||||
use util::ppaux::{ty_to_string};
|
use util::ppaux::ty_to_string;
|
||||||
use util::nodemap::{FnvHashMap, NodeSet};
|
use util::nodemap::{FnvHashMap, NodeSet};
|
||||||
use lint::{Level, Context, LintPass, LintArray, Lint};
|
use lint::{Level, Context, LintPass, LintArray, Lint};
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ use rustc::middle::privacy::{ExternalExports, ExportedItems, PublicItems};
|
|||||||
use rustc::middle::ty::{MethodTypeParam, MethodStatic};
|
use rustc::middle::ty::{MethodTypeParam, MethodStatic};
|
||||||
use rustc::middle::ty::{MethodCall, MethodMap, MethodOrigin, MethodParam};
|
use rustc::middle::ty::{MethodCall, MethodMap, MethodOrigin, MethodParam};
|
||||||
use rustc::middle::ty::{MethodStaticClosure, MethodObject};
|
use rustc::middle::ty::{MethodStaticClosure, MethodObject};
|
||||||
use rustc::middle::ty::{MethodTraitObject};
|
use rustc::middle::ty::MethodTraitObject;
|
||||||
use rustc::middle::ty::{self, Ty};
|
use rustc::middle::ty::{self, Ty};
|
||||||
use rustc::util::nodemap::{NodeMap, NodeSet};
|
use rustc::util::nodemap::{NodeMap, NodeSet};
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ use syntax::ast::StructVariantKind;
|
|||||||
use syntax::ast::TupleVariantKind;
|
use syntax::ast::TupleVariantKind;
|
||||||
use syntax::ast::UnnamedField;
|
use syntax::ast::UnnamedField;
|
||||||
use syntax::ast::{Variant, ViewPathGlob, ViewPathList, ViewPathSimple};
|
use syntax::ast::{Variant, ViewPathGlob, ViewPathList, ViewPathSimple};
|
||||||
use syntax::ast::{Visibility};
|
use syntax::ast::Visibility;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_util::local_def;
|
use syntax::ast_util::local_def;
|
||||||
use syntax::attr::AttrMetaMethods;
|
use syntax::attr::AttrMetaMethods;
|
||||||
|
@ -75,7 +75,7 @@ use syntax::ast::{TraitRef, Ty, TyBool, TyChar, TyF32};
|
|||||||
use syntax::ast::{TyF64, TyFloat, TyIs, TyI8, TyI16, TyI32, TyI64, TyInt};
|
use syntax::ast::{TyF64, TyFloat, TyIs, TyI8, TyI16, TyI32, TyI64, TyInt};
|
||||||
use syntax::ast::{TyPath, TyPtr};
|
use syntax::ast::{TyPath, TyPtr};
|
||||||
use syntax::ast::{TyRptr, TyStr, TyUs, TyU8, TyU16, TyU32, TyU64, TyUint};
|
use syntax::ast::{TyRptr, TyStr, TyUs, TyU8, TyU16, TyU32, TyU64, TyUint};
|
||||||
use syntax::ast::{TypeImplItem};
|
use syntax::ast::TypeImplItem;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_map;
|
use syntax::ast_map;
|
||||||
use syntax::ast_util::{local_def, walk_pat};
|
use syntax::ast_util::{local_def, walk_pat};
|
||||||
|
@ -30,7 +30,7 @@ pub use self::ValueOrigin::*;
|
|||||||
use super::CrateTranslation;
|
use super::CrateTranslation;
|
||||||
use super::ModuleTranslation;
|
use super::ModuleTranslation;
|
||||||
|
|
||||||
use back::link::{mangle_exported_name};
|
use back::link::mangle_exported_name;
|
||||||
use back::{link, abi};
|
use back::{link, abi};
|
||||||
use lint;
|
use lint;
|
||||||
use llvm::{AttrHelper, BasicBlockRef, Linkage, ValueRef, Vector, get_param};
|
use llvm::{AttrHelper, BasicBlockRef, Linkage, ValueRef, Vector, get_param};
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use llvm;
|
use llvm;
|
||||||
use llvm::{BasicBlockRef};
|
use llvm::BasicBlockRef;
|
||||||
use trans::value::{Users, Value};
|
use trans::value::{Users, Value};
|
||||||
use std::iter::{Filter, Map};
|
use std::iter::{Filter, Map};
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ pub use self::CallArgs::*;
|
|||||||
use arena::TypedArena;
|
use arena::TypedArena;
|
||||||
use back::link;
|
use back::link;
|
||||||
use session;
|
use session;
|
||||||
use llvm::{ValueRef};
|
use llvm::ValueRef;
|
||||||
use llvm::get_param;
|
use llvm::get_param;
|
||||||
use llvm;
|
use llvm;
|
||||||
use metadata::csearch;
|
use metadata::csearch;
|
||||||
|
@ -24,7 +24,7 @@ use trans::expr;
|
|||||||
use trans::monomorphize::{self, MonoId};
|
use trans::monomorphize::{self, MonoId};
|
||||||
use trans::type_of::*;
|
use trans::type_of::*;
|
||||||
use middle::ty::{self, ClosureTyper};
|
use middle::ty::{self, ClosureTyper};
|
||||||
use middle::subst::{Substs};
|
use middle::subst::Substs;
|
||||||
use session::config::FullDebugInfo;
|
use session::config::FullDebugInfo;
|
||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
use llvm;
|
use llvm;
|
||||||
use llvm::{ContextRef, ModuleRef, ValueRef, BuilderRef};
|
use llvm::{ContextRef, ModuleRef, ValueRef, BuilderRef};
|
||||||
use llvm::{TargetData};
|
use llvm::TargetData;
|
||||||
use llvm::mk_target_data;
|
use llvm::mk_target_data;
|
||||||
use metadata::common::LinkMeta;
|
use metadata::common::LinkMeta;
|
||||||
use middle::def::ExportMap;
|
use middle::def::ExportMap;
|
||||||
|
@ -113,7 +113,7 @@ use trans::expr;
|
|||||||
use trans::tvec;
|
use trans::tvec;
|
||||||
use trans::type_of;
|
use trans::type_of;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use util::ppaux::{ty_to_string};
|
use util::ppaux::ty_to_string;
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
|
@ -73,7 +73,7 @@ use trans::tvec;
|
|||||||
use trans::type_of;
|
use trans::type_of;
|
||||||
use middle::ty::{struct_fields, tup_fields};
|
use middle::ty::{struct_fields, tup_fields};
|
||||||
use middle::ty::{AdjustDerefRef, AdjustReifyFnPointer, AdjustUnsafeFnPointer, AutoUnsafe};
|
use middle::ty::{AdjustDerefRef, AdjustReifyFnPointer, AdjustUnsafeFnPointer, AutoUnsafe};
|
||||||
use middle::ty::{AutoPtr};
|
use middle::ty::AutoPtr;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use middle::ty::MethodCall;
|
use middle::ty::MethodCall;
|
||||||
use util::common::indenter;
|
use util::common::indenter;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
|
||||||
use back::{link};
|
use back::link;
|
||||||
use llvm::{ValueRef, CallConv, get_param};
|
use llvm::{ValueRef, CallConv, get_param};
|
||||||
use llvm;
|
use llvm;
|
||||||
use middle::weak_lang_items;
|
use middle::weak_lang_items;
|
||||||
@ -35,7 +35,7 @@ use syntax::abi::{RustIntrinsic, Rust, RustCall, Stdcall, Fastcall, System};
|
|||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token::{InternedString, special_idents};
|
use syntax::parse::token::{InternedString, special_idents};
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::{ast};
|
use syntax::ast;
|
||||||
use syntax::{attr, ast_map};
|
use syntax::{attr, ast_map};
|
||||||
use syntax::print::pprust;
|
use syntax::print::pprust;
|
||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
use back::abi;
|
use back::abi;
|
||||||
use llvm;
|
use llvm;
|
||||||
use llvm::{ValueRef};
|
use llvm::ValueRef;
|
||||||
use trans::base::*;
|
use trans::base::*;
|
||||||
use trans::base;
|
use trans::base;
|
||||||
use trans::build::*;
|
use trans::build::*;
|
||||||
|
@ -12,7 +12,7 @@ use middle::const_eval;
|
|||||||
use middle::def;
|
use middle::def;
|
||||||
use middle::infer;
|
use middle::infer;
|
||||||
use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const};
|
use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const};
|
||||||
use middle::subst::{Substs};
|
use middle::subst::Substs;
|
||||||
use middle::ty::{self, Ty};
|
use middle::ty::{self, Ty};
|
||||||
use check::{check_expr, check_expr_has_type, check_expr_with_expectation};
|
use check::{check_expr, check_expr_has_type, check_expr_with_expectation};
|
||||||
use check::{check_expr_coercable_to_type, demand, FnCtxt, Expectation};
|
use check::{check_expr_coercable_to_type, demand, FnCtxt, Expectation};
|
||||||
|
@ -15,7 +15,7 @@ use middle::subst::{self, Subst, Substs, VecPerParamSpace};
|
|||||||
use util::ppaux::{self, Repr};
|
use util::ppaux::{self, Repr};
|
||||||
|
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::{Span};
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
|
|
||||||
use super::assoc;
|
use super::assoc;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
use astconv::object_region_bounds;
|
use astconv::object_region_bounds;
|
||||||
use middle::infer::{InferCtxt, GenericKind};
|
use middle::infer::{InferCtxt, GenericKind};
|
||||||
use middle::subst::{Substs};
|
use middle::subst::Substs;
|
||||||
use middle::traits;
|
use middle::traits;
|
||||||
use middle::ty::{self, ToPolyTraitRef, Ty};
|
use middle::ty::{self, ToPolyTraitRef, Ty};
|
||||||
use middle::ty_fold::{TypeFoldable, TypeFolder};
|
use middle::ty_fold::{TypeFoldable, TypeFolder};
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
//! Method lookup: the secret sauce of Rust. See `README.md`.
|
//! Method lookup: the secret sauce of Rust. See `README.md`.
|
||||||
|
|
||||||
use astconv::AstConv;
|
use astconv::AstConv;
|
||||||
use check::{FnCtxt};
|
use check::FnCtxt;
|
||||||
use check::vtable;
|
use check::vtable;
|
||||||
use check::vtable::select_new_fcx_obligations;
|
use check::vtable::select_new_fcx_obligations;
|
||||||
use middle::def;
|
use middle::def;
|
||||||
@ -24,7 +24,7 @@ use middle::infer;
|
|||||||
use util::ppaux::Repr;
|
use util::ppaux::Repr;
|
||||||
|
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use syntax::ast::{DefId};
|
use syntax::ast::DefId;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use super::{MethodError};
|
use super::MethodError;
|
||||||
use super::MethodIndex;
|
use super::MethodIndex;
|
||||||
use super::{CandidateSource,ImplSource,TraitSource};
|
use super::{CandidateSource,ImplSource,TraitSource};
|
||||||
use super::suggest;
|
use super::suggest;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use check::{FnCtxt};
|
use check::FnCtxt;
|
||||||
use middle::traits::{self, ObjectSafetyViolation, MethodViolationCode};
|
use middle::traits::{self, ObjectSafetyViolation, MethodViolationCode};
|
||||||
use middle::traits::{Obligation, ObligationCause};
|
use middle::traits::{Obligation, ObligationCause};
|
||||||
use middle::traits::report_fulfillment_errors;
|
use middle::traits::report_fulfillment_errors;
|
||||||
|
@ -22,7 +22,7 @@ use util::ppaux::{Repr, UserString};
|
|||||||
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_util::{local_def};
|
use syntax::ast_util::local_def;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token::{self, special_idents};
|
use syntax::parse::token::{self, special_idents};
|
||||||
|
@ -27,13 +27,13 @@ use middle::ty::{ty_param, TypeScheme, ty_ptr};
|
|||||||
use middle::ty::{ty_rptr, ty_struct, ty_trait, ty_tup};
|
use middle::ty::{ty_rptr, ty_struct, ty_trait, ty_tup};
|
||||||
use middle::ty::{ty_str, ty_vec, ty_float, ty_infer, ty_int};
|
use middle::ty::{ty_str, ty_vec, ty_float, ty_infer, ty_int};
|
||||||
use middle::ty::{ty_uint, ty_closure, ty_uniq, ty_bare_fn};
|
use middle::ty::{ty_uint, ty_closure, ty_uniq, ty_bare_fn};
|
||||||
use middle::ty::{ty_projection};
|
use middle::ty::ty_projection;
|
||||||
use middle::ty;
|
use middle::ty;
|
||||||
use CrateCtxt;
|
use CrateCtxt;
|
||||||
use middle::infer::combine::Combine;
|
use middle::infer::combine::Combine;
|
||||||
use middle::infer::InferCtxt;
|
use middle::infer::InferCtxt;
|
||||||
use middle::infer::{new_infer_ctxt};
|
use middle::infer::new_infer_ctxt;
|
||||||
use std::collections::{HashSet};
|
use std::collections::HashSet;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use syntax::ast::{Crate, DefId};
|
use syntax::ast::{Crate, DefId};
|
||||||
@ -42,8 +42,8 @@ use syntax::ast::{LOCAL_CRATE, TraitRef};
|
|||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_map::NodeItem;
|
use syntax::ast_map::NodeItem;
|
||||||
use syntax::ast_map;
|
use syntax::ast_map;
|
||||||
use syntax::ast_util::{local_def};
|
use syntax::ast_util::local_def;
|
||||||
use syntax::codemap::{Span};
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
use util::nodemap::{DefIdMap, FnvHashMap};
|
use util::nodemap::{DefIdMap, FnvHashMap};
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
use middle::traits;
|
use middle::traits;
|
||||||
use middle::ty;
|
use middle::ty;
|
||||||
use middle::infer::{self, new_infer_ctxt};
|
use middle::infer::{self, new_infer_ctxt};
|
||||||
use syntax::ast::{DefId};
|
use syntax::ast::DefId;
|
||||||
use syntax::ast::{LOCAL_CRATE};
|
use syntax::ast::LOCAL_CRATE;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
use syntax::ast_util;
|
use syntax::ast_util;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
|
@ -91,7 +91,7 @@ use syntax::ast;
|
|||||||
use syntax::ast_map;
|
use syntax::ast_map;
|
||||||
use syntax::ast_util::local_def;
|
use syntax::ast_util::local_def;
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::parse::token::{special_idents};
|
use syntax::parse::token::special_idents;
|
||||||
use syntax::parse::token;
|
use syntax::parse::token;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use syntax::visit;
|
use syntax::visit;
|
||||||
|
@ -202,7 +202,7 @@ use self::InternalStackElement::*;
|
|||||||
use std::collections::{HashMap, BTreeMap};
|
use std::collections::{HashMap, BTreeMap};
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::mem::{swap};
|
use std::mem::swap;
|
||||||
use std::num::FpCategory as Fp;
|
use std::num::FpCategory as Fp;
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
@ -14,7 +14,7 @@ extern crate test;
|
|||||||
use prelude::v1::*;
|
use prelude::v1::*;
|
||||||
|
|
||||||
use self::test::Bencher;
|
use self::test::Bencher;
|
||||||
use iter::{range_inclusive};
|
use iter::range_inclusive;
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn new_drop(b : &mut Bencher) {
|
fn new_drop(b : &mut Bencher) {
|
||||||
|
@ -20,7 +20,7 @@ pub use self::Flag::*;
|
|||||||
pub use self::Protocol::*;
|
pub use self::Protocol::*;
|
||||||
|
|
||||||
use iter::IteratorExt;
|
use iter::IteratorExt;
|
||||||
use old_io::{IoResult};
|
use old_io::IoResult;
|
||||||
use old_io::net::ip::{SocketAddr, IpAddr};
|
use old_io::net::ip::{SocketAddr, IpAddr};
|
||||||
use option::Option;
|
use option::Option;
|
||||||
use option::Option::{Some, None};
|
use option::Option::{Some, None};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#![allow(deprecated)] // rand
|
#![allow(deprecated)] // rand
|
||||||
|
|
||||||
use env;
|
use env;
|
||||||
use iter::{IteratorExt};
|
use iter::IteratorExt;
|
||||||
use old_io::{fs, IoError, IoErrorKind, IoResult};
|
use old_io::{fs, IoError, IoErrorKind, IoResult};
|
||||||
use old_io;
|
use old_io;
|
||||||
use ops::Drop;
|
use ops::Drop;
|
||||||
|
@ -38,7 +38,7 @@ use core::mem::replace;
|
|||||||
|
|
||||||
use self::FutureState::*;
|
use self::FutureState::*;
|
||||||
use sync::mpsc::{Receiver, channel};
|
use sync::mpsc::{Receiver, channel};
|
||||||
use thunk::{Thunk};
|
use thunk::Thunk;
|
||||||
use thread;
|
use thread;
|
||||||
|
|
||||||
/// A type encapsulating the result of a computation which may not be complete
|
/// A type encapsulating the result of a computation which may not be complete
|
||||||
|
@ -42,7 +42,7 @@ use super::c::{ENABLE_INSERT_MODE, ENABLE_LINE_INPUT};
|
|||||||
use super::c::{ENABLE_PROCESSED_INPUT, ENABLE_QUICK_EDIT_MODE};
|
use super::c::{ENABLE_PROCESSED_INPUT, ENABLE_QUICK_EDIT_MODE};
|
||||||
use super::c::CONSOLE_SCREEN_BUFFER_INFO;
|
use super::c::CONSOLE_SCREEN_BUFFER_INFO;
|
||||||
use super::c::{ReadConsoleW, WriteConsoleW, GetConsoleMode, SetConsoleMode};
|
use super::c::{ReadConsoleW, WriteConsoleW, GetConsoleMode, SetConsoleMode};
|
||||||
use super::c::{GetConsoleScreenBufferInfo};
|
use super::c::GetConsoleScreenBufferInfo;
|
||||||
|
|
||||||
fn invalid_encoding() -> IoError {
|
fn invalid_encoding() -> IoError {
|
||||||
IoError {
|
IoError {
|
||||||
|
@ -26,7 +26,7 @@ pub use self::Code::*;
|
|||||||
use abi;
|
use abi;
|
||||||
use ast::{Block, FnDecl, NodeId};
|
use ast::{Block, FnDecl, NodeId};
|
||||||
use ast;
|
use ast;
|
||||||
use ast_map::{Node};
|
use ast_map::Node;
|
||||||
use ast_map;
|
use ast_map;
|
||||||
use codemap::Span;
|
use codemap::Span;
|
||||||
use visit;
|
use visit;
|
||||||
|
@ -14,7 +14,7 @@ use ext::base::*;
|
|||||||
use ext::base;
|
use ext::base;
|
||||||
use feature_gate;
|
use feature_gate;
|
||||||
use parse::token;
|
use parse::token;
|
||||||
use parse::token::{str_to_ident};
|
use parse::token::str_to_ident;
|
||||||
use ptr::P;
|
use ptr::P;
|
||||||
|
|
||||||
pub fn expand_syntax_ext<'cx>(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
pub fn expand_syntax_ext<'cx>(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
|
||||||
|
@ -12,7 +12,7 @@ use ast;
|
|||||||
use ast::{MetaItem, Item, Expr};
|
use ast::{MetaItem, Item, Expr};
|
||||||
use codemap::Span;
|
use codemap::Span;
|
||||||
use ext::base::ExtCtxt;
|
use ext::base::ExtCtxt;
|
||||||
use ext::build::{AstBuilder};
|
use ext::build::AstBuilder;
|
||||||
use ext::deriving::generic::*;
|
use ext::deriving::generic::*;
|
||||||
use ext::deriving::generic::ty::*;
|
use ext::deriving::generic::ty::*;
|
||||||
use ptr::P;
|
use ptr::P;
|
||||||
|
@ -14,7 +14,7 @@ use codemap;
|
|||||||
use diagnostic::SpanHandler;
|
use diagnostic::SpanHandler;
|
||||||
use ext::tt::transcribe::tt_next_token;
|
use ext::tt::transcribe::tt_next_token;
|
||||||
use parse::token;
|
use parse::token;
|
||||||
use parse::token::{str_to_ident};
|
use parse::token::str_to_ident;
|
||||||
|
|
||||||
use std::borrow::{IntoCow, Cow};
|
use std::borrow::{IntoCow, Cow};
|
||||||
use std::char;
|
use std::char;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
pub use self::PathParsingMode::*;
|
pub use self::PathParsingMode::*;
|
||||||
|
|
||||||
use abi;
|
use abi;
|
||||||
use ast::{BareFnTy};
|
use ast::BareFnTy;
|
||||||
use ast::{RegionTyParamBound, TraitTyParamBound, TraitBoundModifier};
|
use ast::{RegionTyParamBound, TraitTyParamBound, TraitBoundModifier};
|
||||||
use ast::{Public, Unsafety};
|
use ast::{Public, Unsafety};
|
||||||
use ast::{Mod, BiAdd, Arg, Arm, Attribute, BindByRef, BindByValue};
|
use ast::{Mod, BiAdd, Arg, Arm, Attribute, BindByRef, BindByValue};
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use ast;
|
use ast;
|
||||||
use parse::{new_parse_sess};
|
use parse::new_parse_sess;
|
||||||
use parse::{ParseSess,string_to_filemap,filemap_to_tts};
|
use parse::{ParseSess,string_to_filemap,filemap_to_tts};
|
||||||
use parse::{new_parser_from_source_str};
|
use parse::new_parser_from_source_str;
|
||||||
use parse::parser::Parser;
|
use parse::parser::Parser;
|
||||||
use parse::token;
|
use parse::token;
|
||||||
use ptr::P;
|
use ptr::P;
|
||||||
|
@ -77,7 +77,7 @@ use std::io::prelude::*;
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::iter::repeat;
|
use std::iter::repeat;
|
||||||
use std::num::{Float, Int};
|
use std::num::{Float, Int};
|
||||||
use std::path::{PathBuf};
|
use std::path::PathBuf;
|
||||||
use std::sync::mpsc::{channel, Sender};
|
use std::sync::mpsc::{channel, Sender};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
extern crate cci_lib;
|
extern crate cci_lib;
|
||||||
use cci_lib::{cci_fn};
|
use cci_lib::cci_fn;
|
||||||
|
|
||||||
fn call1() -> usize {
|
fn call1() -> usize {
|
||||||
cci_fn()
|
cci_fn()
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
extern crate trait_superkinds_in_metadata;
|
extern crate trait_superkinds_in_metadata;
|
||||||
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
|
use trait_superkinds_in_metadata::{RequiresRequiresShareAndSend, RequiresShare};
|
||||||
use trait_superkinds_in_metadata::{RequiresCopy};
|
use trait_superkinds_in_metadata::RequiresCopy;
|
||||||
use std::marker;
|
use std::marker;
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#![allow(unknown_features)]
|
#![allow(unknown_features)]
|
||||||
#![feature(unboxed_closures, old_path, std_misc)]
|
#![feature(unboxed_closures, old_path, std_misc)]
|
||||||
|
|
||||||
use std::old_path::{Path};
|
use std::old_path::Path;
|
||||||
use std::old_path;
|
use std::old_path;
|
||||||
use std::result;
|
use std::result;
|
||||||
use std::thunk::Thunk;
|
use std::thunk::Thunk;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#![feature(unboxed_closures, core)]
|
#![feature(unboxed_closures, core)]
|
||||||
|
|
||||||
use std::ops::{FnMut};
|
use std::ops::FnMut;
|
||||||
|
|
||||||
struct S {
|
struct S {
|
||||||
x: i32,
|
x: i32,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user