Skip to content

Commit 7d853ff

Browse files
committed
---
yaml --- r: 191013 b: refs/heads/auto c: 1debe9d h: refs/heads/master i: 191011: 5af50b8 v: v3
1 parent c458e50 commit 7d853ff

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
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: c42067c9e9ac605fc330c3ed11d29477ac251d8a
13+
refs/heads/auto: 1debe9d112010a23c76711f557ee6fdc4728f4ec
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)