about summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
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
2014-09-21Move -Z lto to -C lto.Colin Davidson-4/+4
Closes #12443
2014-09-12Add regression test for #17186Brian Koropoff-0/+35
2014-09-07Added test for link path orderinginrustwetrust-0/+45
2014-09-05don't leave unwanted temporary files with --emit=ir/asmStuart Pernsteiner-5/+34
2014-09-05add tests for separate compilationStuart Pernsteiner-0/+149
2014-09-03Fix spelling errors and capitalization.Joseph Crail-2/+2
2014-08-30auto merge of #16419 : huonw/rust/pretty-expanded-hygiene, r=pnkfelixbors-0/+58
Different Identifiers and Names can have identical textual representations, but different internal representations, due to the macro hygiene machinery (syntax contexts and gensyms). This provides a way to see these internals by compiling with `--pretty expanded,hygiene`. This is useful for debugging & hacking on macros (e.g. diagnosing https://github.com/rust-lang/rust/issues/15750/https://github.com/rust-lang/rust/issues/15962 likely would've been faster with this functionality). E.g. ```rust #![feature(macro_rules)] // minimal junk #![no_std] macro_rules! foo { ($x: ident) => { y + $x } } fn bar() { foo!(x) } ``` ```rust #![feature(macro_rules)] // minimal junk #![no_std] fn bar /* 61#0 */() { y /* 60#2 */ + x /* 58#3 */ } ```
2014-08-30rustc: implement a pretty mode to print ident/name's ctxt & gensyms.Huon Wilson-0/+58
`--pretty expanded,hygiene` is helpful with debugging macro issues, since two identifiers/names can be textually the same, but different internally (resulting in weird "undefined variable" errors).
2014-08-29auto merge of #16767 : SiegeLord/rust/reexported_methods, r=cmrbors-0/+79
Previously, this caused methods of re-exported types to not be inserted into the search index. This fix may introduce some false positives, but in my testing they appear as orphaned methods and end up not being inserted into the final search index at a later stage. Fixes issue #11943
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-559/+829
2014-08-26Add a simple test for rustdoc search index contentsSiegeLord-0/+79
2014-08-26Rebasing changesNick Cameron-2/+2
2014-08-26DST coercions and DST structsNick Cameron-27/+27
[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-24Adjust the error messages to match the pattern "expected foo, found bar"Jonas Hietala-1/+1
Closes #8492
2014-08-20librustc: handle repr on structs, require it for ffi, unify with packedCorey Richardson-1/+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-19Add fix for test on windows.Luqman Aden-0/+2
2014-08-18Add test for passing/getting packed structs with ffi.Luqman Aden-0/+46
2014-08-18Remove workaround of #13793/#10872klutzy-5/+0
LLVM assertion error has been fixed recently: http://llvm.org/bugs/show_bug.cgi?id=18993 Fixes #13793
2014-08-15Properly canonicalize crate paths specified via --externBjörn Steinbrink-0/+63
Crates that are resolved normally have their path canonicalized and all symlinks resolved. This does currently not happen for paths specified using the --extern option to rustc, which can lead to rustc thinking that it encountered two different versions of a crate, when it's actually the same version found through different paths. To fix this, we must store the canonical path for crates found via --extern and also use the canonical path when comparing paths. Fixes #16496
2014-08-13rustc lexer: regression tests for embedded Idents.Felix S. Klock II-0/+72
I chose to make two of them because I wanted something close to an "end-to-end" test (*), but at the same time I wanted a test that would run on Windows (**). (*) The run-make test serves as the end-to-end: It constructs an input that is trying to subvert the hack and we are going to check that it fails in the attempt). (**) The compile-fail-fulldeps test serves as a more narrow test that will be tested on all platforms. It also attempts to subvert the hack, testing that when you use `new_parser_from_tts`, the resulting parser does not support reading embedded Idents.
2014-08-12auto merge of #16434 : vadimcn/rust/many-crates-but-no-match, r=alexcrichtonbors-2/+2
2014-08-11Fix many-crates-but-no-match test. (Issue #16348)Vadim Chugunov-2/+2
2014-08-09Fix misspelled comments for tests.Joseph Crail-1/+1
2014-08-09auto merge of #16359 : epdtry/rust/mono-item-dedup-foreign, r=alexcrichtonbors-3/+12
Extend the changes from #16059 to the new generic foreign functions introduced by #15831.
2014-08-09auto merge of #16326 : pnkfelix/rust/fsk-add-path-suffix-lookup, r=huonwbors-0/+82
Extended `ast_map::Map` with an iterator over all node id's that match a path suffix. Extended pretty printer to let users choose particular items to pretty print, either by indicating an integer node-id, or by providing a path suffix. * Example 1: the suffix `typeck::check::check_struct` matches the item with the path `rustc::middle::typeck::check::check_struct` when compiling the `rustc` crate. * Example 2: the suffix `and` matches `core::option::Option::and` and `core::result::Result::and` when compiling the `core` crate. Refactored `pprust` slightly to support the pretty printer changes. (See individual commits for more description.)
2014-08-09pretty printer: Added some `run-make` tests of path-suffix lookup functionality.Felix S. Klock II-0/+82
2014-08-09auto merge of #15964 : huonw/rust/gensym-test, r=alexcrichtonbors-0/+26
This requires avoiding `quote_...!` for constructing the parts of the __test module, since that stringifies and reinterns the idents, losing the special gensym'd nature of them. (#15962.)
2014-08-09move a test into a run make, to check external affect rather thanHuon Wilson-0/+26
implementation details. (Mainly to avoid accessing the secret internal test module symbol name.)
2014-08-08don't translate items when monomorphizing foreign-ABI functionsStuart Pernsteiner-3/+12
2014-08-05Add new tests for extern and foreign fns and name mangling.Russell-0/+40