about summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2014-02-08Fixed error starting with uppercasemr.Shu-19/+19
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-02-08Update docs and tests for #[deriving(Show)].Huon Wilson-0/+100
2014-02-07Added tests to make tidyDerek Guenther-67/+948
2014-02-07Removed @self and @Trait.Eduard Burtescu-106/+20
2014-02-05move concurrent stuff from libextra to libsyncJeremyLetang-52/+52
2014-02-05auto merge of #12025 : lilac/rust/feature-gate-quote, r=brsonbors-0/+2
Closes #11630.
2014-02-04auto merge of #12023 : nick29581/rust/err_res, r=alexcrichtonbors-0/+24
closes #3512
2014-02-04auto merge of #12018 : alexcrichton/rust/triage, r=sfacklerbors-5/+5
Mostly just test suite modifications.
2014-02-04Make cfail test error messages more preciseAlex Crichton-5/+5
Closes #3192
2014-02-05Check for trait impl conflicts across cratesNick Cameron-0/+24
2014-02-04Replaced with a single "quote" feature gate.James Deng-2/+2
2014-02-04Feature gate all quasi-quoting macros.James Deng-0/+2
2014-02-04Replace NonCopyable usage with NoPodFlavio Percoco-2/+3
cc #10834
2014-02-02Substitute type params in default type params using them.Eduard Burtescu-0/+28
2014-02-01auto merge of #11974 : huonw/rust/no-at-vec, r=pcwaltonbors-34/+3
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find. I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship. Closes #11967
2014-02-02Update/delete tests using @[].Huon Wilson-21/+3
2014-02-02librustc: Remove `@str` from the languagePatrick Walton-1/+0
2014-02-02test: Remove `@str` from the test suitePatrick Walton-12/+0
2014-02-01auto merge of #11932 : dmanescu/rust/11741-stability-cross-crate, r=alexcrichtonbors-2/+30
Fixes #11741 Added tests and removed xfail-fast from run-pass/simd-experimental which is now fixed (see #11738).
2014-01-31Remove the obsolete handler for `impl A;`.Huon Wilson-0/+11
This is has been obsolete for quite a while now (including a release), so removing the special handling seems fine. (The error message is quite good still anyway.) Fixes #9580.
2014-01-31Add test for sensible #[start] error message.Huon Wilson-0/+15
Fixes #9575.
2014-01-31Add test cases for #4063.OGINO Masanori-0/+15
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-01-31Fix minor doc typosVirgile Andreani-1/+1
2014-01-31Introduce marker types for indicating variance and for opting outNiko Matsakis-15/+208
of builtin bounds. Fixes #10834. Fixes #11385. cc #5922.
2014-01-31auto merge of #11929 : FlaPer87/rust/issue-11681, r=huonwbors-0/+29
closes #11681
2014-01-31Handle attributes on cross-crate tuple-structs correctlyDavid Manescu-2/+30
Fixes #11741
2014-01-30Implement default type parameters in generics.Eduard Burtescu-2/+177
2014-01-30Add test case for issue #11681Flavio Percoco-0/+29
2014-01-29auto merge of #11839 : typelist/rust/issue3008, r=huonwbors-0/+64
It was possible to trigger a stack overflow in rustc because the routine used to verify enum representability, type_structurally_contains, would recurse on inner types until hitting the original type. The overflow condition was when a different structurally recursive type (enum or struct) was contained in the type being checked. I suspect my solution isn't as efficient as it could be. I pondered adding a cache of previously-seen types to avoid duplicating work (if enums A and B both contain type C, my code goes through C twice), but I didn't want to do anything that may not be necessary. I'm a new contributor, so please pay particular attention to any unidiomatic code, misuse of terminology, bad naming of tests, or similar horribleness :) Updated to verify struct representability as well. Fixes #3008. Fixes #3779.
2014-01-29auto merge of #11672 : bjz/rust/remove-times, r=brsonbors-3/+3
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal (which I liked) was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-30Remove Times traitBrendan Zabarauskas-3/+3
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
2014-01-29Add compile-fail tests for non-representable structs and enumsJohannes Muenzel-0/+64
2014-01-29auto merge of #11776 : FlaPer87/rust/issue-11681-static-lifetime, r=nikomatsakisbors-21/+32
Closes #11681 Closes #11854
2014-01-29Fixes temporary lifetime computation for static itemsFlavio Percoco-21/+0
closes: #11854
2014-01-29auto merge of #11754 : alexcrichton/rust/unused-result, r=brsonbors-0/+40
The general consensus is that we want to move away from conditions for I/O, and I propose a two-step plan for doing so: 1. Warn about unused `Result` types. When all of I/O returns `Result`, it will require you inspect the return value for an error *only if* you have a result you want to look at. By default, for things like `write` returning `Result<(), Error>`, these will all go silently ignored. This lint will prevent blind ignorance of these return values, letting you know that there's something you should do about them. 2. Implement a `try!` macro: ``` macro_rules! try( ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) }) ) ``` With these two tools combined, I feel that we get almost all the benefits of conditions. The first step (the lint) is a sanity check that you're not ignoring return values at callsites. The second step is to provide a convenience method of returning early out of a sequence of computations. After thinking about this for awhile, I don't think that we need the so-called "do-notation" in the compiler itself because I think it's just *too* specialized. Additionally, the `try!` macro is super lightweight, easy to understand, and works almost everywhere. As soon as you want to do something more fancy, my answer is "use match". Basically, with these two tools in action, I would be comfortable removing conditions. What do others think about this strategy? ---- This PR specifically implements the `unused_result` lint. I actually added two lints, `unused_result` and `unused_must_use`, and the first commit has the rationale for why `unused_result` is turned off by default.
2014-01-29auto merge of #11868 : bytbox/rust/remove-do, r=alexcrichtonbors-80/+21
Fixes #10815.
2014-01-29Remove do keyword from test/Scott Lawrence-80/+21
2014-01-29Treat unary struct and enum variants as rvaluesFlavio Percoco-0/+32
Closes #11681
2014-01-28Implement an unused_result lintAlex Crichton-0/+40
I attempted to implement the lint in two steps. My first attempt was a default-warn lint about *all* unused results. While this attempt did indeed find many possible bugs, I felt that the false-positive rate was too high to be turned on by default for all of Rust. My second attempt was to make unused-result a default-allow lint, but allow certain types to opt-in to the notion of "you must use this". For example, the Result type is now flagged with #[must_use]. This lint about "must use" types is warn by default (it's different from unused-result). The unused_must_use lint had a 100% hit rate in the compiler, but there's not that many places that return Result right now. I believe that this lint is a crucial step towards moving away from conditions for I/O (because all I/O will return Result by default). I'm worried that this lint is a little too specific to Result itself, but I believe that the false positive rate for the unused_result lint is too high to make it useful when turned on by default.
2014-01-28Add test case for #3243, which was fixed as part of fix for #3511.Niko Matsakis-7/+6
(Lifetime of stack allocated vectors was not being enforced) Closes #3243.
2014-01-27auto merge of #11738 : dmanescu/rust/11721, r=alexcrichtonbors-0/+35
Fixes #11721
2014-01-27auto merge of #11826 : huonw/rust/7621-deriving-errors, r=alexcrichtonbors-8/+24
cc #7621. See the commit message. I'm not sure if we should merge this now, or wait until we can write `Clone::clone(x)` which will directly solve the above issue with perfect error messages.
2014-01-27can borrow mut in proc Fixes #10617Nick Desaulniers-50/+0
2014-01-28syntax: make deriving have slightly less cryptic error messages.Huon Wilson-8/+24
This unfortunately changes an error like error: mismatched types: expected `&&NotClone` but found `&NotClone` into error: type `NotClone` does not implement any method in scope named `clone`
2014-01-27auto merge of #11595 : eddyb/rust/env-et-self-no-more, r=nikomatsakisbors-8/+48
Non-exhaustive change list: * `self` is now present in argument lists (modulo type-checking code I don't trust myself to refactor) * methods have the same calling convention as bare functions (including the self argument) * the env param is gone from all bare functions (and methods), only used by closures and `proc`s * bare functions can only be coerced to closures and `proc`s if they are statically resolved, as they now require creating a wrapper specific to that function, to avoid indirect wrappers (equivalent to `impl<..Args, Ret> Fn<..Args, Ret> for fn(..Args) -> Ret`) that might not be optimizable by LLVM and don't work for `proc`s * refactored some `trans::closure` code, leading to the removal of `trans::glue::make_free_glue` and `ty_opaque_closure_ptr`
2014-01-28Feature gate #[simd]David Manescu-0/+35
Fixes #11721
2014-01-27Feature gate trace_macros.xales-0/+16
Fixes #11631
2014-01-27Demote self to an (almost) regular argument and remove the env param.Eduard Burtescu-8/+48
Fixes #10667 and closes #10259.
2014-01-27auto merge of #11834 : huonw/rust/deriving-spans, r=alexcrichtonbors-28/+781
I'd forgotten to update them when I changed this a while ago; it now displays error messages linked to the struct/variant field, rather than the `#[deriving(Trait)]` line, for all traits. This also adds a very large number of autogenerated tests. I can easily remove/tone down that commit if necessary.
2014-01-27Add autogenerated tests for the spans of various derived traits.Huon Wilson-28/+781