rustc: Add a str_eq lang item for pattern matching
This commit is contained in:
parent
2572e80355
commit
1fcfee674a
3 changed files with 30 additions and 23 deletions
|
@ -713,6 +713,7 @@ Section: Comparing strings
|
|||
*/
|
||||
|
||||
/// Bytewise slice equality
|
||||
#[lang="str_eq"]
|
||||
pure fn eq_slice(a: &str, b: &str) -> bool {
|
||||
do as_buf(a) |ap, alen| {
|
||||
do as_buf(b) |bp, blen| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue