rust/src/libsyntax/util
bors 440ef8b154 Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakis
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below.

This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided.
So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all.
In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone.

Part of https://github.com/rust-lang/rust/issues/23416
2015-12-19 02:45:15 +00:00
..
interner.rs
lev_distance.rs Introduce max_suggestion_distance function to avoid duplicating the heuristic 2015-11-27 17:52:29 +01:00
move_map.rs Deprecate name OwnedSlice and don't use it 2015-12-18 00:52:56 +03:00
node_count.rs
parser_testing.rs
parser.rs Add ExprType to HIR and make everything compile 2015-12-16 17:13:16 +03:00
small_vector.rs remove deprecated APIs missed in #30182 2015-12-13 01:02:12 -05:00