Skip to content

Commit c179398

Browse files
committed
---
yaml --- r: 51188 b: refs/heads/try c: 0647a0f h: refs/heads/master v: v3
1 parent 403795a commit c179398

File tree

3 files changed

+3
-101
lines changed

3 files changed

+3
-101
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: dbeea18fc5f94d29db74144e55089cc55aa8e11d
5+
refs/heads/try: 0647a0fc2812ec1ea797168def80936b67688391
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/rust.md

Lines changed: 1 addition & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,111 +1420,13 @@ names are effectively reserved. Some significant attributes include:
14201420

14211421
* The `doc` attribute, for documenting code in-place.
14221422
* The `cfg` attribute, for conditional-compilation by build-configuration.
1423-
* The `lang` attribute, for custom definitions of traits and functions that are known to the Rust compiler (see [Language items](#language-items)).
14241423
* The `link` attribute, for describing linkage metadata for a crate.
14251424
* The `test` attribute, for marking functions as unit tests.
1426-
* The `allow`, `warn`, `forbid`, and `deny` attributes, for controlling lint checks. Lint checks supported
1425+
* The `allow`, `warn`, `forbid`, and `deny` attributes, for controling lint checks. Lint checks supported
14271426
by the compiler can be found via `rustc -W help`.
14281427

14291428
Other attributes may be added or removed during development of the language.
14301429

1431-
### Language items
1432-
1433-
Some primitive Rust operations are defined in Rust code,
1434-
rather than being implemented directly in C or assembly language.
1435-
The definitions of these operations have to be easy for the compiler to find.
1436-
The `lang` attribute makes it possible to declare these operations.
1437-
For example, the `str` module in the Rust core library defines the string equality function:
1438-
1439-
~~~
1440-
#[lang="str_eq"]
1441-
pub fn eq_slice(a: &str, b: &str) -> bool {
1442-
true // not actually the implementation
1443-
}
1444-
~~~
1445-
1446-
The name `str_eq` has a special meaning to the Rust compiler,
1447-
and the presence of this definition means that it will use this definition
1448-
when generating calls to the string equality function.
1449-
1450-
A complete list of the built-in language items follows:
1451-
1452-
#### Traits
1453-
1454-
`const`
1455-
: Cannot be mutated.
1456-
`copy`
1457-
: Can be implicitly copied.
1458-
`owned`
1459-
: Are uniquely owned.
1460-
`durable`
1461-
: Contain borrowed pointers.
1462-
`drop`
1463-
: Have finalizers.
1464-
`add`
1465-
: Elements can be added (for example, integers and floats).
1466-
`sub`
1467-
: Elements can be subtracted.
1468-
`mul`
1469-
: Elements can be multiplied.
1470-
`div`
1471-
: Elements can be divided.
1472-
`mod`
1473-
: Elements have a modulo operation.
1474-
`neg`
1475-
: Elements can be negated arithmetically.
1476-
`not`
1477-
: Elements can be negated logically.
1478-
`bitxor`
1479-
: Elements have an exclusive-or operation.
1480-
`bitand`
1481-
: Elements have a bitwise `and` operation.
1482-
`bitor`
1483-
: Elements have a bitwise `or` operation.
1484-
`shl`
1485-
: Elements have a left shift operation.
1486-
`shr`
1487-
: Elements have a right shift operation.
1488-
`index`
1489-
: Elements can be indexed.
1490-
`eq`
1491-
: Elements can be compared for equality.
1492-
`ord`
1493-
: Elements have a partial ordering.
1494-
1495-
#### Operations
1496-
1497-
`str_eq`
1498-
: Compare two strings for equality.
1499-
`uniq_str_eq`
1500-
: Compare two owned strings for equality.
1501-
`annihilate`
1502-
: Destroy a box before freeing it.
1503-
`log_type`
1504-
: Generically print a string representation of any type.
1505-
`fail_`
1506-
: Abort the program with an error.
1507-
`fail_bounds_check`
1508-
: Abort the program with a bounds check error.
1509-
`exchange_malloc`
1510-
: Allocate memory on the exchange heap.
1511-
`exchange_free`
1512-
: Free memory that was allocated on the exchange heap.
1513-
`malloc`
1514-
: Allocate memory on the managed heap.
1515-
`free`
1516-
: Free memory that was allocated on the managed heap.
1517-
`borrow_as_imm`
1518-
: Create an immutable borrowed pointer to a mutable value.
1519-
`return_to_mut`
1520-
: Release a borrowed pointer created with `return_to_mut`
1521-
`check_not_borrowed`
1522-
: Fail if a value has existing borrowed pointers to it.
1523-
`strdup_uniq`
1524-
: Return a new unique string containing a copy of the contents of a unique string.
1525-
1526-
> **Note:** This list is likely to become out of date. We should auto-generate it
1527-
> from `librustc/middle/lang_items.rs`.
15281430

15291431
# Statements and expressions
15301432

branches/try/src/libcore/rt/uv/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub impl StreamWatcher {
8181
return (*alloc_cb)(suggested_size as uint);
8282
}
8383

84-
extern fn read_cb(stream: *uvll::uv_stream_t, nread: ssize_t, ++buf: Buf) {
84+
extern fn read_cb(stream: *uvll::uv_stream_t, nread: ssize_t, buf: Buf) {
8585
rtdebug!("buf addr: %x", buf.base as uint);
8686
rtdebug!("buf len: %d", buf.len as int);
8787
let mut stream_watcher: StreamWatcher = NativeHandle::from_native_handle(stream);

0 commit comments

Comments
 (0)