Skip to content

Commit 4813fe8

Browse files
committed
Proofread fixes
1 parent 3f7e412 commit 4813fe8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/doc/unstable-book/src/compiler-flags/annotate-moves.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ rustc -Z annotate-moves=false main.rs
5151
## Behavior
5252

5353
The annotation only applies to:
54-
- Types larger than the specified size threshold
54+
- Types equal or larger than the specified size threshold
5555
- Non-immediate types (those that would generate `memcpy`)
5656
- Operations that actually move/copy data (not ZST types)
5757

tests/codegen-llvm/annotate-moves/size-limit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const _: () = { assert!(size_of::<Struct99>() == 99) };
1111
impl Clone for Struct99 {
1212
// CHECK-LABEL: <size_limit::Struct99 as core::clone::Clone>::clone
1313
fn clone(&self) -> Self {
14-
// Should NOT be annotated since 80 < 100
14+
// Should NOT be annotated since 99 < 100
1515
// CHECK: call void @llvm.memcpy{{.*}}, !dbg ![[#SZ99_COPY_LOC:]]
1616
Struct99 { data: self.data }
1717
}
@@ -32,7 +32,7 @@ pub fn test_99_move() {
3232
}
3333

3434
struct Struct100 {
35-
data: [u8; 100], // 160 bytes - above custom 100-byte threshold
35+
data: [u8; 100], // 100 bytes - equal to custom 100-byte threshold
3636
}
3737

3838
const _: () = { assert!(size_of::<Struct100>() == 100) };
@@ -60,7 +60,7 @@ pub fn test_100_move() {
6060
}
6161

6262
struct Struct101 {
63-
data: [u8; 101], // 160 bytes - above custom 101-byte threshold
63+
data: [u8; 101], // 101 bytes - above custom 100-byte threshold
6464
}
6565

6666
const _: () = { assert!(size_of::<Struct101>() == 101) };

0 commit comments

Comments
 (0)