Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Nov 18, 2016
1 parent 30b97aa commit 95c6c99
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
28 changes: 25 additions & 3 deletions src/test/incremental/change_add_field/struct_point.rs
Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 95c6c99

Please sign in to comment.