about summary refs log tree commit diff
path: root/src/libnative
AgeCommit message (Collapse)AuthorLines
2014-11-20Remove libnativeAaron Turon-1641/+0
With runtime removal complete, there's nothing left of libnative. This commit removes it. Fixes #18687 [breaking-change]
2014-11-20Remove Runtime traitAaron Turon-246/+0
This commit removes most of the remaining runtime infrastructure related to the green/native split. In particular, it removes the `Runtime` trait and instead inlines the native implementation. Closes #17325 [breaking-change]
2014-11-17Switch to purely namespaced enumsSteven Fackler-1/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-08Runtime removal: fully remove rtioAaron Turon-111/+0
This patch cleans up the remnants of the runtime IO interface. 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: refactor ttyAaron Turon-186/+0
This patch continues runtime removal by moving the tty implementations 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: refactor timerAaron Turon-512/+0
This patch continues runtime removal by moving out timer-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: refactor processAaron Turon-20/+0
This patch continues the runtime removal by moving and refactoring the process implementation into the new `sys` module. 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: refactor helper threadsAaron Turon-199/+0
This patch continues the runtime removal by moving libnative::io::helper_thread into sys::helper_signal and sys_common::helper_thread 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: refactor pipes and networkingAaron Turon-2265/+0
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: refactor fsAaron Turon-1161/+1
This moves the filesystem implementation from libnative into the new `sys` modules, refactoring along the way and hooking into `std::io::fs`. 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-08Remove signal handling.Aaron Turon-4/+0
Since signal handling was only implemented through librustuv, which is now gone, there's no reason to even provide the API. [breaking-change]
2014-11-08Runtime removal: add private sys, sys_common modulesAaron Turon-719/+0
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-1/+1
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-10-30Test fixes and rebase conflictsAlex Crichton-1/+1
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-2/+2
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-17/+17
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-2/+2
2014-10-24Print stack overflow messages for Windows, Linux and OS XJohn Kåre Alsaker-2/+16
Fixes #17562
2014-10-24Fix sigaction on OS XJohn Kåre Alsaker-10/+0
2014-10-20Test fixes and rebase conflictsAlex Crichton-7/+7
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-87/+81
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-16libnative: Remove all uses of {:?}.Luqman Aden-2/+2
2014-10-16Remove libdebug and update tests.Luqman Aden-1/+0
2014-10-10Register new snapshotsAlex Crichton-18/+18
Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks.
2014-10-10auto merge of #17853 : alexcrichton/rust/issue-17718, r=pcwaltonbors-55/+55
This change is an implementation of [RFC 69][rfc] which adds a third kind of global to the language, `const`. This global is most similar to what the old `static` was, and if you're unsure about what to use then you should use a `const`. The semantics of these three kinds of globals are: * A `const` does not represent a memory location, but only a value. Constants are translated as rvalues, which means that their values are directly inlined at usage location (similar to a #define in C/C++). Constant values are, well, constant, and can not be modified. Any "modification" is actually a modification to a local value on the stack rather than the actual constant itself. Almost all values are allowed inside constants, whether they have interior mutability or not. There are a few minor restrictions listed in the RFC, but they should in general not come up too often. * A `static` now always represents a memory location (unconditionally). Any references to the same `static` are actually a reference to the same memory location. Only values whose types ascribe to `Sync` are allowed in a `static`. This restriction is in place because many threads may access a `static` concurrently. Lifting this restriction (and allowing unsafe access) is a future extension not implemented at this time. * A `static mut` continues to always represent a memory location. All references to a `static mut` continue to be `unsafe`. This is a large breaking change, and many programs will need to be updated accordingly. A summary of the breaking changes is: * Statics may no longer be used in patterns. Statics now always represent a memory location, which can sometimes be modified. To fix code, repurpose the matched-on-`static` to a `const`. static FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } change this code to: const FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } * Statics may no longer refer to other statics by value. Due to statics being able to change at runtime, allowing them to reference one another could possibly lead to confusing semantics. If you are in this situation, use a constant initializer instead. Note, however, that statics may reference other statics by address, however. * Statics may no longer be used in constant expressions, such as array lengths. This is due to the same restrictions as listed above. Use a `const` instead. [breaking-change] Closes #17718 [rfc]: https://github.com/rust-lang/rfcs/pull/246
2014-10-09Test fixes and rebase conflictsAlex Crichton-1/+1
2014-10-09Use the same html_root_url for all docsBrian Anderson-1/+1
2014-10-09Revert "Update html_root_url for 0.12.0 release"Brian Anderson-1/+1
This reverts commit 2288f332301b9e22db2890df256322650a7f3445.
2014-10-09native: Convert statics to constantsAlex Crichton-54/+54
2014-10-07Update html_root_url for 0.12.0 releaseBrian Anderson-1/+1
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-2/+2
2014-10-05Fix cfg syntax warnings in libnativeMichael Gehring-8/+4
2014-10-02rollup merge of #17720 : ben0x539/shiftsAlex Crichton-8/+9
2014-10-02native: fix passing errno to parent after forkBenjamin Herr-8/+9
The bitshifts were wrong in that they invoked undefined behavior and only passed the lower byte of the presumed-to-be-32bit errno value. Apparently all actually possible values for errno happen to be easily under 256, so this didn't cause any actual problems. This commit fixes the bitshifts, but doesn't generalize to errno types that aren't 32bit.
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-1/+1
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-2/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
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-10-02Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-10-01auto merge of #17630 : sfackler/rust/cfg-warnings, r=brsonbors-70/+68
Closes #17490
2014-09-30Fix libnativeSteven Fackler-70/+68
2014-09-30librustc: Forbid `..` in range patterns.Patrick Walton-1/+1
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. [breaking-change]
2014-09-27auto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichtonbors-1/+1
cc #17490 Reopening of #16230
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-1/+1
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-24liblibc and libnative: send() should use const buffers.NODA, Kai-2/+2
2014-09-24libnative/io: datasync() wrongly called fsync().NODA, Kai-1/+1
2014-09-22librustc: Forbid private types in public APIs.Patrick Walton-2/+1
This breaks code like: struct Foo { ... } pub fn make_foo() -> Foo { ... } Change this code to: pub struct Foo { // note `pub` ... } pub fn make_foo() -> Foo { ... } The `visible_private_types` lint has been removed, since it is now an error to attempt to expose a private type in a public API. In its place a `#[feature(visible_private_types)]` gate has been added. Closes #16463. RFC #48. [breaking-change]
2014-09-19Add enum variants to the type namespaceNick Cameron-4/+4
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.