Skip to content

Commit 91e1876

Browse files
committed
---
yaml --- r: 23768 b: refs/heads/master c: c5e2cf2 h: refs/heads/master v: v3
1 parent b0b6bf6 commit 91e1876

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ee4ba4490d1f49c8aef12a5194a4e9b50dfc87fa
2+
refs/heads/master: c5e2cf2ee5b47a526b2eeebf26312fb184fcf7a6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/rustc/middle/typeck/check.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,8 @@ fn do_autoderef(fcx: @fn_ctxt, sp: span, t: ty::t) -> ty::t {
749749

750750
// Some extra checks to detect weird cycles and so forth:
751751
match sty {
752-
ty::ty_box(inner) | ty::ty_uniq(inner) | ty::ty_rptr(_, inner) => {
752+
ty::ty_box(inner) | ty::ty_uniq(inner) |
753+
ty::ty_rptr(_, inner) => {
753754
match ty::get(t1).struct {
754755
ty::ty_infer(ty::TyVar(v1)) => {
755756
ty::occurs_check(fcx.ccx.tcx, sp, v1,
@@ -759,11 +760,12 @@ fn do_autoderef(fcx: @fn_ctxt, sp: span, t: ty::t) -> ty::t {
759760
}
760761
}
761762
ty::ty_enum(did, _) => {
762-
// Watch out for a type like `enum t = @t`. Such a type would
763-
// otherwise infinitely auto-deref. This is the only autoderef
764-
// loop that needs to be concerned with this, as an error will be
765-
// reported on the enum definition as well because the enum is not
766-
// instantiable.
763+
// Watch out for a type like `enum t = @t`. Such a
764+
// type would otherwise infinitely auto-deref. This
765+
// is the only autoderef loop that needs to be
766+
// concerned with this, as an error will be reported
767+
// on the enum definition as well because the enum is
768+
// not instantiable.
767769
if vec::contains(enum_dids, did) {
768770
return t1;
769771
}

0 commit comments

Comments
 (0)