about summary refs log tree commit diff
path: root/src/librustrt
AgeCommit message (Collapse)AuthorLines
2014-09-26tiny linguistic correction in docs: s/its'/its/Mateusz Czapliński-2/+2
See e.g.: http://dictionary.reference.com/browse/its
2014-09-26Disable runtime split stack support on WindowsBrian Anderson-15/+4
2014-09-25Rename `fail_` lang item to `fail`, closes #16114Florian Hahn-6/+4
2014-09-24Rename `begin_unwind` lang item to `fail_fmt`, refs #16114Florian Hahn-0/+11
2014-09-24auto merge of #17471 : vadimcn/rust/link-libgcc, r=alexcrichtonbors-1/+0
Closes #17271 Closes #15420
2014-09-22librustc: Forbid private types in public APIs.Patrick Walton-10/+4
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-22Link libgcc statically on Win64.Vadim Chugunov-1/+0
Allow linking it statically on Win32 with an override.
2014-09-22Update calls of deprecated functions in macros.Victor Berger-1/+1
Fallout of #17185.
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-1/+2
2014-09-19rollup merge of #17355 : gamazeps/issue17210Alex Crichton-4/+13
2014-09-19Add enum variants to the type namespaceNick Cameron-31/+31
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.
2014-09-18Doc says to avoid mixing allocator instead of forbiding itgamazeps-5/+6
2014-09-18Document that CStrings live in the libc heapgamazeps-7/+8
Closes issue #17067 and improves pr #17355
2014-09-18Document that CStrings live in the libc heapFelix Raimundo-4/+11
Insists on the fact that the memory is managed by malloc and not jemalloc Closes #17067
2014-09-16Fallout from renamingAaron Turon-12/+12
2014-09-09Remove some test warnings.Jonas Hietala-2/+2
2014-09-04auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, ↵bors-4/+4
r=alexcrichton I corrected spelling and capitalization errors in comments and strings.
2014-09-04auto merge of #16923 : wickerwaka/rust/crate-as-fixup, r=alexcrichtonbors-1/+1
Changed occurances of: extern crate foo = "bar"; to: extern crate "bar" as foo; Added warning for old deprecated syntax
2014-09-03Fix spelling errors and capitalization.Joseph Crail-4/+4
2014-09-03auto merge of #16940 : treeman/rust/fail-non-utf8, r=pnkfelixbors-1/+3
Closes #16877.
2014-09-03Remove cross-borrowing for traits.Nick Cameron-1/+1
Closes #15349 [breaking-change] Trait objects are no longer implicitly coerced from Box<T> to &T. You must make an explicit coercion using `&*`.
2014-09-02Prevent failure when using fail! with invalid utf8.Jonas Hietala-1/+3
Closes #16877.
2014-09-01Updated to new extern crate syntax.wickerwaka-1/+1
Added warning for old deprecated syntax
2014-09-01auto merge of #16871 : retep998/rust/win64-fix, r=alexcrichtonbors-1/+1
It was in a x86_64 block so the buildbots didn't notice it. Fixes #16905
2014-08-30auto merge of #16859 : alexcrichton/rust/snapshots, r=huonwbors-24/+0
2014-08-30Fix win64 regression introduced by #15773Peter Atashian-1/+1
Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-08-29Register new snapshotsAlex Crichton-24/+0
2014-08-30Add lint groups; define built-in lint groups `bad_style` and `unused`P1start-4/+4
This adds support for lint groups to the compiler. Lint groups are a way of grouping a number of lints together under one name. For example, this also defines a default lint for naming conventions, named `bad_style`. Writing `#[allow(bad_style)]` is equivalent to writing `#[allow(non_camel_case_types, non_snake_case, non_uppercase_statics)]`. These lint groups can also be defined as a compiler plugin using the new `Registry::register_lint_group` method. This also adds two built-in lint groups, `bad_style` and `unused`. The contents of these groups can be seen by running `rustc -W help`.
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-4/+4
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-28auto merge of #16664 : aturon/rust/stabilize-option-result, r=alexcrichtonbors-10/+10
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-10/+10
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-8/+29
2014-08-24native: Implement clone/close_accept for unixAlex Crichton-0/+4
This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for unix. A windows implementation is coming in a later commit. The clone implementation is based on atomic reference counting (as with all other clones), and the close_accept implementation is based on selecting on a self-pipe which signals that a close has been seen.
2014-08-23Remove stage0 attributes.Vadim Chugunov-6/+3
2014-08-22auto merge of #16647 : vhbit/rust/ios-build-fixes, r=alexcrichtonbors-1/+4
2014-08-21Fixed unwinding for iOSValerii Hiora-1/+4
Was broken by Windows adoption
2014-08-20librustc: handle repr on structs, require it for ffi, unify with packedCorey Richardson-0/+1
As of RFC 18, struct layout is undefined. Opting into a C-compatible struct layout is now down with #[repr(C)]. For consistency, specifying a packed layout is now also down with #[repr(packed)]. Both can be specified. To fix errors caused by this, just add #[repr(C)] to the structs, and change #[packed] to #[repr(packed)] Closes #14309 [breaking-change]
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-8/+8
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-16librustc: Forbid external crates, imports, and/or items from beingPatrick Walton-6/+13
declared with the same name in the same scope. This breaks several common patterns. First are unused imports: use foo::bar; use baz::bar; Change this code to the following: use baz::bar; Second, this patch breaks globs that import names that are shadowed by subsequent imports. For example: use foo::*; // including `bar` use baz::bar; Change this code to remove the glob: use foo::{boo, quux}; use baz::bar; Or qualify all uses of `bar`: use foo::{boo, quux}; use baz; ... baz::bar ... Finally, this patch breaks code that, at top level, explicitly imports `std` and doesn't disable the prelude. extern crate std; Because the prelude imports `std` implicitly, there is no need to explicitly import it; just remove such directives. The old behavior can be opted into via the `import_shadowing` feature gate. Use of this feature gate is discouraged. This implements RFC #116. Closes #16464. [breaking-change]
2014-08-12Replace #[cfg(target_os = "win32")] with #[cfg(target_os = "windows")]Vadim Chugunov-6/+12
2014-08-08Register new snapshot 12e0f72Niko Matsakis-16/+0
2014-08-08auto merge of #16285 : alexcrichton/rust/rename-share, r=huonwbors-1/+1
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-1/+1
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-38/+156
2014-08-06auto merge of #16258 : aturon/rust/stabilize-atomics, r=alexcrichtonbors-46/+46
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-05Renamed `record_stack_bounds` for clarity.Vadim Chugunov-14/+25
For a good measure, implemented target_record_stack_bounds for 32-bit Windows as well.
2014-08-05Added clarification regarding rust_try_inner.Vadim Chugunov-6/+13
2014-08-04Implement unwinding for Win64.Vadim Chugunov-26/+121
The original trick used to trigger unwinds would not work with GCC's implementation of SEH, so I had to invent a new one: rust_try now consists of two routines: the outer one, whose handler triggers unwinds, and the inner one, that stops unwinds by having a landing pad that swallows exceptions and passes them on to the outer routine via a normal return.
2014-08-04libnative should not mess with stack limits in the TIB. Only libgreen has a ↵Vadim Chugunov-1/+6
legitimate need to set them.
2014-08-04stabilize atomics (now atomic)Aaron Turon-46/+46
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]