Refactor TypeContents to be more scrutable. In particular, create coarser bits

than the current ones, which were very fine-grained.  Also, cleanly distinguish
when properties must be found in *owned* types vs *reachable* types.

Fixes #10157
Fixes #10278
This commit is contained in:
Niko Matsakis 2013-10-29 16:08:49 -04:00
parent 7fb583be7b
commit f3191a450c
2 changed files with 234 additions and 244 deletions

View file

@ -0,0 +1,12 @@
// Tests that an `&` pointer to something inherently mutable is itself
// to be considered mutable.
#[no_freeze]
enum Foo { A }
fn bar<T: Freeze>(_: T) {}
fn main() {
let x = A;
bar(&x); //~ ERROR type parameter with an incompatible type
}