about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-11-18 09:42:47 -0500
committerNiko Matsakis <niko@alum.mit.edu>2016-11-18 10:13:30 -0500
commit95c6c9939c959ed233cee326a2e91bcff72eca25 (patch)
treec91f00a3786312f1fab262b8ce50b0286ee81b5c
parent30b97aa410af0a2e1405e7dde9f9f0f28ae14f60 (diff)
downloadrust-95c6c9939c959ed233cee326a2e91bcff72eca25.tar.gz
rust-95c6c9939c959ed233cee326a2e91bcff72eca25.zip
improve comments
-rw-r--r--src/test/incremental/change_add_field/struct_point.rs28
-rw-r--r--src/test/incremental/change_pub_inherent_method_body/struct_point.rs7
-rw-r--r--src/test/incremental/change_pub_inherent_method_sig/struct_point.rs7
3 files changed, 31 insertions, 11 deletions
diff --git a/src/test/incremental/change_add_field/struct_point.rs b/src/test/incremental/change_add_field/struct_point.rs
index 0858a55ed32..261eb38a51a 100644
--- a/src/test/incremental/change_add_field/struct_point.rs
+++ b/src/test/incremental/change_add_field/struct_point.rs
@@ -69,7 +69,13 @@ mod point {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn that has the changed type in its signature; must currently be
+/// rebuilt.
+///
+/// You could imagine that, in the future, if the change were
+/// sufficiently "private", we might not need to type-check again.
+/// Rebuilding is probably always necessary since the layout may be
+/// affected.
 mod fn_with_type_in_sig {
     use point::Point;
 
@@ -79,6 +85,13 @@ mod fn_with_type_in_sig {
     }
 }
 
+/// Call a fn that has the changed type in its signature; this
+/// currently must also be rebuilt.
+///
+/// You could imagine that, in the future, if the change were
+/// sufficiently "private", we might not need to type-check again.
+/// Rebuilding is probably always necessary since the layout may be
+/// affected.
 mod call_fn_with_type_in_sig {
     use fn_with_type_in_sig;
 
@@ -88,7 +101,13 @@ mod call_fn_with_type_in_sig {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn that uses the changed type, but only in its body, not its
+/// signature.
+///
+/// You could imagine that, in the future, if the change were
+/// sufficiently "private", we might not need to type-check again.
+/// Rebuilding is probably always necessary since the layout may be
+/// affected.
 mod fn_with_type_in_body {
     use point::Point;
 
@@ -98,7 +117,10 @@ mod fn_with_type_in_body {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn X that calls a fn Y, where Y uses the changed type in its
+/// body. In this case, the effects of the change should be contained
+/// to Y; X should not have to be rebuilt, nor should it need to be
+/// typechecked again.
 mod call_fn_with_type_in_body {
     use fn_with_type_in_body;
 
diff --git a/src/test/incremental/change_pub_inherent_method_body/struct_point.rs b/src/test/incremental/change_pub_inherent_method_body/struct_point.rs
index 53e771a6e38..77b616e5c5f 100644
--- a/src/test/incremental/change_pub_inherent_method_body/struct_point.rs
+++ b/src/test/incremental/change_pub_inherent_method_body/struct_point.rs
@@ -8,8 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test where we change the body of a private method in an impl.
-// We then test what sort of functions must be rebuilt as a result.
+// Test where we change the body of a public, inherent method.
 
 // revisions:rpass1 rpass2
 // compile-flags: -Z query-dep-graph
@@ -49,7 +48,7 @@ mod point {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn item that calls the method on `Point` which changed
 mod fn_calls_changed_method {
     use point::Point;
 
@@ -61,7 +60,7 @@ mod fn_calls_changed_method {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn item that calls a method on `Point` which did not change
 mod fn_calls_another_method {
     use point::Point;
 
diff --git a/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs b/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs
index 82f12de944b..cb36a734e7b 100644
--- a/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs
+++ b/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs
@@ -8,8 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Test where we change the body of a private method in an impl.
-// We then test what sort of functions must be rebuilt as a result.
+// Test where we change the *signature* of a public, inherent method.
 
 // revisions:rpass1 rpass2
 // compile-flags: -Z query-dep-graph
@@ -60,7 +59,7 @@ mod point {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn item that calls the method that was changed
 mod fn_calls_changed_method {
     use point::Point;
 
@@ -71,7 +70,7 @@ mod fn_calls_changed_method {
     }
 }
 
-/// A fn item that calls (public) methods on `Point` from the same impl which changed
+/// A fn item that calls a method that was not changed
 mod fn_calls_another_method {
     use point::Point;