summary refs log tree commit diff
path: root/src/test/run-pass/const-enum-vec-index.rs
AgeCommit message (Collapse)AuthorLines
2014-08-26DST coercions and DST structsNick Cameron-0/+12
[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.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-2/+2
Who doesn't like a massive renaming?
2013-09-30rpass: Remove usage of fmt!Alex Crichton-2/+2
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-1/+1
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-1/+1
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-3/+3
2013-03-07test: Fix tests.Patrick Walton-1/+1
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-17`pub fn main` for run-pass tests that didn't have itJed Davis-1/+1
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-2/+2
2013-02-07Fix vector indexing in consts so it works with the enum vector const fix.Jed Davis-0/+25