Commit Graph

8 Commits

Author SHA1 Message Date
Chris Stankus
c5f9febc48 E0072 update error format 2016-08-10 13:37:59 -05:00
Niko Matsakis
3046ac217f Detect cycles and specialize error reporting for Sized. It is important
to get the `Sized` error usable, since that hits new users
frequently. Further work is needed for the error reporting for non-Sized
cycle cases; those currently just fallback to the old path. Also adjust tests.
2016-01-16 05:22:32 -05:00
Simonas Kazlauskas
77e9228b4a Improve invalid recursive types diagnostic 2015-07-29 01:57:24 +03:00
Eli Friedman
0eea0f6e90 Allow writing types which "can't" be instantiated.
The borrow checker doesn't allow constructing such a type at runtime
using safe code, but there isn't any reason to ban them in the type checker.

Included in this commit is an example of a neat static doubly-linked list.

Feature-gated under the static_recursion gate to be on the safe side, but
there are unlikely to be any reasons this shouldn't be turned on by
default.
2015-07-24 19:18:16 -07:00
Tamir Duberstein
d51047ded0 Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
Nick Cameron
ce0907e46e Add enum variants to the type namespace
Change to resolve and update compiler and libs for uses.

[breaking-change]

Enum variants are now in both the value and type namespaces. This means that
if you have a variant with the same name as a type in scope in a module, you
will get a name clash and thus an error. The solution is to either rename the
type or the variant.
2014-09-19 15:11:00 +12:00
Derek Guenther
730bdb6403 Added tests to make tidy 2014-02-07 12:49:24 -06:00
Johannes Muenzel
b46c0daa7b Add compile-fail tests for non-representable structs and enums 2014-01-29 20:33:51 -05:00