Skip to content

Commit bf5d661

Browse files
Rollup merge of rust-lang#43401 - cuviper:homogeneous, r=Mark-Simulacrum
Correct the spelling of "homogeneous" None
2 parents d1ba747 + 5c6ccdc commit bf5d661

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

src/librustc/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ not apply to structs.
17081708
representation of enums isn't strictly defined in Rust, and this attribute
17091709
won't work on enums.
17101710
1711-
`#[repr(simd)]` will give a struct consisting of a homogenous series of machine
1711+
`#[repr(simd)]` will give a struct consisting of a homogeneous series of machine
17121712
types (i.e. `u8`, `i32`, etc) a representation that permits vectorization via
17131713
SIMD. This doesn't make much sense for enums since they don't consist of a
17141714
single list of data.

src/librustc_trans/abi.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl Uniform {
238238

239239
pub trait LayoutExt<'tcx> {
240240
fn is_aggregate(&self) -> bool;
241-
fn homogenous_aggregate<'a>(&self, ccx: &CrateContext<'a, 'tcx>) -> Option<Reg>;
241+
fn homogeneous_aggregate<'a>(&self, ccx: &CrateContext<'a, 'tcx>) -> Option<Reg>;
242242
}
243243

244244
impl<'tcx> LayoutExt<'tcx> for TyLayout<'tcx> {
@@ -258,7 +258,7 @@ impl<'tcx> LayoutExt<'tcx> for TyLayout<'tcx> {
258258
}
259259
}
260260

