about summary refs log tree commit diff
path: root/src/libgreen
AgeCommit message (Collapse)AuthorLines
2014-10-02Test fixes from the rollupAlex Crichton-2/+2
2014-10-01Remove all use of librustuvAaron Turon-86/+1
2014-10-01auto merge of #17630 : sfackler/rust/cfg-warnings, r=brsonbors-13/+9
Closes #17490
2014-09-30librustc: Fix up mutability in method autoderefs if incorrect, andPatrick Walton-1/+1
prefer `Deref` over `DerefMut` in all other circumstances. Closes #12825.
2014-09-30Fix libgreenSteven Fackler-13/+9
2014-09-22librustc: Forbid private types in public APIs.Patrick Walton-2/+2
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-16Fallout from renamingAaron Turon-7/+7
2014-09-09Remove some test warnings.Jonas Hietala-0/+1
2014-08-28auto merge of #16664 : aturon/rust/stabilize-option-result, r=alexcrichtonbors-19/+19
Per API meeting https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-08-13.md # Changes to `core::option` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. However, a few methods have been deprecated, either due to lack of use or redundancy: * `take_unwrap`, `get_ref` and `get_mut_ref` (redundant, and we prefer for this functionality to go through an explicit .unwrap) * `filtered` and `while` * `mutate` and `mutate_or_set` * `collect`: this functionality is being moved to a new `FromIterator` impl. # Changes to `core::result` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. * `collect`: this functionality is being moved to a new `FromIterator` impl. * `fold_` is deprecated due to lack of use * Several methods found in `core::option` are added here, including `iter`, `as_slice`, and variants. Due to deprecations, this is a: [breaking-change]
2014-08-28Fallout from stabilizing core::optionAaron Turon-19/+19
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-2/+4
2014-08-26DST coercions and DST structsNick Cameron-1/+1
[breaking-change] 1. The internal layout for traits has changed from (vtable, data) to (data, vtable). If you were relying on this in unsafe transmutes, you might get some very weird and apparently unrelated errors. You should not be doing this! Prefer not to do this at all, but if you must, you should use raw::TraitObject rather than hardcoding rustc's internal representation into your code. 2. The minimal type of reference-to-vec-literals (e.g., `&[1, 2, 3]`) is now a fixed size vec (e.g., `&[int, ..3]`) where it used to be an unsized vec (e.g., `&[int]`). If you want the unszied type, you must explicitly give the type (e.g., `let x: &[_] = &[1, 2, 3]`). Note in particular where multiple blocks must have the same type (e.g., if and else clauses, vec elements), the compiler will not coerce to the unsized type without a hint. E.g., `[&[1], &[1, 2]]` used to be a valid expression of type '[&[int]]'. It no longer type checks since the first element now has type `&[int, ..1]` and the second has type &[int, ..2]` which are incompatible. 3. The type of blocks (including functions) must be coercible to the expected type (used to be a subtype). Mostly this makes things more flexible and not less (in particular, in the case of coercing function bodies to the return type). However, in some rare cases, this is less flexible. TBH, I'm not exactly sure of the exact effects. I think the change causes us to resolve inferred type variables slightly earlier which might make us slightly more restrictive. Possibly it only affects blocks with unreachable code. E.g., `if ... { fail!(); "Hello" }` used to type check, it no longer does. The fix is to add a semicolon after the string.
2014-08-20Stage #[repr(packed)] in std::rtCorey Richardson-7/+8
2014-08-20libgreen: use FFI-safe typesCorey Richardson-30/+33
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-2/+2
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
2014-08-13Fix various fallout from timer changesBrian Anderson-1/+2
2014-08-08auto merge of #16285 : alexcrichton/rust/rename-share, r=huonwbors-5/+5
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-07Rename `Share` to `Sync`Alex Crichton-5/+5
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-08-06Merge commit '881bfb1a180a1b545daa9da1539ec4c8ebda7ed1' into rollupAlex Crichton-13/+31
2014-08-05Renamed `record_stack_bounds` for clarity.Vadim Chugunov-2/+2
For a good measure, implemented target_record_stack_bounds for 32-bit Windows as well.
2014-08-04libnative should not mess with stack limits in the TIB. Only libgreen has a ↵Vadim Chugunov-2/+2
legitimate need to set them.
2014-08-04Ensure that Registers struct is 16-byte aligned on x86_64.Vadim Chugunov-11/+29
This is important when building with --disable-jemalloc: unlike jemalloc, msvcrt does not align on 16 bytes unless asked to.
2014-08-04stabilize atomics (now atomic)Aaron Turon-14/+14
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-31auto merge of #16073 : mneumann/rust/dragonfly2, r=alexcrichtonbors-1/+5
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-30green: Prevent runtime corruption on spawn failureAlex Crichton-3/+18
Like with libnative, when a green task failed to spawn it would leave the world in a corrupt state where the local scheduler had been dropped as well as the local task. Also like libnative, this patch sets up a "bomb" which when it goes off will restore the state of the world.
2014-07-30rustrt: Allow dropping a brand-new TaskAlex Crichton-1/+1
When a new task fails to spawn, it triggers a task failure of the spawning task. This ends up causing runtime aborts today because of the destructor bomb in the Task structure. The bomb doesn't actually need to go off until *after* the task has run at least once. This now prevents a runtime abort when a native thread fails to spawn.
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-1/+5
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-24libsyntax: Remove `~self` and `mut ~self` from the language.Patrick Walton-34/+42
This eliminates the last vestige of the `~` syntax. Instead of `~self`, write `self: Box<TypeOfSelf>`; instead of `mut ~self`, write `mut self: Box<TypeOfSelf>`, replacing `TypeOfSelf` with the self-type parameter as specified in the implementation. Closes #13885. [breaking-change]
2014-07-22auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichtonbors-0/+1
2014-07-21ignore-lexer-test to broken files and remove some tray hyphensCorey Richardson-0/+1
I blame @ChrisMorgan for the hyphens.
2014-07-19librustc: Implement lifetime elision.Patrick Walton-2/+2
This implements RFC 39. Omitted lifetimes in return values will now be inferred to more useful defaults, and an error is reported if a lifetime in a return type is omitted and one of the two lifetime elision rules does not specify what it should be. This primarily breaks two uncommon code patterns. The first is this: unsafe fn get_foo_out_of_thin_air() -> &Foo { ... } This should be changed to: unsafe fn get_foo_out_of_thin_air() -> &'static Foo { ... } The second pattern that needs to be changed is this: enum MaybeBorrowed<'a> { Borrowed(&'a str), Owned(String), } fn foo() -> MaybeBorrowed { Owned(format!("hello world")) } Change code like this to: enum MaybeBorrowed<'a> { Borrowed(&'a str), Owned(String), } fn foo() -> MaybeBorrowed<'static> { Owned(format!("hello world")) } Closes #15552. [breaking-change]
2014-07-12auto merge of #15610 : brson/rust/0.12.0, r=alexcrichtonbors-1/+1
2014-07-12auto merge of #15588 : alexcrichton/rust/issue-15478, r=cmrbors-11/+13
If modified, you can safely unmap arbitrary memory. These fields are not intended to be modified, so read-only accessors are the only ones that are provided. Closes #15478
2014-07-11std: Move MemoryMap fields to methodsAlex Crichton-11/+13
If modified, you can safely unmap arbitrary memory. These fields are not intended to be modified, so read-only accessors are the only ones that are provided. Closes #15478
2014-07-11Update doc URLs for version bumpBrian Anderson-1/+1
2014-07-10Document event_loop_factory usageRobert Clipsham-1/+10
Add a couple of lines mentioning event_loop_factory - no clear error message is given if you attempt to perform I/O in tasks created in this fashion.
2014-07-09Register new snapshotsAlex Crichton-2/+0
Closes #15544
2014-07-05Add #[crate_name] attributes as necessaryAlex Crichton-5/+5
2014-07-04auto merge of #15343 : alexcrichton/rust/0.11.0-release, r=brsonbors-2/+2
2014-07-03Fix spelling errors.Joseph Crail-1/+1
2014-07-02Merge remote-tracking branch 'origin/master' into 0.11.0-releaseAlex Crichton-21/+21
Conflicts: src/libstd/lib.rs
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-1/+1
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-28auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwaltonbors-20/+20
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28Rename all raw pointers as necessaryAlex Crichton-20/+20
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-26auto merge of #14886 : alexcrichton/rust/rt-improvements, r=brsonbors-3/+3
Most of the comments are available on the Task structure itself, but this commit is aimed at making FFI-style usage of Rust tasks a little nicer. Primarily, this commit enables re-use of tasks across multiple invocations. The method `run` will no longer unconditionally destroy the task itself. Rather, the task will be internally re-usable if the closure specified did not fail. Once a task has failed once it is considered poisoned and it can never be used again. Along the way I tried to document shortcomings of the current method of tearing down a task, opening a few issues as well. For now none of the behavior is a showstopper, but it's useful to acknowledge it. Also along the way I attempted to remove as much `unsafe` code as possible, opting for safer abstractions.
2014-06-26rustrt: Reorganize task usageAlex Crichton-3/+3
Most of the comments are available on the Task structure itself, but this commit is aimed at making FFI-style usage of Rust tasks a little nicer. Primarily, this commit enables re-use of tasks across multiple invocations. The method `run` will no longer unconditionally destroy the task itself. Rather, the task will be internally re-usable if the closure specified did not fail. Once a task has failed once it is considered poisoned and it can never be used again. Along the way I tried to document shortcomings of the current method of tearing down a task, opening a few issues as well. For now none of the behavior is a showstopper, but it's useful to acknowledge it. Also along the way I attempted to remove as much `unsafe` code as possible, opting for safer abstractions.
2014-06-24librustc: Remove cross borrowing from mutable `Box`es to `&mut`.Patrick Walton-1/+1
This will break code like: fn f(x: &mut int) {} let mut a = box 1i; f(a); Change it to: fn f(x: &mut int) {} let mut a = box 1i; f(&mut *a); RFC 33; issue #10504. [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-5/+5
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]