File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -112,28 +112,28 @@ fn size_of_val() {
112
112
}
113
113
114
114
#[ test]
115
- fn min_align_of_val ( ) {
115
+ fn align_of_val ( ) {
116
116
check_number (
117
117
r#"
118
118
//- minicore: coerce_unsized
119
119
#[rustc_intrinsic]
120
- pub fn min_align_of_val <T: ?Sized>(_: *const T) -> usize;
120
+ pub fn align_of_val <T: ?Sized>(_: *const T) -> usize;
121
121
122
122
struct X(i32, u8);
123
123
124
- const GOAL: usize = min_align_of_val (&X(1, 2));
124
+ const GOAL: usize = align_of_val (&X(1, 2));
125
125
"# ,
126
126
4 ,
127
127
) ;
128
128
check_number (
129
129
r#"
130
130
//- minicore: coerce_unsized
131
131
#[rustc_intrinsic]
132
- pub fn min_align_of_val <T: ?Sized>(_: *const T) -> usize;
132
+ pub fn align_of_val <T: ?Sized>(_: *const T) -> usize;
133
133
134
134
const GOAL: usize = {
135
135
let x: &[i32] = &[1, 2, 3];
136
- min_align_of_val (x)
136
+ align_of_val (x)
137
137
};
138
138
"# ,
139
139
4 ,
Original file line number Diff line number Diff line change @@ -761,7 +761,7 @@ impl Evaluator<'_> {
761
761
let size = self . size_of_sized ( ty, locals, "size_of arg" ) ?;
762
762
destination. write_from_bytes ( self , & size. to_le_bytes ( ) [ 0 ..destination. size ] )
763
763
}
764
- "min_align_of" | "pref_align_of " => {
764
+ "align_of " => {
765
765
let Some ( ty) =
766
766
generic_args. as_slice ( Interner ) . first ( ) . and_then ( |it| it. ty ( Interner ) )
767
767
else {
@@ -793,17 +793,17 @@ impl Evaluator<'_> {
793
793
destination. write_from_bytes ( self , & size. to_le_bytes ( ) )
794
794
}
795
795
}
796
- "min_align_of_val " => {
796
+ "align_of_val " => {
797
797
let Some ( ty) =
798
798
generic_args. as_slice ( Interner ) . first ( ) . and_then ( |it| it. ty ( Interner ) )
799
799
else {
800
800
return Err ( MirEvalError :: InternalError (
801
- "min_align_of_val generic arg is not provided" . into ( ) ,
801
+ "align_of_val generic arg is not provided" . into ( ) ,
802
802
) ) ;
803
803
} ;
804
804
let [ arg] = args else {
805
805
return Err ( MirEvalError :: InternalError (
806
- "min_align_of_val args are not provided" . into ( ) ,
806
+ "align_of_val args are not provided" . into ( ) ,
807
807
) ) ;
808
808
} ;
809
809
if let Some ( ( _, align) ) = self . size_align_of ( ty, locals) ? {
You can’t perform that action at this time.
0 commit comments