Skip to content

Commit 77cdd58

Browse files
committed
---
yaml --- r: 193919 b: refs/heads/beta c: 1debe9d h: refs/heads/master i: 193917: dd32a55 193915: f05fef4 193911: d2bdfd3 193903: fb3abf6 193887: 213897c 193855: ba352ca 193791: 585aa98 v: v3
1 parent d4bbef1 commit 77cdd58

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: c42067c9e9ac605fc330c3ed11d29477ac251d8a
34+
refs/heads/beta: 1debe9d112010a23c76711f557ee6fdc4728f4ec
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/src/libsyntax/ast.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl PartialEq for Ident {
150150

151151
/// A SyntaxContext represents a chain of macro-expandings
152152
/// and renamings. Each macro expansion corresponds to
153-
/// a fresh usize
153+
/// a fresh u32
154154
155155
// I'm representing this syntax context as an index into
156156
// a table, in order to work around a compiler bug
@@ -216,6 +216,7 @@ pub struct Lifetime {
216216
}
217217

218218
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
219+
/// A lifetime definition, eg `'a: 'b+'c+'d`
219220
pub struct LifetimeDef {
220221
pub lifetime: Lifetime,
221222
pub bounds: Vec<Lifetime>
@@ -251,7 +252,9 @@ pub struct PathSegment {
251252

252253
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
253254
pub enum PathParameters {
255+
/// The `<'a, A,B,C>` in `foo::bar::baz::<'a, A,B,C>`
254256
AngleBracketedParameters(AngleBracketedParameterData),
257+
/// The `(A,B)` and `C` in `Foo(A,B) -> C`
255258
ParenthesizedParameters(ParenthesizedParameterData),
256259
}
257260

@@ -436,34 +439,45 @@ impl Generics {
436439
}
437440
}
438441

442+
/// A `where` clause in a definition
439443
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
440444
pub struct WhereClause {
441445
pub id: NodeId,
442446
pub predicates: Vec<WherePredicate>,
443447
}
444448

449+
/// A single predicate in a `where` clause
445450
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
446451
pub enum WherePredicate {
452+
/// A type binding, eg `for<'c> Foo: Send+Clone+'c`
447453
BoundPredicate(WhereBoundPredicate),
454+
/// A lifetime predicate, e.g. `'a: 'b+'c`
448455
RegionPredicate(WhereRegionPredicate),
456+
/// An equality predicate (unsupported)
449457
EqPredicate(WhereEqPredicate)
450458
}
451459

460+
/// A type bound, eg `for<'c> Foo: Send+Clone+'c`
452461
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
453462
pub struct WhereBoundPredicate {
454463
pub span: Span,
464+
/// Any lifetimes from a `for` binding
455465
pub bound_lifetimes: Vec<LifetimeDef>,
466+
/// The type being bounded
456467
pub bounded_ty: P<Ty>,
468+
/// Trait and lifetime bounds (`Clone+Send+'static`)
457469
pub bounds: OwnedSlice<TyParamBound>,
458470
}
459471

472+
/// A lifetime predicate, e.g. `'a: 'b+'c`
460473
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
461474
pub struct WhereRegionPredicate {
462475
pub span: Span,
463476
pub lifetime: Lifetime,
464477
pub bounds: Vec<Lifetime>,
465478
}
466479

480+
/// An equality predicate (unsupported), e.g. `T=int`
467481
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
468482
pub struct WhereEqPredicate {
469483
pub id: NodeId,

0 commit comments

Comments
 (0)