about summary refs log tree commit diff
path: root/src/libstd/os.rs
AgeCommit message (Collapse)AuthorLines
2014-11-16Move ToString to collections::stringBrendan Zabarauskas-2/+1
This also impls `FormatWriter` for `Vec<u8>`
2014-11-15libstd: improve os::args() docLiigo Zhuang-0/+4
2014-11-12Fix documentation bugBarosl Lee-0/+1
The first paragraph must be separated from the next paragraph. Otherwise, rustdoc will consider the content of the latter as part of the title.
2014-11-12Fix remaining documentation to reflect fail!() -> panic!()Barosl Lee-5/+5
Throughout the docs, "failure" was replaced with "panics" if it means a task panic. Otherwise, it remained as is, or changed to "errors" to clearly differentiate it from a task panic.
2014-11-08Runtime removal: refactor pipes and networkingAaron Turon-29/+6
This patch continues the runtime removal by moving pipe and networking-related code into `sys`. Because this eliminates APIs in `libnative` and `librustrt`, it is a: [breaking-change] This functionality is likely to be available publicly, in some form, from `std` in the future.
2014-11-08Runtime removal: add private sys, sys_common modulesAaron Turon-151/+4
These modules will house the code that used to be part of the runtime system in libnative. The `sys_common` module contains a few low-level but cross-platform details. The `sys` module is set up using `#[cfg()]` to include either a unix or windows implementation of a common API surface. This API surface is *not* exported directly in `libstd`, but is instead used to bulid `std::os` and `std::io`. Ultimately, the low-level details in `sys` will be exposed in a controlled way through a separate platform-specific surface, but that setup is not part of this patch.
2014-11-06Prelude: rename and consolidate extension traitsAaron Turon-5/+5
This commit renames a number of extension traits for slices and string slices, now that they have been refactored for DST. In many cases, multiple extension traits could now be consolidated. Further consolidation will be possible with generalized where clauses. The renamings are consistent with the [new `-Prelude` suffix](https://github.com/rust-lang/rfcs/pull/344). There are probably a few more candidates for being renamed this way, but that is left for API stabilization of the relevant modules. Because this renames traits, it is a: [breaking-change] However, I do not expect any code that currently uses the standard library to actually break. Closes #17917
2014-11-02Add Error impls to a few key error typesAaron Turon-0/+14
2014-11-01collections: Remove all collections traitsAlex Crichton-1/+0
As part of the collections reform RFC, this commit removes all collections traits in favor of inherent methods on collections themselves. All methods should continue to be available on all collections. This is a breaking change with all of the collections traits being removed and no longer being in the prelude. In order to update old code you should move the trait implementations to inherent implementations directly on the type itself. Note that some traits had default methods which will also need to be implemented to maintain backwards compatibility. [breaking-change] cc #18424
2014-10-30Test fixes and rebase conflictsAlex Crichton-1/+1
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-1/+1
Conflicts: src/libcollections/slice.rs src/libcore/failure.rs src/libsyntax/parse/token.rs src/test/debuginfo/basic-types-mut-globals.rs src/test/debuginfo/simple-struct.rs src/test/debuginfo/trait-pointers.rs
2014-10-29Rename fail! to panic!Steve Klabnik-12/+12
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-28Update code with new lint namesAaron Turon-1/+1
2014-10-16libstd: Remove all uses of {:?}.Luqman Aden-5/+5
2014-10-10Register new snapshotsAlex Crichton-5/+5
Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks.
2014-10-09std: Convert statics to constantsAlex Crichton-53/+53
This commit repurposes most statics as constants in the standard library itself, with the exception of TLS keys which precisely have their own memory location as an implementation detail. This commit also rewrites the bitflags syntax to use `const` instead of `static`. All invocations will need to replace the word `static` with `const` when declaring flags. Due to the modification of the `bitflags!` syntax, this is a: [breaking-change]
2014-10-07Rename slice::SliceNick Cameron-1/+1
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-10-02Revert "Review and rebasing changes"Aaron Turon-1/+1
This reverts commit 6e0611a48707a1f5d90aee32a02b2b15957ef25b.
2014-10-02Review and rebasing changesNick Cameron-1/+1
2014-09-30Fix libstdSteven Fackler-20/+16
2014-09-23Fixed: iOS build was broken because of deprecated APIsValerii Hiora-3/+1
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-23/+27
2014-09-21Remove #[allow(deprecated)] from libstdAlex Crichton-4/+5
2014-09-16Fallout from renamingAaron Turon-10/+10
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-1/+1
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change]
2014-08-26Use temp vars for implicit coercion to ^[T]Nick Cameron-1/+2
2014-08-23Complete renaming of win32 to windowsVadim Chugunov-6/+6
2014-08-23Remove stage0 attributes.Vadim Chugunov-1/+0
2014-08-20liblibc: don't use int/uint for intptr_t/uintptr_tCorey Richardson-1/+1
int/uint aren't considered FFI safe, replace them with the actual type they represent (i64/u64 or i32/u32). This is a breaking change, but at most a cast to `uint` or `int` needs to be added. [breaking-change]
2014-08-15auto merge of #16435 : vadimcn/rust/windows, r=pcwaltonbors-2/+3
Using "win32" to mean "Windows" is confusing, especially now, that Rust supports win64 builds. Let's call spade a spade.
2014-08-13core: Rename ImmutableEqSlice to ImmutablePartialEqSliceBrian Anderson-1/+1
This is in the prelude and won't break much code. [breaking-change]
2014-08-13std: Rename slice::Vector to SliceBrian Anderson-1/+1
This required some contortions because importing both raw::Slice and slice::Slice makes rustc crash. Since `Slice` is in the prelude, this renaming is unlikely to casue breakage. [breaking-change]
2014-08-13std: Rename various slice traits for consistencyBrian Anderson-2/+2
ImmutableVector -> ImmutableSlice ImmutableEqVector -> ImmutableEqSlice ImmutableOrdVector -> ImmutableOrdSlice MutableVector -> MutableSlice MutableVectorAllocating -> MutableSliceAllocating MutableCloneableVector -> MutableCloneableSlice MutableOrdVector -> MutableOrdSlice These are all in the prelude so most code will not break. [breaking-change]
2014-08-12Replace #[cfg(target_os = "win32")] with #[cfg(target_os = "windows")]Vadim Chugunov-2/+3
2014-08-06auto merge of #16291 : nham/rust/byte_literals, r=alexcrichtonbors-1/+1
This replaces many instances chars being casted to u8 with byte literals.
2014-08-06Use byte literals in libstdnham-1/+1
2014-08-04stabilize atomics (now atomic)Aaron Turon-1/+1
This commit stabilizes the `std::sync::atomics` module, renaming it to `std::sync::atomic` to match library precedent elsewhere, and tightening up behavior around incorrect memory ordering annotations. The vast majority of the module is now `stable`. However, the `AtomicOption` type has been deprecated, since it is essentially unused and is not truly a primitive atomic type. It will eventually be replaced by a higher-level abstraction like MVars. Due to deprecations, this is a: [breaking-change]
2014-08-01Fix misspelled comments.Joseph Crail-1/+1
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-0/+44
Not included are two required patches: * LLVM: segmented stack support for DragonFly [1] * jemalloc: simple configure patches [1]: http://reviews.llvm.org/D4705
2014-07-24Add `string::raw::from_buf`Adolfo Ochagavía-2/+1
2014-07-24Fix travis errorsAdolfo Ochagavía-1/+1
2014-07-24Deprecated `str::raw::from_buf_len`Adolfo Ochagavía-5/+5
Replaced by `string::raw::from_buf_len` [breaking-change]
2014-07-24Deprecated `str::raw::from_c_str`Adolfo Ochagavía-1/+1
Use `string::raw::from_buf` instead [breaking-change]
2014-07-24Remove OwnedStr traitAdolfo Ochagavía-4/+0
This trait was only implemented by `String`. It provided the methods `into_bytes` and `append`, both of which **are already implemented as normal methods** of `String` (not as trait methods). This change improves the consistency of strings. This shouldn't break any code, except if somebody has implemented `OwnedStr` for a user-defined type.
2014-07-23collections: Move push/pop to MutableSeqBrian Anderson-1/+1
Implement for Vec, DList, RingBuf. Add MutableSeq to the prelude. Since the collections traits are in the prelude most consumers of these methods will continue to work without change. [breaking-change]
2014-07-15Fix errorsAdolfo Ochagavía-1/+0
2014-07-15Deprecate `str::from_utf8_lossy`Adolfo Ochagavía-7/+7
Use `String::from_utf8_lossy` instead [breaking-change]
2014-07-15Deprecate `str::from_utf16_lossy`Adolfo Ochagavía-1/+1
Use `String::from_utf16_lossy` instead. [breaking-change]
2014-07-15Deprecate `str::from_utf16`Adolfo Ochagavía-4/+4
Use `String::from_utf16` instead [breaking-change]