File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/doc/unstable-book/src/compiler-flags
tests/codegen-llvm/annotate-moves Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ rustc -Z annotate-moves=false main.rs
5151## Behavior
5252
5353The 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
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const _: () = { assert!(size_of::<Struct99>() == 99) };
1111impl 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
3434struct 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
3838const _: ( ) = { assert ! ( size_of:: <Struct100 >( ) == 100 ) } ;
@@ -60,7 +60,7 @@ pub fn test_100_move() {
6060}
6161
6262struct 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
6666const _: ( ) = { assert ! ( size_of:: <Struct101 >( ) == 101 ) } ;
You can’t perform that action at this time.
0 commit comments