Sema: allow @ptrCast of slices changing the length
Also, refactor `Sema.ptrCastFull` to not be a horrifying hellscape.
This commit is contained in:
@@ -20,6 +20,7 @@ pub const panic = struct {
|
||||
pub const outOfBounds = no_panic.outOfBounds;
|
||||
pub const startGreaterThanEnd = no_panic.startGreaterThanEnd;
|
||||
pub const inactiveUnionField = no_panic.inactiveUnionField;
|
||||
pub const sliceCastLenRemainder = no_panic.sliceCastLenRemainder;
|
||||
pub const reachedUnreachable = no_panic.reachedUnreachable;
|
||||
pub const unwrapNull = no_panic.unwrapNull;
|
||||
pub const castToNull = no_panic.castToNull;
|
||||
@@ -66,6 +67,7 @@ pub const panic = struct {
|
||||
pub const outOfBounds = no_panic.outOfBounds;
|
||||
pub const startGreaterThanEnd = no_panic.startGreaterThanEnd;
|
||||
pub const inactiveUnionField = no_panic.inactiveUnionField;
|
||||
pub const sliceCastLenRemainder = no_panic.sliceCastLenRemainder;
|
||||
pub const reachedUnreachable = no_panic.reachedUnreachable;
|
||||
pub const unwrapNull = no_panic.unwrapNull;
|
||||
pub const castToNull = no_panic.castToNull;
|
||||
@@ -112,7 +114,7 @@ pub const panic = struct {
|
||||
pub const outOfBounds = std.debug.no_panic.outOfBounds;
|
||||
pub const startGreaterThanEnd = std.debug.no_panic.startGreaterThanEnd;
|
||||
pub const inactiveUnionField = std.debug.no_panic.inactiveUnionField;
|
||||
pub const messages = std.debug.no_panic.messages;
|
||||
pub const sliceCastLenRemainder = no_panic.sliceCastLenRemainder;
|
||||
pub const reachedUnreachable = no_panic.reachedUnreachable;
|
||||
pub const unwrapNull = no_panic.unwrapNull;
|
||||
pub const castToNull = no_panic.castToNull;
|
||||
|
||||
Reference in New Issue
Block a user