about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-07-25 16:40:43 +0300
committerNiko Matsakis <niko@alum.mit.edu>2018-07-25 16:40:43 +0300
commit21e4a0834e4b02701aff235a3d92f6c659580f8f (patch)
tree8972a6ff4c991bc041b4f647f4a216dde15a75e5
parent3171cbe9867485d1902d8ee3e6e6014291dce396 (diff)
downloadrust-21e4a0834e4b02701aff235a3d92f6c659580f8f.tar.gz
rust-21e4a0834e4b02701aff235a3d92f6c659580f8f.zip
Nit: improve comment in hr-fn-aau-eq-abu.rs
-rw-r--r--src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs b/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs
index d62354fece6..9b8268d9736 100644
--- a/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs
+++ b/src/test/ui/nll/relate_tys/hr-fn-aau-eq-abu.rs
@@ -8,12 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test an interesting corner case: a fn that takes two arguments that
-// are references with the same lifetime is in fact equivalent to a fn
-// that takes two references with distinct lifetimes. This is true
-// because the two functions can call one another -- effectively, the
-// single lifetime `'a` is just inferred to be the intersection of the
-// two distinct lifetimes.
+// Test an interesting corner case that ought to be legal (though the
+// current code actually gets it wrong, see below): a fn that takes
+// two arguments that are references with the same lifetime is in fact
+// equivalent to a fn that takes two references with distinct
+// lifetimes. This is true because the two functions can call one
+// another -- effectively, the single lifetime `'a` is just inferred
+// to be the intersection of the two distinct lifetimes.
+//
+// FIXME: However, we currently reject this example with an error,
+// because of how we handle binders and equality in `relate_tys`.
 //
 // compile-flags:-Zno-leak-check
 
@@ -28,10 +32,6 @@ fn make_cell_aa() -> Cell<for<'a> fn(&'a u32, &'a u32)> {
 fn aa_eq_ab() {
     let a: Cell<for<'a, 'b> fn(&'a u32, &'b u32)> = make_cell_aa();
     //~^ ERROR higher-ranked subtype error
-    //
-    // FIXME -- this .. arguably ought to be accepted. However, the
-    // current leak check also rejects this example, and it's kind of
-    // a pain to support it. There are some comments in `relate_tys`
     drop(a);
 }