Skip to content

Commit 44f0208

Browse files
committed
Auto merge of #30675 - jimmantooth:master, r=apasel422
2 parents d4b67cd + 877d55c commit 44f0208

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/libstd/panic.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ pub use panicking::{take_handler, set_handler, PanicInfo, Location};
4141
/// panics.
4242
/// 2. This broken invariant is then later observed.
4343
///
44-
/// Typically in Rust it is difficult to perform step (2) because catching a
44+
/// Typically in Rust, it is difficult to perform step (2) because catching a
4545
/// panic involves either spawning a thread (which in turns makes it difficult
4646
/// to later witness broken invariants) or using the `recover` function in this
47-
/// module. Additionally, even if an invariant is witness, it typically isn't a
47+
/// module. Additionally, even if an invariant is witnessed, it typically isn't a
4848
/// problem in Rust because there's no uninitialized values (like in C or C++).
4949
///
5050
/// It is possible, however, for **logical** invariants to be broken in Rust,
5151
/// which can end up causing behavioral bugs. Another key aspect of panic safety
52-
/// in Rust is that in the absence of `unsafe` code, a panic cannot lead to
52+
/// in Rust is that, in the absence of `unsafe` code, a panic cannot lead to
5353
/// memory unsafety.
5454
///
5555
/// That was a bit of a whirlwind tour of panic safety, but for more information
@@ -60,12 +60,12 @@ pub use panicking::{take_handler, set_handler, PanicInfo, Location};
6060
/// ## What is `RecoverSafe`?
6161
///
6262
/// Now that we've got an idea of what panic safety is in Rust, it's also
63-
/// important to understand that this trait represents. As mentioned above, one
63+
/// important to understand what this trait represents. As mentioned above, one
6464
/// way to witness broken invariants is through the `recover` function in this
6565
/// module as it allows catching a panic and then re-using the environment of
6666
/// the closure.
6767
///
68-
/// Simply but, a type `T` implements `RecoverSafe` if it cannot easily allow
68+
/// Simply put, a type `T` implements `RecoverSafe` if it cannot easily allow
6969
/// witnessing a broken invariant through the use of `recover` (catching a
7070
/// panic). This trait is a marker trait, so it is automatically implemented for
7171
/// many types, and it is also structurally composed (e.g. a struct is recover
@@ -180,7 +180,7 @@ impl<T: RefRecoverSafe + ?Sized> RecoverSafe for Arc<T> {}
180180
// Pretty simple implementations for the `RefRecoverSafe` marker trait,
181181
// basically just saying that this is a marker trait and `UnsafeCell` is the
182182
// only thing which doesn't implement it (which then transitively applies to
183-
// everything else.
183+
// everything else).
184184
impl RefRecoverSafe for .. {}
185185
impl<T: ?Sized> !RefRecoverSafe for UnsafeCell<T> {}
186186
impl<T> RefRecoverSafe for AssertRecoverSafe<T> {}

src/libsyntax/ast.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ pub struct AngleBracketedParameterData {
334334
/// The type parameters for this path segment, if present.
335335
pub types: P<[P<Ty>]>,
336336
/// Bindings (equality constraints) on associated types, if present.
337-
/// E.g., `Foo<A=Bar>`.
337+
/// e.g., `Foo<A=Bar>`.
338338
pub bindings: P<[P<TypeBinding>]>,
339339
}
340340

@@ -447,15 +447,15 @@ pub struct WhereClause {
447447
/// A single predicate in a `where` clause
448448
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
449449
pub enum WherePredicate {
450-
/// A type binding, eg `for<'c> Foo: Send+Clone+'c`
450+
/// A type binding, e.g. `for<'c> Foo: Send+Clone+'c`
451451
BoundPredicate(WhereBoundPredicate),
452452
/// A lifetime predicate, e.g. `'a: 'b+'c`
453453
RegionPredicate(WhereRegionPredicate),
454454
/// An equality predicate (unsupported)
455455
EqPredicate(WhereEqPredicate),
456456
}
457457

458-
/// A type bound, eg `for<'c> Foo: Send+Clone+'c`
458+
/// A type bound, e.g. `for<'c> Foo: Send+Clone+'c`
459459
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
460460
pub struct WhereBoundPredicate {
461461
pub span: Span,
@@ -1095,7 +1095,7 @@ impl Delimited {
10951095
}
10961096
}
10971097

1098-
/// A sequence of token treesee
1098+
/// A sequence of token trees
10991099
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
11001100
pub struct SequenceRepetition {
11011101
/// The sequence of token trees
@@ -1346,7 +1346,7 @@ pub struct MethodSig {
13461346
}
13471347

13481348
/// Represents a method declaration in a trait declaration, possibly including
1349-
/// a default implementation A trait method is either required (meaning it
1349+
/// a default implementation. A trait method is either required (meaning it
13501350
/// doesn't have an implementation, just a signature) or provided (meaning it
13511351
/// has a default implementation).
13521352
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]

0 commit comments

Comments
 (0)