about summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2014-12-23Rename include_bin! to include_bytes!Chris Wong-1/+1
According to [RFC 344][], methods that return `&[u8]` should have names ending in `bytes`. Though `include_bin!` is a macro not a method, it seems reasonable to follow the convention anyway. We keep the old name around for now, but trigger a deprecation warning when it is used. [RFC 344]: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md [breaking-change]
2014-12-22fix run-make/ tests now flowgraph printing has moved to the unstable ↵Felix S. Klock II-1/+1
`--xpretty` option.
2014-12-21rollup merge of #20057: nick29581/array-syntaxAlex Crichton-3/+3
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported. Part of #19999 r? @nikomatsakis
2014-12-20auto merge of #19900 : alexcrichton/rust/compiler-flags, r=cmrbors-19/+17
This commit shuffles around some CLI flags of the compiler to some more stable locations with some renamings. The changes made were: * The `-v` flag has been repurposes as the "verbose" flag. The version flag has been renamed to `-V`. * The `-h` screen has been split into two parts. Most top-level options (not all) show with `-h`, and the remaining options (generally obscure) can be shown with `--help -v` which is a "verbose help screen" * The `-V` flag (version flag now) has lost its argument as it is now requested with `rustc -vV` "verbose version". * The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir` and `llvm-bc` to emphasize that they are LLVM's IR/bytecode. * The `--emit` option has grown a new variant, `dep-info`, which subsumes the `--dep-info` CLI argument. The `--dep-info` flag is now deprecated. * The `--parse-only`, `--no-trans`, `--no-analysis`, and `--pretty` flags have moved behind the `-Z` family of flags. * The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C` flag. * The `--print-file-name` and `--print-crate-name` flags were moved behind one global `--print` flag which now accepts one of `crate-name`, `file-names`, or `sysroot`. This global `--print` flag is intended to serve as a mechanism for learning various metadata about the compiler itself. * The top-level `--pretty` flag was moved to a number of `-Z` options. No warnings are currently enabled to allow tools like Cargo to have time to migrate to the new flags before spraying warnings to all users. cc https://github.com/rust-lang/rust/issues/19051
2014-12-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-3/+3
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
2014-12-19rustc: Start "stabilizing" some flagsAlex Crichton-19/+17
This commit shuffles around some CLI flags of the compiler to some more stable locations with some renamings. The changes made were: * The `-v` flag has been repurposes as the "verbose" flag. The version flag has been renamed to `-V`. * The `-h` screen has been split into two parts. Most top-level options (not all) show with `-h`, and the remaining options (generally obscure) can be shown with `--help -v` which is a "verbose help screen" * The `-V` flag (version flag now) has lost its argument as it is now requested with `rustc -vV` "verbose version". * The `--emit` option has had its `ir` and `bc` variants renamed to `llvm-ir` and `llvm-bc` to emphasize that they are LLVM's IR/bytecode. * The `--emit` option has grown a new variant, `dep-info`, which subsumes the `--dep-info` CLI argument. The `--dep-info` flag is now deprecated. * The `--parse-only`, `--no-trans`, and `--no-analysis` flags have moved behind the `-Z` family of flags. * The `--debuginfo` and `--opt-level` flags were moved behind the top-level `-C` flag. * The `--print-file-name` and `--print-crate-name` flags were moved behind one global `--print` flag which now accepts one of `crate-name`, `file-names`, or `sysroot`. This global `--print` flag is intended to serve as a mechanism for learning various metadata about the compiler itself. No warnings are currently enabled to allow tools like Cargo to have time to migrate to the new flags before spraying warnings to all users.
2014-12-18Revise std::thread API to join by defaultAaron Turon-52/+0
This commit is part of a series that introduces a `std::thread` API to replace `std::task`. In the new API, `spawn` returns a `JoinGuard`, which by default will join the spawned thread when dropped. It can also be used to join explicitly at any time, returning the thread's result. Alternatively, the spawned thread can be explicitly detached (so no join takes place). As part of this change, Rust processes now terminate when the main thread exits, even if other detached threads are still running, moving Rust closer to standard threading models. This new behavior may break code that was relying on the previously implicit join-all. In addition to the above, the new thread API also offers some built-in support for building blocking abstractions in user space; see the module doc for details. Closes #18000 [breaking-change]
2014-12-14Mostly rote conversion of `proc()` to `move||` (and occasionally `Thunk::new`)Niko Matsakis-4/+5
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+5
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-05Fix various references in late-running tests and thingsNiko Matsakis-4/+4
2014-12-02test/run-make: another missing $(EXTRACFLAGS).NODA, Kai-1/+1
rust-lang/rust@102b1a5bf1a60eeafb752844e5c98fe5f4e3b992 was not enough! Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-11-29Fix rustc panic on second compile_inputMurarth-0/+71
2014-11-22auto merge of #19133 : nodakai/rust/run-make-tests-missing-extracflags, ↵bors-2/+2
r=alexcrichton Missing `$(EXTRACFLAGS)` resutled in compile failures.
2014-11-20Fallout from libgreen and libnative removalAaron Turon-2/+2
2014-11-20test/run-make: some test cases lacked $(EXTRACFLAGS).NODA, Kai-2/+2
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-11-18rollup merge of #18890: luqmana/tfJakub Bukaj-0/+40
This is especially useful for declaring a static with external linkage in an executable. There isn't any way to do that currently since we mark everything in an executable as internal by default. Also, a quick fix to have the no-compiler-rt target option respected when building staticlibs as well.
2014-11-17Add tests.Luqman Aden-0/+40
2014-11-17Switch to purely namespaced enumsSteven Fackler-14/+14
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-15Slightly improved rustc error messages for invalid -C argumentsinrustwetrust-0/+35
2014-11-13Tweak and add test for detecting libraries with mismatching target triples.Huon Wilson-0/+33
Closes #10814.
2014-11-07rustc: Process #[cfg]/#[cfg_attr] on cratesAlex Crichton-5/+5
This commit implements processing these two attributes at the crate level as well as at the item level. When #[cfg] is applied at the crate level, then the entire crate will be omitted if the cfg doesn't match. The #[cfg_attr] attribute is processed as usual in that the attribute is included or not depending on whether the cfg matches. This was spurred on by motivations of #18585 where #[cfg_attr] annotations will be applied at the crate-level. cc #18585
2014-11-06rollup merge of #18684 : nathan7/patch-1Alex Crichton-4/+5
2014-11-06rollup merge of #18633 : huonw/target-spec-spellingAlex Crichton-1/+1
2014-11-06Make x86_64-unknown-linux-gnu.json true to its nameNathan Zadoks-4/+5
2014-11-05auto merge of #18592 : alexcrichton/rust/dylib-harder, r=pcwaltonbors-30/+87
If a dylib is being produced, the compiler will now first check to see if it can be created entirely statically before falling back to dynamic dependencies. This behavior can be overridden with `-C prefer-dynamic`. Due to the alteration in behavior, this is a breaking change. Any previous users relying on dylibs implicitly maximizing dynamic dependencies should start passing `-C prefer-dynamic` to compilations. Closes #18499 [breaking-change]
2014-11-05test: correct spelling error & inverted match.Huon Wilson-1/+1
2014-11-04Implement flexible target specificationCorey Richardson-0/+65
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-11-03rustc: Default to static linking dylibsAlex Crichton-30/+87
If a dylib is being produced, the compiler will now first check to see if it can be created entirely statically before falling back to dynamic dependencies. This behavior can be overridden with `-C prefer-dynamic`. Due to the alteration in behavior, this is a breaking change. Any previous users relying on dylibs implicitly maximizing dynamic dependencies should start passing `-C prefer-dynamic` to compilations. Closes #18499 [breaking-change]
2014-10-30rustc: Implement -l and include! tweaksAlex Crichton-0/+43
This is an implementation of the rustc bits of [RFC 403][rfc]. This adds a new flag to the compiler, `-l`, as well as tweaking the `include!` macro (and related source-centric macros). The compiler's new `-l` flag is used to link libraries in from the command line. This flag stacks with `#[link]` directives already found in the program. The purpose of this flag, also stated in the RFC, is to ease linking against native libraries which have wildly different requirements across platforms and even within distributions of one platform. This flag accepts a string of the form `NAME[:KIND]` where `KIND` is optional or one of dylib, static, or framework. This is roughly equivalent to if the equivalent `#[link]` directive were just written in the program. The `include!` macro has been modified to recursively expand macros to allow usage of `concat!` as an argument, for example. The use case spelled out in RFC 403 was for `env!` to be used as well to include compile-time generated files. The macro also received a bit of tweaking to allow it to expand to either an expression or a series of items, depending on what context it's used in. [rfc]: https://github.com/rust-lang/rfcs/pull/403
2014-10-29Update infrastructure for fail -> panicSteve Klabnik-2/+2
This includes updating the language items and marking what needs to change after a snapshot. If you do not use the standard library, the language items you need to implement have changed. For example: ```rust #[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} } ``` is now ```rust #[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} } ``` Related, lesser-implemented language items `fail` and `fail_bounds_check` have become `panic` and `panic_bounds_check`, as well. These are implemented by `libcore`, so it is unlikely (though possible!) that these two renamings will affect you. [breaking-change] Fix test suite
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
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-19Remove a large amount of deprecated functionalityAlex Crichton-15/+16
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-12Continue cfg syntax transitionSteven Fackler-2/+2
All deprecation warnings have been converted to errors. This includes the warning for multiple cfgs on one item. We'll leave that as an error for some period of time to ensure that all uses are updated before the behavior changes from "or" to "and".
2014-10-10auto merge of #17037 : kmcallister/rust/no-stack-check, r=thestingerbors-0/+64
r? @brson Fixes #16980.
2014-10-09Disable no-stack-check test on WindowsKeegan McAllister-0/+6
2014-10-09Add tests for no-stack-check attr and codegen optionKeegan McAllister-0/+58
2014-10-09test: Convert statics to constantsAlex Crichton-8/+3
Additionally, add lots of tests for new functionality around statics and `static mut`.
2014-10-05auto merge of #16970 : kmcallister/rust/llvm-unreachable, r=thestingerbors-0/+57
I'm not sure how to add an automated test for this.
2014-10-04Add tests for intrinsics::unreachableKeegan McAllister-0/+57
2014-10-02test: Don't depend on /bin/bashAlex Crichton-1/+1
Our FreeBSD bots apparently don't have bash installed, and it's ok to run with sh anyway! Unblocks a snapshot
2014-10-02auto merge of #17681 : jgallagher/rust/dep-info-escape-spaces, r=alexcrichtonbors-0/+68
cc #17627
2014-10-01Remove all use of librustuvAaron Turon-52/+0
2014-10-01Make --dep-info escape spaces in filenamesJohn Gallagher-0/+68
Closes #17627
2014-09-29rollup merge of #17619 : wizeman/fix-permAlex Crichton-0/+36
2014-09-29rollup merge of #17531 : tomjakubowski/rustdoc-where-clausesAlex Crichton-0/+55
2014-09-29rustdoc: Render where clauses as appropriateTom Jakubowski-0/+55
Fix #16546
2014-09-29rustc: Fix permission denied error in 'ar' when lto is enabledRicardo M. Correia-0/+36
The reason that 'ar' can fail with permission denied is that when link-time optimizations are enabled, rustc copies libraries into a temporary directory, preserving file permissions, and subsequently modifies them using 'ar'. The modification can fail because some package managers may install libraries in system directories as read-only files, which means the temporary file also becomes read-only when it is copied. I have fixed this by giving the temporary file's owner read+write permissions after the copy. I have also added a regression test for this issue.
2014-09-25Fix various places that were affected by adding core as dep of libcNiko Matsakis-0/+2
2014-09-23rustdoc: Don't try to inline the crate rootAlex Crichton-1/+52
Fixes other test cases found in #16274
2014-09-23rustdoc: Prevent infinite recursion when inliningAlex Crichton-0/+35
Cyclic pub-use chains triggered infinite recursion, and this commit adds a hash set to guard against cyclic recursion. This will cause one of the reexports to render as a `pub use` instead of inlining the documentation. Closes #16274