about summary refs log tree commit diff
path: root/src/test/compile-fail/regions-close-object-into-object-5.rs
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-36/+0
2017-10-25Update compile-fail tests for error message deduplication.Michael Woerister-1/+0
2015-12-18Make RFC 1214 warnings into errors, and rip out the "warn or err"Niko Matsakis-3/+3
associated machinery. Future such attempts should go through lints anyhow. There is a fair amount of fallout in the compile-fail tests, as WF checking now occurs earlier in the process.
2015-08-12Fallout in tests --- misc error message changes, WF fixesNiko Matsakis-2/+9
2015-03-25Add trivial cast lints.Nick Cameron-0/+1
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-1/+0
2015-02-18Round 3 test fixes and conflictsAlex Crichton-3/+1
2015-02-18Missing test.Niko Matsakis-0/+32