Skip to content

Commit d02c02b

Browse files
authored
Merge pull request #116 from leodasvacas/remove-str-eq-example
Remove example mentioning str_eq lang item
2 parents ef15971 + fdf9beb commit d02c02b

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/attributes.md

+1-14
Original file line numberDiff line numberDiff line change
@@ -408,20 +408,7 @@ pub mod m3 {
408408
Some primitive Rust operations are defined in Rust code, rather than being
409409
implemented directly in C or assembly language. The definitions of these
410410
operations have to be easy for the compiler to find. The `lang` attribute
411-
makes it possible to declare these operations. For example, the `str` module
412-
in the Rust standard library defines the string equality function:
413-
414-
```rust,ignore
415-
#[lang = "str_eq"]
416-
pub fn eq_slice(a: &str, b: &str) -> bool {
417-
// details elided
418-
}
419-
```
420-
421-
The name `str_eq` has a special meaning to the Rust compiler, and the presence
422-
of this definition means that it will use this definition when generating calls
423-
to the string equality function.
424-
411+
makes it possible to declare these operations.
425412
The set of language items is currently considered unstable. A complete
426413
list of the built-in language items will be added in the future.
427414

0 commit comments

Comments
 (0)