Skip to content

Commit 10852ed

Browse files
committed
Fix slice restriction to exclude slice of CxxString
1 parent 4d7e4aa commit 10852ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ fn check_type_ref(cx: &mut Check, ty: &Ref) {
236236
fn check_type_slice_ref(cx: &mut Check, ty: &SliceRef) {
237237
let supported = match &ty.inner {
238238
Type::Str(_) | Type::SliceRef(_) => false,
239-
Type::Ident(ident) => !is_opaque_cxx(cx, &ident.rust),
239+
Type::Ident(ident) => !is_unsized(cx, &ty.inner) || cx.types.rust.contains(&ident.rust),
240240
element => !is_unsized(cx, element),
241241
};
242242

0 commit comments

Comments
 (0)