Skip to content

add proper attribute to view types #2160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions builtin/arrayview.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/// assert_eq!(view.length(), 3)
/// ```
#deprecated("use @array.View instead")
#builtin.valtype
struct ArrayView[T] {
buf : UninitializedArray[T]
start : Int
Expand Down
4 changes: 2 additions & 2 deletions strconv/int.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const INT64_MAX = 0x7fffffffffffffffL
/// and consume the prefix.
/// The boolean flag `allow_underscore` is used to check validity of underscores.
fn check_and_consume_base(
view : @string.StringView,
view : @string.View,
base : Int
) -> (Int, @string.StringView, Bool)!StrConvError {
) -> (Int, @string.View, Bool)!StrConvError {
// if the base is not given, we need to determine it from the prefix
if base == 0 {
match view {
Expand Down
3 changes: 2 additions & 1 deletion string/view.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
/// A `StringView` represents a view of a String that maintains proper Unicode
/// character boundaries. It allows safe access to a substring while handling
/// multi-byte characters correctly.
/// alert deprecated "use @string.View instead"
#deprecated("use @string.View instead")
#builtin.valtype
struct StringView {
// # Fields
//
Expand Down