about summary refs log tree commit diff
path: root/src/test/compile-fail/issue-4523.rs
AgeCommit message (Collapse)AuthorLines
2015-01-05fix cfail testsJorge Aparicio-17/+0
2014-08-26DST coercions and DST structsNick Cameron-2/+2
[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-04-08Register new snapshotsAlex Crichton-1/+1
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-06-23Fix error messages in test cases, since fns/traits now pretty-print with a ↵Ben Blum-1/+1
bounds list
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-1/+1
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-1/+1
notation. rs=delifetiming
2013-03-06Add manual &self/ and &static/ and /&self declarations thatNiko Matsakis-1/+1
are currently inferred. New rules are coming that will require them to be explicit. All add some explicit self declarations.
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-1/+1
rs=implflipping
2013-02-05testsuite: Add test for #4523Tim Chevalier-0/+17