Skip to content

Commit 75ea7c7

Browse files
committed
typos and spaces
1 parent 0354510 commit 75ea7c7

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/librustc/mir/interpret/value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<'tcx> ConstValue<'tcx> {
8484
/// size. Like a range of bytes in an `Allocation`, a `Scalar` can either represent the raw bytes
8585
/// of a simple value or a pointer into another `Allocation`
8686
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, RustcEncodable, RustcDecodable, Hash)]
87-
pub enum Scalar<Tag=(),Id=AllocId> {
87+
pub enum Scalar<Tag=(), Id=AllocId> {
8888
/// The raw bytes of a simple value.
8989
Bits {
9090
/// The first `size` bytes are the value.
@@ -96,7 +96,7 @@ pub enum Scalar<Tag=(),Id=AllocId> {
9696
/// A pointer into an `Allocation`. An `Allocation` in the `memory` module has a list of
9797
/// relocations, but a `Scalar` is only large enough to contain one, so we just represent the
9898
/// relocation and its associated offset together as a `Pointer` here.
99-
Ptr(Pointer<Tag,Id>),
99+
Ptr(Pointer<Tag, Id>),
100100
}
101101

102102
impl<'tcx> Scalar<()> {

src/librustc_mir/interpret/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
765765
// SAFE: The above indexing would have panicked if there weren't at least `size` bytes
766766
// behind `src` and `dest`. Also, we use the overlapping-safe `ptr::copy` if `src` and
767767
// `dest` could possibly overlap.
768-
// The pointers above remain valid even if the `HashMap` table moved around because they
768+
// The pointers above remain valid even if the `HashMap` table is moved around because they
769769
// point into the `Vec` storing the bytes.
770770
unsafe {
771771
assert_eq!(size.bytes() as usize as u64, size.bytes());

src/librustc_mir/interpret/operand.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ use rustc::mir::interpret::{
2525
use super::{EvalContext, Machine, MemPlace, MPlaceTy, MemoryKind};
2626

2727
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, RustcEncodable, RustcDecodable, Hash)]
28-
pub enum ScalarMaybeUndef<Tag=(),Id=AllocId> {
29-
Scalar(Scalar<Tag,Id>),
28+
pub enum ScalarMaybeUndef<Tag=(), Id=AllocId> {
29+
Scalar(Scalar<Tag, Id>),
3030
Undef,
3131
}
3232

@@ -147,9 +147,9 @@ impl<'tcx, Tag> ScalarMaybeUndef<Tag> {
147147
/// In particular, thanks to `ScalarPair`, arithmetic operations and casts can be entirely
148148
/// defined on `Value`, and do not have to work with a `Place`.
149149
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
150-
pub enum Value<Tag=(),Id=AllocId> {
151-
Scalar(ScalarMaybeUndef<Tag,Id>),
152-
ScalarPair(ScalarMaybeUndef<Tag,Id>, ScalarMaybeUndef<Tag,Id>),
150+
pub enum Value<Tag=(), Id=AllocId> {
151+
Scalar(ScalarMaybeUndef<Tag, Id>),
152+
ScalarPair(ScalarMaybeUndef<Tag, Id>, ScalarMaybeUndef<Tag, Id>),
153153
}
154154

155155
impl Value {

src/librustc_mir/interpret/snapshot.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ macro_rules! impl_snapshot_for {
110110
impl<'a, Ctx> self::Snapshot<'a, Ctx> for $enum_name
111111
where Ctx: self::SnapshotContext<'a>,
112112
{
113-
type Item = $enum_name<(),AllocIdSnapshot<'a>>;
113+
type Item = $enum_name<(), AllocIdSnapshot<'a>>;
114114

115115
#[inline]
116116
fn snapshot(&self, __ctx: &'a Ctx) -> Self::Item {
@@ -131,7 +131,7 @@ macro_rules! impl_snapshot_for {
131131
impl<'a, Ctx> self::Snapshot<'a, Ctx> for $struct_name
132132
where Ctx: self::SnapshotContext<'a>,
133133
{
134-
type Item = $struct_name<(),AllocIdSnapshot<'a>>;
134+
type Item = $struct_name<(), AllocIdSnapshot<'a>>;
135135

136136
#[inline]
137137
fn snapshot(&self, __ctx: &'a Ctx) -> Self::Item {
@@ -183,7 +183,7 @@ impl_snapshot_for!(struct Pointer {
183183
impl<'a, Ctx> Snapshot<'a, Ctx> for Scalar
184184
where Ctx: SnapshotContext<'a>,
185185
{
186-
type Item = Scalar<(),AllocIdSnapshot<'a>>;
186+
type Item = Scalar<(), AllocIdSnapshot<'a>>;
187187

188188
fn snapshot(&self, ctx: &'a Ctx) -> Self::Item {
189189
match self {
@@ -237,7 +237,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for Place {
237237
impl<'a, Ctx> Snapshot<'a, Ctx> for Place
238238
where Ctx: SnapshotContext<'a>,
239239
{
240-
type Item = Place<(),AllocIdSnapshot<'a>>;
240+
type Item = Place<(), AllocIdSnapshot<'a>>;
241241

242242
fn snapshot(&self, ctx: &'a Ctx) -> Self::Item {
243243
match self {
@@ -281,7 +281,7 @@ impl_snapshot_for!(enum LocalValue {
281281
impl<'a, Ctx> Snapshot<'a, Ctx> for Relocations
282282
where Ctx: SnapshotContext<'a>,
283283
{
284-
type Item = Relocations<(),AllocIdSnapshot<'a>>;
284+
type Item = Relocations<(), AllocIdSnapshot<'a>>;
285285

286286
fn snapshot(&self, ctx: &'a Ctx) -> Self::Item {
287287
Relocations::from_presorted(self.iter()
@@ -293,7 +293,7 @@ impl<'a, Ctx> Snapshot<'a, Ctx> for Relocations
293293
#[derive(Eq, PartialEq)]
294294
struct AllocationSnapshot<'a> {
295295
bytes: &'a [u8],
296-
relocations: Relocations<(),AllocIdSnapshot<'a>>,
296+
relocations: Relocations<(), AllocIdSnapshot<'a>>,
297297
undef_mask: &'a UndefMask,
298298
align: &'a Align,
299299
mutability: &'a Mutability,
@@ -337,8 +337,8 @@ struct FrameSnapshot<'a, 'tcx: 'a> {
337337
instance: &'a ty::Instance<'tcx>,
338338
span: &'a Span,
339339
return_to_block: &'a StackPopCleanup,
340-
return_place: Place<(),AllocIdSnapshot<'a>>,
341-
locals: IndexVec<mir::Local, LocalValue<(),AllocIdSnapshot<'a>>>,
340+
return_place: Place<(), AllocIdSnapshot<'a>>,
341+
locals: IndexVec<mir::Local, LocalValue<(), AllocIdSnapshot<'a>>>,
342342
block: &'a mir::BasicBlock,
343343
stmt: usize,
344344
}

0 commit comments

Comments
 (0)