261-
fn homogenous_aggregate<'a>(&self, ccx: &CrateContext<'a, 'tcx>) -> Option<Reg> {
261+
fn homogeneous_aggregate<'a>(&self, ccx: &CrateContext<'a, 'tcx>) -> Option<Reg> {
262262
match *self.layout {
263263
// The primitives for this algorithm.
264264
Layout::Scalar { value, .. } |
@@ -291,7 +291,7 @@ impl<'tcx> LayoutExt<'tcx> for TyLayout<'tcx> {
291291

292292
Layout::Array { count, .. } => {
293293
if count > 0 {
294-
self.field(ccx, 0).homogenous_aggregate(ccx)
294+
self.field(ccx, 0).homogeneous_aggregate(ccx)
295295
} else {
296296
None
297297
}
@@ -307,8 +307,8 @@ impl<'tcx> LayoutExt<'tcx> for TyLayout<'tcx> {
307307
}
308308

309309
let field = self.field(ccx, i);
310-
match (result, field.homogenous_aggregate(ccx)) {
311-
// The field itself must be a homogenous aggregate.
310+
match (result, field.homogeneous_aggregate(ccx)) {
311+
// The field itself must be a homogeneous aggregate.
312312
(_, None) => return None,
313313
// If this is the first field, record the unit.
314314
(None, Some(unit)) => {
@@ -344,8 +344,8 @@ impl<'tcx> LayoutExt<'tcx> for TyLayout<'tcx> {
344344

345345
for i in 0..self.field_count() {
346346
let field = self.field(ccx, i);
347-
match (result, field.homogenous_aggregate(ccx)) {
348-
// The field itself must be a homogenous aggregate.
347+
match (result, field.homogeneous_aggregate(ccx)) {
348+
// The field itself must be a homogeneous aggregate.
349349
(_, None) => return None,
350350
// If this is the first field, record the unit.
351351
(None, Some(unit)) => {
@@ -830,7 +830,7 @@ impl<'a, 'tcx> FnType<'tcx> {
830830

831831
let size = arg.layout.size(ccx);
832832

833-
if let Some(unit) = arg.layout.homogenous_aggregate(ccx) {
833+
if let Some(unit) = arg.layout.homogeneous_aggregate(ccx) {
834834
// Replace newtypes with their inner-most type.
835835
if unit.size == size {
836836
// Needs a cast as we've unpacked a newtype.

src/librustc_trans/cabi_aarch64.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use abi::{FnType, ArgType, LayoutExt, Reg, RegKind, Uniform};
1212
use context::CrateContext;
1313

14-
fn is_homogenous_aggregate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tcx>)
14+
fn is_homogeneous_aggregate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tcx>)
1515
-> Option<Uniform> {
16-
arg.layout.homogenous_aggregate(ccx).and_then(|unit| {
16+
arg.layout.homogeneous_aggregate(ccx).and_then(|unit| {
1717
let size = arg.layout.size(ccx);
1818

1919
// Ensure we have at most four uniquely addressable members.
@@ -43,7 +43,7 @@ fn classify_ret_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ret: &mut ArgType<'tc
4343
ret.extend_integer_width_to(32);
4444
return;
4545
}
46-
if let Some(uniform) = is_homogenous_aggregate(ccx, ret) {
46+
if let Some(uniform) = is_homogeneous_aggregate(ccx, ret) {
4747
ret.cast_to(ccx, uniform);
4848
return;
4949
}
@@ -74,7 +74,7 @@ fn classify_arg_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tc
7474
arg.extend_integer_width_to(32);
7575
return;
7676
}
77-
if let Some(uniform) = is_homogenous_aggregate(ccx, arg) {
77+
if let Some(uniform) = is_homogeneous_aggregate(ccx, arg) {
7878
arg.cast_to(ccx, uniform);
7979
return;
8080
}

src/librustc_trans/cabi_asmjs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use context::CrateContext;
1818

1919
fn classify_ret_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ret: &mut ArgType<'tcx>) {
2020
if ret.layout.is_aggregate() {
21-
if let Some(unit) = ret.layout.homogenous_aggregate(ccx) {
21+
if let Some(unit) = ret.layout.homogeneous_aggregate(ccx) {
2222
let size = ret.layout.size(ccx);
2323
if unit.size == size {
2424
ret.cast_to(ccx, Uniform {

src/librustc_trans/cabi_powerpc64.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use abi::{FnType, ArgType, LayoutExt, Reg, RegKind, Uniform};
1616
use context::CrateContext;
1717

18-
fn is_homogenous_aggregate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tcx>)
18+
fn is_homogeneous_aggregate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tcx>)
1919
-> Option<Uniform> {
20-
arg.layout.homogenous_aggregate(ccx).and_then(|unit| {
20+
arg.layout.homogeneous_aggregate(ccx).and_then(|unit| {
2121
let size = arg.layout.size(ccx);
2222

2323
// Ensure we have at most eight uniquely addressable members.
@@ -53,7 +53,7 @@ fn classify_ret_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ret: &mut ArgType<'tc
5353
ret.make_indirect(ccx);
5454
}
5555

56-
if let Some(uniform) = is_homogenous_aggregate(ccx, ret) {
56+
if let Some(uniform) = is_homogeneous_aggregate(ccx, ret) {
5757
ret.cast_to(ccx, uniform);
5858
return;
5959
}
@@ -86,7 +86,7 @@ fn classify_arg_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tc
8686
return;
8787
}
8888

89-
if let Some(uniform) = is_homogenous_aggregate(ccx, arg) {
89+
if let Some(uniform) = is_homogeneous_aggregate(ccx, arg) {
9090
arg.cast_to(ccx, uniform);
9191
return;
9292
}

src/librustc_trans/cabi_sparc64.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
use abi::{FnType, ArgType, LayoutExt, Reg, RegKind, Uniform};
1414
use context::CrateContext;
1515

16-
fn is_homogenous_aggregate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tcx>)
16+
fn is_homogeneous_aggregate<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tcx>)
1717
-> Option<Uniform> {
18-
arg.layout.homogenous_aggregate(ccx).and_then(|unit| {
18+
arg.layout.homogeneous_aggregate(ccx).and_then(|unit| {
1919
let size = arg.layout.size(ccx);
2020

2121
// Ensure we have at most eight uniquely addressable members.
@@ -46,7 +46,7 @@ fn classify_ret_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ret: &mut ArgType<'tc
4646
return;
4747
}
4848

49-
if let Some(uniform) = is_homogenous_aggregate(ccx, ret) {
49+
if let Some(uniform) = is_homogeneous_aggregate(ccx, ret) {
5050
ret.cast_to(ccx, uniform);
5151
return;
5252
}
@@ -80,7 +80,7 @@ fn classify_arg_ty<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, arg: &mut ArgType<'tc
8080
return;
8181
}
8282

83-
if let Some(uniform) = is_homogenous_aggregate(ccx, arg) {
83+
if let Some(uniform) = is_homogeneous_aggregate(ccx, arg) {
8484
arg.cast_to(ccx, uniform);
8585
return;
8686
}

src/librustc_trans/cabi_x86.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn compute_abi_info<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
7474
if arg.is_ignore() || arg.is_indirect() { continue; }
7575

7676
// At this point we know this must be a primitive of sorts.
77-
let unit = arg.layout.homogenous_aggregate(ccx).unwrap();
77+
let unit = arg.layout.homogeneous_aggregate(ccx).unwrap();
7878
let size = arg.layout.size(ccx);
7979
assert_eq!(unit.size, size);
8080
if unit.kind == RegKind::Float {

0 commit comments

Comments
 (0)