about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-04-21rollup merge of #24669: steveklabnik/fixAlex Crichton-0/+2
This section was added but the list wasn't updated.
2015-04-21rollup merge of #24667: steveklabnik/more_editingAlex Crichton-145/+145
r? @alexcrichton
2015-04-21rollup merge of #24665: sw17ch/document-complete-slice-syntaxAlex Crichton-0/+1
The documentation doesn't appear to describe the `&foo[..]` syntax. I tried looking in `primitive-types.html#slices` and `std/primitive.slice.html`. There's an example of partially slicing an array in trpl and a mention of `&foo[..]` in [the standard library documentation](https://doc.rust-lang.org/std/primitive.slice.html), but neither place, from what I can see, actually describes the behavior of `&foo[..]`. +r? @steveklabnik
2015-04-21rollup merge of #24663: steveklabnik/gh24639Alex Crichton-0/+30
Fixes #24639
2015-04-21rollup merge of #24661: SimonSapin/fmt-write-charAlex Crichton-0/+23
as accepted in [RFC 526](https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md). Note that this brand new method is marked as **stable**. I judged this safe enough: it’s simple enough that it’s very unlikely to change. Still, I can mark it unstable instead if you prefer. r? @alexcrichton
2015-04-21rollup merge of #24654: mdinger/patch-2Alex Crichton-2/+2
This just fixes some comments made on https://github.com/rust-lang/rust/pull/24632 . The second I think is better unless @steveklabnik actually meant something else.
2015-04-21rollup merge of #24651: tamird/old-referencesAlex Crichton-1045/+12
r? @alexcrichton
2015-04-21rollup merge of #24640: steveklabnik/new_unsafe_guideAlex Crichton-3/+4
https://github.com/rust-lang/rust/pull/24631 is related, as it will delete this from the TOC, but I want to keep it here.
2015-04-21rollup merge of #24635: tamird/llvm-3.5Alex Crichton-91/+18
r? @alexcrichton
2015-04-21rollup merge of #24611: doomsplayer/doomsplayer-patch-1Alex Crichton-0/+24
as dependency for #24594
2015-04-21rollup merge of #24563: kwantam/rfc_1054Alex Crichton-29/+56
For now, words() is left in (but deprecated), and Words is a type alias for struct SplitWhitespace. Also cleaned up references to str.words() throughout codebase. Closes #15628
2015-04-21rollup merge of #24487: erickt/syntaxAlex Crichton-178/+258
This removes the usage of `#[feature(into_cow, slice_patterns, box_syntax, box_patterns, quote, unsafe_destructor)]` from being used in libsyntax. My main desire for this is that it brings me one step closer to letting [syntex](https://github.com/erickt/rust-syntex) compile with stable rust. Hopefully this doesn't inconvenience rust development.
2015-04-21rollup merge of #24439: alexcrichton/fix-archive-assemblerAlex Crichton-84/+264
When linking an archive statically to an rlib, the compiler will extract all contents of the archive and add them all to the rlib being generated. The current method of extraction is to run `ar x`, dumping all files into a temporary directory. Object archives, however, are allowed to have multiple entries with the same file name, so there is no method for them to extract their contents into a directory in a lossless fashion. This commit adds iterator support to the `ArchiveRO` structure which hooks into LLVM's support for reading object archives. This iterator is then used to inspect each object in turn and extract it to a unique location for later assembly.
2015-04-21rollup merge of #24222: lambda/rename-soft-link-to-symlinkAlex Crichton-8/+104
Implement [RFC #1048][rfc]. On Windows, when you create a symbolic link you must specify whether it points to a directory or a file, even if it is created dangling, while on Unix, the same symbolic link could point to a directory, a file, or nothing at all. Furthermore, on Windows special privilege is necessary to use a symbolic link, while on Unix, you can generally create a symbolic link in any directory you have write privileges to. This means that it is unlikely to be able to use symbolic links purely portably; anyone who uses them will need to think about the cross platform implications. This means that using platform-specific APIs will make it easier to see where code will need to differ between the platforms, rather than trying to provide some kind of compatibility wrapper. Furthermore, `soft_link` has no precedence in any other API, so to avoid confusion, move back to the more standard `symlink` terminology. Create a `std::os::unix::symlink` for the Unix version that is destination type agnostic, as well as `std::os::windows::{symlink_file, symlink_dir}` for Windows. Because this is a stable API, leave a compatibility wrapper in `std::fs::soft_link`, which calls `symlink` on Unix and `symlink_file` on Windows, preserving the existing behavior of `soft_link`. [rfc]: https://github.com/rust-lang/rfcs/pull/1048
2015-04-21rollup merge of #24162: pnkfelix/fsk-detect-duplicate-loop-labelsAlex Crichton-15/+489
Check for duplicate loop labels in function bodies. See also: http://internals.rust-lang.org/t/psa-rejecting-duplicate-loop-labels/1833 The change, which we are putting in as future-proofing in preparation for future potential additions to the language (namely labeling arbitrary blocks and using those labels in borrow expressions), means that code like this will start emitting warnings: ```rust fn main() { { 'a: loop { break; } } { 'a: loop { break; } } } ``` To make the above code compile without warnings, write this instead: ```rust fn main() { { 'a: loop { break; } } { 'b: loop { break; } } } ``` Since this change is only introducing a new warnings, this change is non-breaking. Fix #21633
2015-04-21Document functional update syntaxSteve Klabnik-0/+30
Fixes #24639
2015-04-21implement rfc 1054: split_whitespace() fn, deprecate words()kwantam-28/+53
For now, words() is left in (but deprecated), and Words is a type alias for struct SplitWhitespace. Also cleaned up references to s.words() throughout codebase. Closes #15628
2015-04-21unstabilize Words structkwantam-1/+3
Words struct was stabilied by mistake. Unstabilize.
2015-04-21rustc: Handle duplicate names merging archivesAlex Crichton-84/+264
When linking an archive statically to an rlib, the compiler will extract all contents of the archive and add them all to the rlib being generated. The current method of extraction is to run `ar x`, dumping all files into a temporary directory. Object archives, however, are allowed to have multiple entries with the same file name, so there is no method for them to extract their contents into a directory in a lossless fashion. This commit adds iterator support to the `ArchiveRO` structure which hooks into LLVM's support for reading object archives. This iterator is then used to inspect each object in turn and extract it to a unique location for later assembly.
2015-04-21Add research to README of TRPLSteve Klabnik-0/+2
This section was added but the list wasn't updated.
2015-04-21syntax: Copy unstable str::char_at into libsyntaxErick Tryzelaar-22/+39
2015-04-21small edits for recently written book chaptersSteve Klabnik-145/+145
2015-04-21syntax: Change ExpnId::{from,to}_llvm_cookie to {from,to}_u32Erick Tryzelaar-8/+6
2015-04-21syntax: Remove #[feature(path_ext)]Erick Tryzelaar-3/+3
Replace Path::exists with stable metadata call.
2015-04-21syntax: replace Vec::push_all with stable Vec::extendErick Tryzelaar-9/+14
2015-04-21syntax: Replace Vec::map_in_place with stable mut iteratorErick Tryzelaar-9/+11
2015-04-21syntax: Replace [].tail with the stable [1..] syntaxErick Tryzelaar-1/+1
2015-04-21syntax: Replace String::from_str with the stable String::fromErick Tryzelaar-9/+9
2015-04-21syntax: remove #[feature(quote, unsafe_destructor)]Erick Tryzelaar-6/+43
2015-04-21syntax: Don't use unstable fn to convert single element to a sliceErick Tryzelaar-1/+4
2015-04-21syntax: Remove use of TraitObject in pretty printerErick Tryzelaar-13/+8
2015-04-21syntax: remove uses of `.into_cow()`Erick Tryzelaar-5/+4
2015-04-21syntax: Remove uses of #[feature(slice_patterns)]Erick Tryzelaar-47/+73
2015-04-21syntax: remove #![feature(box_syntax, box_patterns)]Erick Tryzelaar-46/+44
2015-04-21Add an example of completely slicing an object.John Van Enk-0/+1
2015-04-21Pick a feature name for write_charSimon Sapin-1/+1
2015-04-21Deprecate std::fs::soft_link in favor of platform-specific versionsBrian Campbell-8/+104
On Windows, when you create a symbolic link you must specify whether it points to a directory or a file, even if it is created dangling, while on Unix, the same symbolic link could point to a directory, a file, or nothing at all. Furthermore, on Windows special privilege is necessary to use a symbolic link, while on Unix, you can generally create a symbolic link in any directory you have write privileges to. This means that it is unlikely to be able to use symbolic links purely portably; anyone who uses them will need to think about the cross platform implications. This means that using platform-specific APIs will make it easier to see where code will need to differ between the platforms, rather than trying to provide some kind of compatibility wrapper. Furthermore, `soft_link` has no precedence in any other API, so to avoid confusion, move back to the more standard `symlink` terminology. Create a `std::os::unix::symlink` for the Unix version that is destination type agnostic, as well as `std::os::windows::{symlink_file, symlink_dir}` for Windows. Because this is a stable API, leave a compatibility wrapper in `std::fs::soft_link`, which calls `symlink` on Unix and `symlink_file` on Windows, preserving the existing behavior of `soft_link`.
2015-04-21add notes clarifying introduction of warnings for a pair of run-pass tests.Felix S. Klock II-0/+13
2015-04-21Tests for shadowing between lifetimes and loop labels within function bodies.Felix S. Klock II-3/+275
2015-04-21Check for shadowing between lifetimes and loop labels in function bodies.Felix S. Klock II-12/+201
Note: this Warns rather than error on shadowing problems involving labels. We took this more conservative option mostly due to issues with hygiene being broken for labels and/or lifetimes. Add FIXME regarding non-hygienic comparison.
2015-04-21write_char is unlikely to make it for 1.0, it’ll be 1.1Simon Sapin-1/+1
2015-04-21Remove references to `old_{path,io}`Tamir Duberstein-36/+12
2015-04-21Remove dead testTamir Duberstein-7/+0
This was moved to https://github.com/rust-lang/term/issues/12
2015-04-21Remove unused filesTamir Duberstein-1002/+0
Looks like these were missed in bf4e77d.
2015-04-21add TCP_* consts for linuxYoung Wu-0/+24
2015-04-21Auto merge of #24620 - pczarn:model-lexer-issues, r=cmrbors-179/+982
Fixes #15679 Fixes #15878 Fixes #15882 Closes #15883
2015-04-21LLVM < 3.5 is unsupported since bb18a3cTamir Duberstein-91/+18
2015-04-21Add a `write_char` method to `std::fmt::Write`Simon Sapin-0/+23
as accepted in [RFC 526](https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md).
2015-04-21Refocus unsafe code chapter on unsafe itself.Steve Klabnik-3/+4
2015-04-21Auto merge of #24598 - lfairy:impl-debug-for-file, r=alexcrichtonbors-0/+68
This patch adds a `Debug` impl for `std::fs::File`. On all platforms (Unix and Windows) it shows the file descriptor. On Linux, it displays the path and access mode as well. Ideally we should show the path/mode for all platforms, not just Linux, but this will do for now. cc #24570