Repository navigation
List.is_empty is declared in the standard library and its built-in is deleted (#3483) - #3490
Merged
Merged
Conversation
… deleted from the table and both code generators (#3483)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 == 0inimpl[T] List[T].LIST_IS_EMPTYis gone: its case inbuiltin_method_intrinsic, theMirIntrinsicandCcBuiltinmembers, and the arms in the LLVM and C code generators.is_empty(a fixed string's intrinsic;IsEmptyViaLenfor a type with a built-inlen).Test:
behav_3483_list_is_empty_declared(a call, through a reference, on a list ofstr, andList[i32].is_emptyas a value). The C-backend tests pass.Battery green;
:release-checksgreen.