about summary refs log tree commit diff
path: root/src/librustc_back
AgeCommit message (Collapse)AuthorLines
2014-11-21rustc: Change all ABI constants to all caps.Ruud van Asseldonk-5/+2
This also removes `box_field_refcnt`. It was not used anywhere.
2014-11-21rustc: Unify fat pointer ABI constants.Ruud van Asseldonk-13/+10
This merges the `trt_field_*`, `fn_field_*` and `slice_elt_*` constants into two `FAT_PTR_*` constants. This resolves the first part of #18590.
2014-11-20auto merge of #19113 : nikomatsakis/rust/unboxed-boxed-closure-unification, ↵bors-4/+2
r=acrichto Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind). This supercedes PR #19089, which was already reviewed by @pcwalton.
2014-11-19rollup merge of #19073: jakub-/issue-19069Jakub Bukaj-3/+3
Fixes #19069. These were never intended not to be feature-gated but this PR is nonetheless a... [breaking-change]
2014-11-19Merge the ExprFnBlock and ExprUnboxedClosure into one ExprClosure with an ↵Niko Matsakis-4/+2
optional unboxed closure kind.
2014-11-19Rename json::List to json::ArrayCorey Farwell-1/+1
Fixes #19010
2014-11-18Feature gate non-ASCII lifetime identifiersJakub Bukaj-3/+3
Fixes #19069.
2014-11-19Make os::getcwd() return IoResult<Path>Barosl Lee-6/+6
os::getcwd() panics if the current directory is not available. According to getcwd(3), there are three cases: - EACCES: Permission denied. - ENOENT: The current working directory has been removed. - ERANGE: The buffer size is less than the actual absolute path. This commit makes os::getcwd() return IoResult<Path>, not just Path, preventing it from panicking. As os::make_absolute() depends on os::getcwd(), it is also modified to return IoResult<Path>. Fixes #16946. [breaking-change]
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+3
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-17Fix fallout from coercion removalNick Cameron-12/+12
2014-11-13Remove lots of numeric traits from the preludesBrendan Zabarauskas-0/+2
Num, NumCast, Unsigned, Float, Primitive and Int have been removed.
2014-11-13Deprecate Zero and One traitsBrendan Zabarauskas-2/+1
2014-11-13Deprecate Bounded traitBrendan Zabarauskas-2/+1
2014-11-13Move checked arithmetic operators into Int traitBrendan Zabarauskas-2/+2
2014-11-07Properly static lib packagingValerii Hiora-10/+17
Fixes #18574
2014-11-06rollup merge of #18683 : thestinger/typoAlex Crichton-4/+4
2014-11-06rollup merge of #18647 : jbcrail/rename-dragonflyAlex Crichton-1/+3
2014-11-06rollup merge of #18636 : luqmana/armfAlex Crichton-1/+1
2014-11-06fix typo in librustc target specDaniel Micay-4/+4
2014-11-05Add missing dragonfly module.Joseph Crail-0/+2
2014-11-05Rename misspelled module reference.Joseph Crail-1/+1
2014-11-05Make trans::adt know that some structs are unsizedNick Cameron-0/+3
2014-11-04librustc_back: Fix triple for linux armhf.Luqman Aden-1/+1
2014-11-04Update for collections reformCorey Richardson-4/+4
2014-11-04Don't use pie on AndroidCorey Richardson-0/+2
2014-11-04Same fix for dragonflyCorey Richardson-1/+4
2014-11-04Same fix for mac32Corey Richardson-2/+4
2014-11-04Use -m32 on 32bit LinuxCorey Richardson-1/+4
2014-11-04Implement flexible target specificationCorey Richardson-38/+1059
Removes all target-specific knowledge from rustc. Some targets have changed during this, but none of these should be very visible outside of cross-compilation. The changes make our targets more consistent. iX86-unknown-linux-gnu is now only available as i686-unknown-linux-gnu. We used to accept any value of X greater than 1. i686 was released in 1995, and should encompass the bare minimum of what Rust supports on x86 CPUs. The only two windows targets are now i686-pc-windows-gnu and x86_64-pc-windows-gnu. The iOS target has been renamed from arm-apple-ios to arm-apple-darwin. A complete list of the targets we accept now: arm-apple-darwin arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf i686-apple-darwin i686-pc-windows-gnu i686-unknown-freebsd i686-unknown-linux-gnu mips-unknown-linux-gnu mipsel-unknown-linux-gnu x86_64-apple-darwin x86_64-unknown-freebsd x86_64-unknown-linux-gnu x86_64-pc-windows-gnu Closes #16093 [breaking-change]
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-9/+9
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-16librustc: Stop generating visit glue and remove from TyDesc.Luqman Aden-2/+0
2014-10-13auto merge of #17733 : jgallagher/rust/while-let, r=alexcrichtonbors-0/+1
This is *heavily* based on `if let` (#17634) by @jakub- and @kballard This should close #17687
2014-10-11Fix cfg warnings in librustc_backMichael Gehring-2/+1
2014-10-10Handle `while let` desugaringJohn Gallagher-0/+1
2014-10-10auto merge of #17853 : alexcrichton/rust/issue-17718, r=pcwaltonbors-10/+10
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-09Use the same html_root_url for all docsBrian Anderson-1/+1
2014-10-09rustc: Convert statics to constantsAlex Crichton-10/+10
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-18/+18
2014-10-06Rename the file permission statics in std::io to be uppercaseP1start-3/+3
For example, this renames `GroupRWX` to `GROUP_RWX`, and deprecates the old name. Code using these statics should be updated accordingly.
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-0/+2
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-18/+18
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-2/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
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-18/+18
2014-10-01auto merge of #17630 : sfackler/rust/cfg-warnings, r=brsonbors-2/+2
Closes #17490
2014-10-01auto merge of #17584 : pcwalton/rust/range-patterns-dotdotdot, r=nick29581bors-1/+1
This breaks code that looks like: match foo { 1..3 => { ... } } Instead, write: match foo { 1...3 => { ... } } Closes #17295. r? @nick29581
2014-09-30Fix librustc_backSteven Fackler-2/+2