mirror of
https://github.com/topjohnwu/cxx.git
synced 2025-03-02 05:26:37 +00:00
Fix slice restriction to exclude slice of CxxString
This commit is contained in:
parent
4d7e4aa3a8
commit
10852ed506
@ -236,7 +236,7 @@ fn check_type_ref(cx: &mut Check, ty: &Ref) {
|
||||
fn check_type_slice_ref(cx: &mut Check, ty: &SliceRef) {
|
||||
let supported = match &ty.inner {
|
||||
Type::Str(_) | Type::SliceRef(_) => false,
|
||||
Type::Ident(ident) => !is_opaque_cxx(cx, &ident.rust),
|
||||
Type::Ident(ident) => !is_unsized(cx, &ty.inner) || cx.types.rust.contains(&ident.rust),
|
||||
element => !is_unsized(cx, element),
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user