summary refs log tree commit diff
path: root/src/doc/reference.md
AgeCommit message (Collapse)AuthorLines
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-3/+0
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-29Add the 'T' present in the rust bookAidan Hobson Sayers-1/+1
2016-02-27Rollup merge of #31909 - benaryorg:patch-2, r=ManishearthManish Goregaokar-1/+1
`continue` expression's description mentioned `break` instead of `continue`
2016-02-26documentation fixKatze-1/+1
`continue` expression's description mentioned `break` instead of `continue` Signed-off-by: benaryorg <binary@benary.org>
2016-02-25Document the null-char/null-byte escape in the referenceGeorg Brandl-0/+4
It appears in the examples, but is not covered by any of the cases in the prose description.
2016-02-25Rollup merge of #31868 - fhahn:capitalize-Rust, r=steveklabnikManish Goregaokar-1/+1
2016-02-25Rollup merge of #31863 - matklad:clarify-reference, r=steveklabnikManish Goregaokar-2/+2
Reference implied that use declarations may appear *only* at the top of blocks and modules, but it is not the case, and the following is valid: ```Rust fn foo() { let x = 92; use baz::bar; } ``` r? @steveklabnik
2016-02-24Capitalize some occurences of Rust in documentationFlorian Hahn-1/+1
2016-02-24reference: clarify use declaration locationAleksey Kladov-2/+2
2016-02-18reference: vtable entries: copy @nikomatsakis's wordingIvan Kozik-2/+3
2016-02-15reference: vtable entries are resolved at runtimeIvan Kozik-1/+1
2016-02-04Rollup merge of #31413 - tshepang:improve, r=steveklabnikSteve Klabnik-2/+2
2016-02-04Rollup merge of #31412 - tshepang:add-trailing-commas, r=steveklabnikSteve Klabnik-5/+5
2016-02-04Rollup merge of #31411 - tshepang:idiom, r=steveklabnikSteve Klabnik-1/+1
2016-02-04reference: add trailing commasTshepang Lekhonkhobe-5/+5
2016-02-04reference: make the line a little more readableTshepang Lekhonkhobe-2/+2
2016-02-04reference: explicit return at function end is not idiomaticTshepang Lekhonkhobe-1/+1
2016-02-01Remove "powerpc64le" and "mipsel" target_archAlex Crichton-1/+1
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic.
2016-01-29Rollup merge of #31264 - est31:block_coment_parent, r=alexcrichtonManish Goregaokar-1/+1
Block comments don't have to be in the format `/*! ... !*/` in order to be read as doc comments about the parent block. The format `/*! ... */` is enough.
2016-01-28Fix reference info about parent doc block commentsest31-1/+1
Block comments don't have to be in the format `/*! ... !*/` in order to be read as doc comments about the parent block. The format `/*! ... */` is enough.
2016-01-26Fix examples that use missing_docs lintMatt Brubeck-4/+4
The missing_docs lint only applies to public items in public modules, so this example code did not actually generate any warnings or errors.
2016-01-16Auto merge of #30567 - steffengy:master, r=alexcrichtonbors-0/+3
Add support to use functions exported using vectorcall. This essentially only allows to pass a new LLVM calling convention from rust to LLVM. ```rust extern "vectorcall" fn abc(param: c_void); ``` references ---- http://llvm.org/docs/doxygen/html/CallingConv_8h_source.html https://msdn.microsoft.com/en-us/library/dn375768.aspx
2016-01-15Rollup merge of #30776 - antonblanchard:powerpc64_merge, r=alexcrichtonManish Goregaokar-1/+1
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2016-01-13the reference was inferring values that didn't fit into their target typeOliver 'ker' Schneider-8/+8
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-1/+1
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2016-01-11add feature gate "abi_vectorcall" for the vectorcall calling conventionSteffen-0/+3
2016-01-06Clarify how Rust treats backslashes at end of line in string literalsTobias Bucher-4/+4
Rust differs in that behavior from C: In C, the newline escapes are resolved before anything else, and in Rust this depends on whether the backslash is escaped itself. A difference can be observed in the following two programs: ```c #include <stdio.h> int main() { printf("\\ n\n"); return 0; } ``` ```rust fn main() { println!("\\ n"); } ``` The first program prints two newlines, the second one prints a backslash, a newline, the latin character n and a final newline.
2015-12-19Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakisbors-0/+2
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below. This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided. So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all. In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone. Part of https://github.com/rust-lang/rust/issues/23416
2015-12-18Require exact type equality + add testsVadim Petrochenkov-0/+2
+ Rebase fixes
2015-12-18Rewrite VisiblePrivateTypesVisitorVadim Petrochenkov-4/+0
2015-12-12Implement `#[deprecated]` attribute (RFC 1270)Vadim Petrochenkov-0/+2
2015-12-09Rollup merge of #30224 - matklad:super-docs, r=steveklabnikSteve Klabnik-0/+19
Make clear that `super` may be included in the path several times. r? @steveklabnik
2015-12-05DOCS: update reference about pathsAleksey Kladov-0/+19
2015-11-26Added stmt_expr_attribute feature gateMarvin Löbel-0/+3
2015-11-25Remove `#[staged_api]`Vadim Petrochenkov-4/+0
2015-11-24Rollup merge of #30020 - Manishearth:unit, r=blussSteve Klabnik-2/+2
`unit` was in code formatting, which is wrong, since it's not actual code. The correct code is `()`.
2015-11-24Update reference.mdManish Goregaokar-2/+2
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-1/+1
2015-11-17Rollup merge of #29891 - steveklabnik:gh29470, r=alexcrichtonSteve Klabnik-4/+11
Fixes #29470
2015-11-17Clear up the reference around letSteve Klabnik-11/+12
First, re-word the section on if let/while let to be more clear. Second, actually call them let statements in the statement section Fixes #29801
2015-11-17Fix up escapes in the referenceSteve Klabnik-4/+11
Fixes #29470
2015-11-13Document block doc comments bettermdinger-3/+2
2015-11-08reference: Remove struct_variant from Compiler FeaturesDaniel Trebbien-7/+0
The struct_variant feature was accepted and is no longer feature gated. See #19122, #19124 §6.1.6 Enumerations shows an example of a struct-like enum variant.
2015-11-05Beef up macro designator docsSteve Klabnik-3/+14
Fixes #28824
2015-10-26reference: clarify implAleksey Kladov-5/+5
Another kind of nominal types in Rust are trait objects, so the following is valid ```rust trait A { } impl A { } ```
2015-10-15Rollup merge of #29058 - tshepang:rename, r=steveklabnikManish Goregaokar-33/+33
Shoud have been part of commit 0b13ee0ced39
2015-10-15Rollup merge of #29022 - apasel422:spell, r=steveklabnikManish Goregaokar-2/+2
r? @steveklabnik
2015-10-15Rollup merge of #28906 - tshepang:link, r=nikomatsakisManish Goregaokar-2/+5
2015-10-15reference: 'struct' is more common that 'structure'Tshepang Lekhonkhobe-33/+33
Shoud have been part of commit 0b13ee0ced39
2015-10-14reference: add link to the symbolsTshepang Lekhonkhobe-2/+5