Skip to content

List.is_empty is declared in the standard library and its built-in is deleted (#3483) - #3490

Merged
ehartford merged 1 commit into
mainfrom
builtin-bodies-2
Nov 20, 2026
Merged

ehartford merged 1 commit into
mainfrom
builtin-bodies-2

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Part of #3483 (D110): the second built-in method with a body in std, and the first whose compiler copy is deleted in the same change.

  • pub fn is_empty() -> bool: self.len == 0 in impl[T] List[T].
  • LIST_IS_EMPTY is gone: its case in builtin_method_intrinsic, the MirIntrinsic and CcBuiltin members, and the arms in the LLVM and C code generators.
  • Other types keep their own is_empty (a fixed string's intrinsic; IsEmptyViaLen for a type with a built-in len).

Test: behav_3483_list_is_empty_declared (a call, through a reference, on a list of str, and List[i32].is_empty as a value). The C-backend tests pass.

Battery green; :release-checks green.

… deleted from the table and both code generators (#3483)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant