summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
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
2014-08-05Allow generic foreign functions.Russell-0/+80
Generic extern functions written in Rust have their names mangled, as well as their internal clownshoe __rust_abi functions. This allows e.g. specific monomorphizations of these functions to be used as callbacks. Closes #12502.
2014-08-04rustc: Link entire archives of native librariesAlex Crichton-3/+82
As discovered in #15460, a particular #[link(kind = "static", ...)] line is not actually guaranteed to link the library at all. The reason for this is that if the external library doesn't have any referenced symbols in the object generated by rustc, the entire library is dropped by the linker. For dynamic native libraries, this is solved by passing -lfoo for all downstream compilations unconditionally. For static libraries in rlibs this is solved because the entire archive is bundled in the rlib. The only situation in which this was a problem was when a static native library was linked to a rust dynamic library. This commit brings the behavior of dylibs in line with rlibs by passing the --whole-archive flag to the linker when linking native libraries. On OSX, this uses the -force_load flag. This flag ensures that the entire archive is considered candidate for being linked into the final dynamic library. This is a breaking change because if any static library is included twice in the same compilation unit then the linker will start emitting errors about duplicate definitions now. The fix for this would involve only statically linking to a library once. Closes #15460 [breaking-change]
2014-08-04rustc: use Name numbers rather than the Show impl for constants.Huon Wilson-0/+35
Using the Show impl for Names created global symbols with names like `"str\"str\"(1027)"`. This adjusts strings, binaries and vtables to avoid using that impl. Fixes #15799.
2014-07-30avoid redundant translation of items during monomorphizationStuart Pernsteiner-0/+32
2014-07-29syntax: add support for quoting armsErick Tryzelaar-4/+4
2014-07-25librustc: Disallow mutation and assignment in pattern guards, and modifyPatrick Walton-29/+35
the CFG for match statements. There were two bugs in issue #14684. One was simply that the borrow check didn't know about the correct CFG for match statements: the pattern must be a predecessor of the guard. This disallows the bad behavior if there are bindings in the pattern. But it isn't enough to prevent the memory safety problem, because of wildcards; thus, this patch introduces a more restrictive rule, which disallows assignments and mutable borrows inside guards outright. I discussed this with Niko and we decided this was the best plan of action. This breaks code that performs mutable borrows in pattern guards. Most commonly, the code looks like this: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz if self.f(...) => { ... } _ => { ... } } } } Change this code to not use a guard. For example: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz => { if self.f(...) { ... } else { ... } } _ => { ... } } } } Sometimes this can result in code duplication, but often it illustrates a hidden memory safety problem. Closes #14684. [breaking-change]
2014-07-21rustc: Append platform exe suffix to output filesAlex Crichton-3/+4
Closes #15828