Skip to content

Commit fae4157

Browse files
committed
---
yaml --- r: 187718 b: refs/heads/tmp c: 27747ac h: refs/heads/master v: v3
1 parent 6bf38ea commit fae4157

File tree

18 files changed

+29
-29
lines changed

18 files changed

+29
-29
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: c9ace059e707392ceec46619ed032e93e6256dd5
37+
refs/heads/tmp: 27747ac1a76f054275c75a5b3f867d09cd27c888
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/tmp/src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ fn item_to_def_like(item: rbml::Doc, did: ast::DefId, cnum: ast::CrateNum)
357357
let enum_did = item_reqd_and_translated_parent_item(cnum, item);
358358
DlDef(def::DefVariant(enum_did, did, false))
359359
}
360-
Trait => DlDef(def::DefaultImpl(did)),
360+
Trait => DlDef(def::DefTrait(did)),
361361
Enum => DlDef(def::DefTy(did, true)),
362362
Impl | DefaultImpl => DlImpl(did),
363363
PublicField | InheritedField => DlField,

branches/tmp/src/librustc/middle/astencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ impl tr for def::Def {
440440
def::DefVariant(e_did, v_did, is_s) => {
441441
def::DefVariant(e_did.tr(dcx), v_did.tr(dcx), is_s)
442442
},
443-
def::DefaultImpl(did) => def::DefaultImpl(did.tr(dcx)),
443+
def::DefTrait(did) => def::DefTrait(did.tr(dcx)),
444444
def::DefTy(did, is_enum) => def::DefTy(did.tr(dcx), is_enum),
445445
def::DefAssociatedTy(did) => def::DefAssociatedTy(did.tr(dcx)),
446446
def::DefAssociatedPath(def::TyParamProvenance::FromSelf(did), ident) =>

branches/tmp/src/librustc/middle/def.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub enum Def {
3838
// type `U` (indicated by the Ident).
3939
// FIXME(#20301) -- should use Name
4040
DefAssociatedPath(TyParamProvenance, ast::Ident),
41-
DefaultImpl(ast::DefId),
41+
DefTrait(ast::DefId),
4242
DefPrimTy(ast::PrimTy),
4343
DefTyParam(ParamSpace, u32, ast::DefId, ast::Name),
4444
DefUse(ast::DefId),
@@ -135,7 +135,7 @@ impl Def {
135135
DefFn(id, _) | DefStaticMethod(id, _) | DefMod(id) |
136136
DefForeignMod(id) | DefStatic(id, _) |
137137
DefVariant(_, id, _) | DefTy(id, _) | DefAssociatedTy(id) |
138-
DefTyParam(_, _, id, _) | DefUse(id) | DefStruct(id) | DefaultImpl(id) |
138+
DefTyParam(_, _, id, _) | DefUse(id) | DefStruct(id) | DefTrait(id) |
139139
DefMethod(id, _, _) | DefConst(id) |
140140
DefAssociatedPath(TyParamProvenance::FromSelf(id), _) |
141141
DefAssociatedPath(TyParamProvenance::FromParam(id), _) => {

branches/tmp/src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ impl<'t,'tcx,TYPER:Typer<'tcx>> MemCategorizationContext<'t,TYPER> {
579579
Ok(self.cat_rvalue_node(id, span, expr_ty))
580580
}
581581
def::DefMod(_) | def::DefForeignMod(_) | def::DefUse(_) |
582-
def::DefaultImpl(_) | def::DefTy(..) | def::DefPrimTy(_) |
582+
def::DefTrait(_) | def::DefTy(..) | def::DefPrimTy(_) |
583583
def::DefTyParam(..) | def::DefTyParamBinder(..) | def::DefRegion(_) |
584584
def::DefLabel(_) | def::DefSelfTy(..) |
585585
def::DefAssociatedTy(..) | def::DefAssociatedPath(..)=> {

branches/tmp/src/librustc/middle/resolve_lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
169169
// if this path references a trait, then this will resolve to
170170
// a trait ref, which introduces a binding scope.
171171
match self.def_map.borrow().get(&id) {
172-
Some(&def::DefaultImpl(..)) => {
172+
Some(&def::DefTrait(..)) => {
173173
self.with(LateScope(&Vec::new(), self.scope), |_, this| {
174174
this.visit_path(path, id);
175175
});

branches/tmp/src/librustc_privacy/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ impl<'a, 'tcx> PrivacyVisitor<'a, 'tcx> {
802802
def::DefVariant(..) => ck("variant"),
803803
def::DefTy(_, false) => ck("type"),
804804
def::DefTy(_, true) => ck("enum"),
805-
def::DefaultImpl(..) => ck("trait"),
805+
def::DefTrait(..) => ck("trait"),
806806
def::DefStruct(..) => ck("struct"),
807807
def::DefMethod(_, Some(..), _) => ck("trait method"),
808808
def::DefMethod(..) => ck("method"),

branches/tmp/src/librustc_resolve/build_reduced_graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
736736
self.trait_item_map.insert((name, def_id), kind);
737737
}
738738

739-
name_bindings.define_type(DefaultImpl(def_id), sp, modifiers);
739+
name_bindings.define_type(DefTrait(def_id), sp, modifiers);
740740
parent.clone()
741741
}
742742
ItemMac(..) => parent.clone()
@@ -918,7 +918,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
918918
}
919919
child_name_bindings.define_value(def, DUMMY_SP, modifiers);
920920
}
921-
DefaultImpl(def_id) => {
921+
DefTrait(def_id) => {
922922
debug!("(building reduced graph for external \
923923
crate) building type {}", final_ident);
924924

branches/tmp/src/librustc_resolve/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2989,7 +2989,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
29892989
// check for imports shadowing primitive types
29902990
if let ast::ViewPathSimple(ident, _) = view_path.node {
29912991
match self.def_map.borrow().get(&item.id) {
2992-
Some(&DefTy(..)) | Some(&DefStruct(..)) | Some(&DefaultImpl(..)) | None => {
2992+
Some(&DefTy(..)) | Some(&DefStruct(..)) | Some(&DefTrait(..)) | None => {
29932993
self.check_if_primitive_type_name(ident.name, item.span);
29942994
}
29952995
_ => {}
@@ -3199,7 +3199,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
31993199
}
32003200
Some(def) => {
32013201
match def {
3202-
(DefaultImpl(_), _) => {
3202+
(DefTrait(_), _) => {
32033203
debug!("(resolving trait) found trait def: {:?}", def);
32043204
self.record_def(trait_reference.ref_id, def);
32053205
}
@@ -4675,7 +4675,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
46754675
None => continue
46764676
};
46774677
let trait_def_id = match def {
4678-
DefaultImpl(trait_def_id) => trait_def_id,
4678+
DefTrait(trait_def_id) => trait_def_id,
46794679
_ => continue,
46804680
};
46814681
if self.trait_item_map.contains_key(&(name, trait_def_id)) {
@@ -4691,7 +4691,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
46914691
Some(target) => target,
46924692
};
46934693
let did = match target.bindings.def_for_namespace(TypeNS) {
4694-
Some(DefaultImpl(trait_def_id)) => trait_def_id,
4694+
Some(DefTrait(trait_def_id)) => trait_def_id,
46954695
Some(..) | None => continue,
46964696
};
46974697
if self.trait_item_map.contains_key(&(name, did)) {

branches/tmp/src/librustc_trans/save/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
239239
def::DefTy(..) |
240240
def::DefAssociatedTy(..) |
241241
def::DefAssociatedPath(..) |
242-
def::DefaultImpl(_) => Some(recorder::TypeRef),
242+
def::DefTrait(_) => Some(recorder::TypeRef),
243243
def::DefStatic(_, _) |
244244
def::DefConst(_) |
245245
def::DefLocal(_) |

branches/tmp/src/librustc_trans/trans/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ fn trans<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, expr: &ast::Expr)
207207
def::DefUpvar(..) => {
208208
datum_callee(bcx, ref_expr)
209209
}
210-
def::DefMod(..) | def::DefForeignMod(..) | def::DefaultImpl(..) |
210+
def::DefMod(..) | def::DefForeignMod(..) | def::DefTrait(..) |
211211
def::DefTy(..) | def::DefPrimTy(..) | def::DefAssociatedTy(..) |
212212
def::DefUse(..) | def::DefTyParamBinder(..) |
213213
def::DefRegion(..) | def::DefLabel(..) | def::DefTyParam(..) |

branches/tmp/src/librustc_typeck/astconv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ pub fn instantiate_trait_ref<'tcx>(
600600
-> Rc<ty::TraitRef<'tcx>>
601601
{
602602
match ::lookup_def_tcx(this.tcx(), ast_trait_ref.path.span, ast_trait_ref.ref_id) {
603-
def::DefaultImpl(trait_def_id) => {
603+
def::DefTrait(trait_def_id) => {
604604
let trait_ref = ast_path_to_trait_ref(this,
605605
rscope,
606606
trait_def_id,
@@ -914,7 +914,7 @@ fn ast_ty_to_trait_ref<'tcx>(this: &AstConv<'tcx>,
914914
match ty.node {
915915
ast::TyPath(ref path, id) => {
916916
match this.tcx().def_map.borrow().get(&id) {
917-
Some(&def::DefaultImpl(trait_def_id)) => {
917+
Some(&def::DefTrait(trait_def_id)) => {
918918
let mut projection_bounds = Vec::new();
919919
let trait_ref = object_path_to_poly_trait_ref(this,
920920
rscope,
@@ -1194,7 +1194,7 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>,
11941194
Some(&d) => d
11951195
};
11961196
match a_def {
1197-
def::DefaultImpl(trait_def_id) => {
1197+
def::DefTrait(trait_def_id) => {
11981198
// N.B. this case overlaps somewhat with
11991199
// TyObjectSum, see that fn for details
12001200
let mut projection_bounds = Vec::new();
@@ -1804,7 +1804,7 @@ pub fn partition_bounds<'a>(tcx: &ty::ctxt,
18041804
match *ast_bound {
18051805
ast::TraitTyParamBound(ref b, ast::TraitBoundModifier::None) => {
18061806
match ::lookup_def_tcx(tcx, b.trait_ref.path.span, b.trait_ref.ref_id) {
1807-
def::DefaultImpl(trait_did) => {
1807+
def::DefTrait(trait_did) => {
18081808
match trait_def_ids.get(&trait_did) {
18091809
// Already seen this trait. We forbid
18101810
// duplicates in the list (for some

branches/tmp/src/librustc_typeck/check/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ pub fn check_pat_struct<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>, pat: &'tcx ast::Pat,
435435

436436
let def = tcx.def_map.borrow()[pat.id].clone();
437437
let (enum_def_id, variant_def_id) = match def {
438-
def::DefaultImpl(_) => {
438+
def::DefTrait(_) => {
439439
let name = pprust::path_to_string(path);
440440
span_err!(tcx.sess, pat.span, E0168,
441441
"use of trait `{}` in a struct pattern", name);

branches/tmp/src/librustc_typeck/check/method/suggest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ pub fn all_traits<'a>(ccx: &'a CrateCtxt) -> AllTraits<'a> {
330330
cstore: &cstore::CStore,
331331
dl: decoder::DefLike) {
332332
match dl {
333-
decoder::DlDef(def::DefaultImpl(did)) => {
333+
decoder::DlDef(def::DefTrait(did)) => {
334334
traits.push(TraitInfo::new(did));
335335
}
336336
decoder::DlDef(def::DefMod(did)) => {

branches/tmp/src/librustc_typeck/check/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3862,7 +3862,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
38623862
variant_id, &fields[..]);
38633863
enum_id
38643864
}
3865-
Some(def::DefaultImpl(def_id)) => {
3865+
Some(def::DefTrait(def_id)) => {
38663866
span_err!(tcx.sess, path.span, E0159,
38673867
"use of trait `{}` as a struct constructor",
38683868
pprust::path_to_string(path));
@@ -4634,7 +4634,7 @@ fn type_scheme_and_predicates_for_def<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
46344634
def::DefStruct(id) | def::DefConst(id) => {
46354635
(ty::lookup_item_type(fcx.tcx(), id), ty::lookup_predicates(fcx.tcx(), id))
46364636
}
4637-
def::DefaultImpl(_) |
4637+
def::DefTrait(_) |
46384638
def::DefTy(..) |
46394639
def::DefAssociatedTy(..) |
46404640
def::DefAssociatedPath(..) |
@@ -4738,7 +4738,7 @@ pub fn instantiate_path<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
47384738
def::DefTy(..) |
47394739
def::DefAssociatedTy(..) |
47404740
def::DefAssociatedPath(..) |
4741-
def::DefaultImpl(..) |
4741+
def::DefTrait(..) |
47424742
def::DefPrimTy(..) |
47434743
def::DefTyParam(..) => {
47444744
// Everything but the final segment should have no

branches/tmp/src/librustdoc/clean/inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn try_inline_def(cx: &DocContext, tcx: &ty::ctxt,
6969
let mut ret = Vec::new();
7070
let did = def.def_id();
7171
let inner = match def {
72-
def::DefaultImpl(did) => {
72+
def::DefTrait(did) => {
7373
record_extern_fqn(cx, did, clean::TypeTrait);
7474
clean::TraitItem(build_external_trait(cx, tcx, did))
7575
}

branches/tmp/src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ fn register_def(cx: &DocContext, def: def::Def) -> ast::DefId {
24302430
def::DefFn(i, _) => (i, TypeFunction),
24312431
def::DefTy(i, false) => (i, TypeTypedef),
24322432
def::DefTy(i, true) => (i, TypeEnum),
2433-
def::DefaultImpl(i) => (i, TypeTrait),
2433+
def::DefTrait(i) => (i, TypeTrait),
24342434
def::DefStruct(i) => (i, TypeStruct),
24352435
def::DefMod(i) => (i, TypeModule),
24362436
def::DefStatic(i, _) => (i, TypeStatic),

branches/tmp/src/libstd/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ impl Stdio {
355355
pub fn capture() -> Stdio { Stdio(StdioImp::Capture) }
356356

357357
/// The child inherits from the corresponding parent descriptor.
358-
pub fn inherit() -> Stdio { Stdio(StdioImp::Inherit) }
358+
pub fn inherit() -> Stdio { Stdio(StdioImp::Capture) }
359359

360360
/// This stream will be ignored. This is the equivalent of attaching the
361361
/// stream to `/dev/null`
362-
pub fn null() -> Stdio { Stdio(StdioImp::Null) }
362+
pub fn null() -> Stdio { Stdio(StdioImp::Capture) }
363363
}
364364

365365
/// Describes the result of a process after it has terminated.

0 commit comments

Comments
 (0)