about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2019-02-09 21:23:30 +0000
committerAlexander Regueiro <alexreg@me.com>2019-02-10 23:42:32 +0000
commitb87363e7632b3f20f9b529696ffb5d5d9c3927cd (patch)
tree49fee4866ed6c2d5b61562e67afe09625de217d8 /src/test
parentc3e182cf43aea2c010a1915eb37293a458df2228 (diff)
downloadrust-b87363e7632b3f20f9b529696ffb5d5d9c3927cd.tar.gz
rust-b87363e7632b3f20f9b529696ffb5d5d9c3927cd.zip
tests: doc comments
Diffstat (limited to 'src/test')
-rw-r--r--src/test/incremental/change_add_field/struct_point.rs18
-rw-r--r--src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs4
-rw-r--r--src/test/run-pass/auxiliary/svh-b.rs6
-rw-r--r--src/test/run-pass/issues/issue-7012.rs2
-rw-r--r--src/test/run-pass/item-attributes.rs2
-rw-r--r--src/test/run-pass/monomorphize-abi-alignment.rs2
-rw-r--r--src/test/run-pass/numbers-arithmetic/num-wrapping.rs2
-rw-r--r--src/test/rustdoc/auxiliary/enum_primitive.rs2
-rw-r--r--src/test/rustdoc/issue-27862.rs2
-rw-r--r--src/test/ui/associated-types/associated-types-coherence-failure.rs2
-rw-r--r--src/test/ui/issues/issue-20797.rs6
-rw-r--r--src/test/ui/issues/issue-48636.fixed2
-rw-r--r--src/test/ui/issues/issue-48636.rs2
-rw-r--r--src/test/ui/issues/issue-52126-assign-op-invariance.rs2
-rw-r--r--src/test/ui/nll/user-annotations/issue-55241.rs2
-rw-r--r--src/test/ui/on-unimplemented/bad-annotation.rs2
-rw-r--r--src/test/ui/on-unimplemented/on-trait.rs2
-rw-r--r--src/test/ui/svh/auxiliary/svh-b.rs6
18 files changed, 33 insertions, 33 deletions
diff --git a/src/test/incremental/change_add_field/struct_point.rs b/src/test/incremental/change_add_field/struct_point.rs
index 6006831e482..182e6cb45be 100644
--- a/src/test/incremental/change_add_field/struct_point.rs
+++ b/src/test/incremental/change_add_field/struct_point.rs
@@ -60,7 +60,7 @@ pub mod point {
     }
 }
 
-/// A fn that has the changed type in its signature; must currently be
+/// A function that has the changed type in its signature; must currently be
 /// rebuilt.
 ///
 /// You could imagine that, in the future, if the change were
@@ -76,7 +76,7 @@ pub mod fn_with_type_in_sig {
     }
 }
 
-/// Call a fn that has the changed type in its signature; this
+/// Call a function 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
@@ -92,7 +92,7 @@ pub mod call_fn_with_type_in_sig {
     }
 }
 
-/// A fn that uses the changed type, but only in its body, not its
+/// A function that uses the changed type, but only in its body, not its
 /// signature.
 ///
 /// You could imagine that, in the future, if the change were
@@ -108,10 +108,10 @@ pub mod fn_with_type_in_body {
     }
 }
 
-/// A fn X that calls a fn Y, where Y uses the changed type in its
+/// A function `X` that calls a function `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.
+/// to `Y`; `X` should not have to be rebuilt, nor should it need to be
+/// type-checked again.
 pub mod call_fn_with_type_in_body {
     use fn_with_type_in_body;
 
@@ -121,7 +121,7 @@ pub mod call_fn_with_type_in_body {
     }
 }
 
-/// A fn item that makes an instance of `Point` but does not invoke methods
+/// A function item that makes an instance of `Point` but does not invoke methods.
 pub mod fn_make_struct {
     use point::Point;
 
@@ -131,7 +131,7 @@ pub mod fn_make_struct {
     }
 }
 
-/// A fn item that reads fields from `Point` but does not invoke methods
+/// A function item that reads fields from `Point` but does not invoke methods.
 pub mod fn_read_field {
     use point::Point;
 
@@ -141,7 +141,7 @@ pub mod fn_read_field {
     }
 }
 
-/// A fn item that writes to a field of `Point` but does not invoke methods
+/// A function item that writes to a field of `Point` but does not invoke methods.
 pub mod fn_write_field {
     use point::Point;
 
diff --git a/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs b/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs
index ee4ecde44f2..956bc5ad862 100644
--- a/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs
+++ b/src/test/run-pass-fulldeps/pprust-expr-roundtrip.rs
@@ -59,8 +59,8 @@ fn make_x() -> P<Expr> {
     expr(ExprKind::Path(None, path))
 }
 
-/// Iterate over exprs of depth up to `depth`.  The goal is to explore all "interesting"
-/// combinations of expression nesting.  For example, we explore combinations using `if`, but not
+/// Iterate over exprs of depth up to `depth`. The goal is to explore all "interesting"
+/// combinations of expression nesting. For example, we explore combinations using `if`, but not
 /// `while` or `match`, since those should print and parse in much the same way as `if`.
 fn iter_exprs(depth: usize, f: &mut FnMut(P<Expr>)) {
     if depth == 0 {
diff --git a/src/test/run-pass/auxiliary/svh-b.rs b/src/test/run-pass/auxiliary/svh-b.rs
index 03869aeb371..57029f70888 100644
--- a/src/test/run-pass/auxiliary/svh-b.rs
+++ b/src/test/run-pass/auxiliary/svh-b.rs
@@ -1,7 +1,7 @@
-//! This is a client of the `a` crate defined in "svn-a-base.rs".  The
-//! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
+//! This is a client of the `a` crate defined in `svn-a-base.rs`. The
+//! rpass and cfail tests (such as `run-pass/svh-add-comment.rs`) use
 //! it by swapping in a different object code library crate built from
-//! some variant of "svn-a-base.rs", and then we are checking if the
+//! some variant of `svn-a-base.rs`, and then we are checking if the
 //! compiler properly ignores or accepts the change, based on whether
 //! the change could affect the downstream crate content or not
 //! (#14132).
diff --git a/src/test/run-pass/issues/issue-7012.rs b/src/test/run-pass/issues/issue-7012.rs
index a1c4bf83beb..90eba170695 100644
--- a/src/test/run-pass/issues/issue-7012.rs
+++ b/src/test/run-pass/issues/issue-7012.rs
@@ -5,7 +5,7 @@
 /*
 # Comparison of static arrays
 
-The expected behaviour would be that test==test1, therefore 'true'
+The expected behaviour would be that `test == test1`, therefore 'true'
 would be printed, however the below prints false.
 */
 
diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs
index 52b931f638c..e3ed350f29a 100644
--- a/src/test/run-pass/item-attributes.rs
+++ b/src/test/run-pass/item-attributes.rs
@@ -163,7 +163,7 @@ mod test_foreign_items {
 }
 
 
-// FIXME #623 - these aren't supported yet
+// FIXME(#623): - these aren't supported yet
 /*mod test_literals {
     #![str = "s"]
     #![char = 'c']
diff --git a/src/test/run-pass/monomorphize-abi-alignment.rs b/src/test/run-pass/monomorphize-abi-alignment.rs
index b55974e6421..a26f324f7dc 100644
--- a/src/test/run-pass/monomorphize-abi-alignment.rs
+++ b/src/test/run-pass/monomorphize-abi-alignment.rs
@@ -2,7 +2,7 @@
 /*!
  * On x86_64-linux-gnu and possibly other platforms, structs get 8-byte "preferred" alignment,
  * but their "ABI" alignment (i.e., what actually matters for data layout) is the largest alignment
- * of any field.  (Also, u64 has 8-byte ABI alignment; this is not always true).
+ * of any field. (Also, `u64` has 8-byte ABI alignment; this is not always true).
  *
  * On such platforms, if monomorphize uses the "preferred" alignment, then it will unify
  * `A` and `B`, even though `S<A>` and `S<B>` have the field `t` at different offsets,
diff --git a/src/test/run-pass/numbers-arithmetic/num-wrapping.rs b/src/test/run-pass/numbers-arithmetic/num-wrapping.rs
index d7ab51f8649..9a01549ecd2 100644
--- a/src/test/run-pass/numbers-arithmetic/num-wrapping.rs
+++ b/src/test/run-pass/numbers-arithmetic/num-wrapping.rs
@@ -175,7 +175,7 @@ fn test_op_assigns() {
                 assert_eq!(black_box(tmp), Wrapping($ans));
             }
 
-            // FIXME(30524): Uncomment this test
+            // FIXME(30524): uncomment this test
             /*
             {
                 let mut tmp = Wrapping($initial);
diff --git a/src/test/rustdoc/auxiliary/enum_primitive.rs b/src/test/rustdoc/auxiliary/enum_primitive.rs
index eff47e8d8dd..ed1da253a97 100644
--- a/src/test/rustdoc/auxiliary/enum_primitive.rs
+++ b/src/test/rustdoc/auxiliary/enum_primitive.rs
@@ -22,7 +22,7 @@
 //! This crate exports a macro `enum_from_primitive!` that wraps an
 //! `enum` declaration and automatically adds an implementation of
 //! `num::FromPrimitive` (reexported here), to allow conversion from
-//! primitive integers to the enum.  It therefore provides an
+//! primitive integers to the enum. It therefore provides an
 //! alternative to the built-in `#[derive(FromPrimitive)]`, which
 //! requires the unstable `std::num::FromPrimitive` and is disabled in
 //! Rust 1.0.
diff --git a/src/test/rustdoc/issue-27862.rs b/src/test/rustdoc/issue-27862.rs
index ce3978e7e9a..77522f1be23 100644
--- a/src/test/rustdoc/issue-27862.rs
+++ b/src/test/rustdoc/issue-27862.rs
@@ -1,4 +1,4 @@
-/// Test  | Table
+/// Tests  | Table
 /// ------|-------------
 /// t = b | id = \|x\| x
 pub struct Foo; // @has issue_27862/struct.Foo.html //td 'id = |x| x'
diff --git a/src/test/ui/associated-types/associated-types-coherence-failure.rs b/src/test/ui/associated-types/associated-types-coherence-failure.rs
index fe1201ea06f..c33f2ac96ba 100644
--- a/src/test/ui/associated-types/associated-types-coherence-failure.rs
+++ b/src/test/ui/associated-types/associated-types-coherence-failure.rs
@@ -41,7 +41,7 @@ impl ToOwned for u8 {
 pub trait ToOwned {
     type Owned;
 
-    /// Create owned data from borrowed data, usually by copying.
+    /// Creates owned data from borrowed data, usually by copying.
     fn to_owned(&self) -> Self::Owned;
 }
 
diff --git a/src/test/ui/issues/issue-20797.rs b/src/test/ui/issues/issue-20797.rs
index ce8564ffe43..e504b4705da 100644
--- a/src/test/ui/issues/issue-20797.rs
+++ b/src/test/ui/issues/issue-20797.rs
@@ -17,7 +17,7 @@ impl PathExtensions for PathBuf {}
 /// A strategy for acquiring more subpaths to walk.
 pub trait Strategy {
     type P: PathExtensions;
-    /// Get additional subpaths from a given path.
+    /// Gets additional subpaths from a given path.
     fn get_more(&self, item: &Self::P) -> io::Result<Vec<Self::P>>;
     /// Determine whether a path should be walked further.
     /// This is run against each item from `get_more()`.
@@ -44,7 +44,7 @@ pub struct Subpaths<S: Strategy> {
 }
 
 impl<S: Strategy> Subpaths<S> {
-    /// Create a directory walker with a root path and strategy.
+    /// Creates a directory walker with a root path and strategy.
     pub fn new(p: &S::P, strategy: S) -> io::Result<Subpaths<S>> {
         let stack = strategy.get_more(p)?;
         Ok(Subpaths { stack: stack, strategy: strategy })
@@ -52,7 +52,7 @@ impl<S: Strategy> Subpaths<S> {
 }
 
 impl<S: Default + Strategy> Subpaths<S> {
-    /// Create a directory walker with a root path and a default strategy.
+    /// Creates a directory walker with a root path and a default strategy.
     pub fn walk(p: &S::P) -> io::Result<Subpaths<S>> {
         Subpaths::new(p, Default::default())
     }
diff --git a/src/test/ui/issues/issue-48636.fixed b/src/test/ui/issues/issue-48636.fixed
index 39e6c98b1f5..7d76f9a99be 100644
--- a/src/test/ui/issues/issue-48636.fixed
+++ b/src/test/ui/issues/issue-48636.fixed
@@ -4,7 +4,7 @@
 
 struct S {
     x: u8,
-    /// The id of the parent core
+    /// The ID of the parent core
     y: u8,
 }
 //~^^^ ERROR found a documentation comment that doesn't document anything
diff --git a/src/test/ui/issues/issue-48636.rs b/src/test/ui/issues/issue-48636.rs
index bcf57772b51..371c0ef6732 100644
--- a/src/test/ui/issues/issue-48636.rs
+++ b/src/test/ui/issues/issue-48636.rs
@@ -4,7 +4,7 @@
 
 struct S {
     x: u8
-    /// The id of the parent core
+    /// The ID of the parent core
     y: u8,
 }
 //~^^^ ERROR found a documentation comment that doesn't document anything
diff --git a/src/test/ui/issues/issue-52126-assign-op-invariance.rs b/src/test/ui/issues/issue-52126-assign-op-invariance.rs
index b974a8d4bda..c96cfdf3cd1 100644
--- a/src/test/ui/issues/issue-52126-assign-op-invariance.rs
+++ b/src/test/ui/issues/issue-52126-assign-op-invariance.rs
@@ -27,7 +27,7 @@ impl<'l> AddAssign for Counter<'l>
     }
 }
 
-/// often times crashes, if not prints invalid strings
+/// Often crashes, if not prints invalid strings.
 pub fn panics() {
     let mut acc = Counter{map: HashMap::new()};
     for line in vec!["123456789".to_string(), "12345678".to_string()] {
diff --git a/src/test/ui/nll/user-annotations/issue-55241.rs b/src/test/ui/nll/user-annotations/issue-55241.rs
index e5600803df8..d7686b9dc94 100644
--- a/src/test/ui/nll/user-annotations/issue-55241.rs
+++ b/src/test/ui/nll/user-annotations/issue-55241.rs
@@ -18,7 +18,7 @@ pub trait NodeCodec<H: Hasher> {
 }
 
 pub trait Trie<H: Hasher, C: NodeCodec<H>> {
-    /// Return the root of the trie.
+    /// Returns the root of the trie.
     fn root(&self) -> &H::Out;
 
     /// Is the trie empty?
diff --git a/src/test/ui/on-unimplemented/bad-annotation.rs b/src/test/ui/on-unimplemented/bad-annotation.rs
index 6843c4bfa99..846db63024c 100644
--- a/src/test/ui/on-unimplemented/bad-annotation.rs
+++ b/src/test/ui/on-unimplemented/bad-annotation.rs
@@ -10,7 +10,7 @@ trait Foo<Bar, Baz, Quux>
 
 #[rustc_on_unimplemented="a collection of type `{Self}` cannot be built from an iterator over elements of type `{A}`"]
 trait MyFromIterator<A> {
-    /// Build a container with elements from an external iterator.
+    /// Builds a container with elements from an external iterator.
     fn my_from_iter<T: Iterator<Item=A>>(iterator: T) -> Self;
 }
 
diff --git a/src/test/ui/on-unimplemented/on-trait.rs b/src/test/ui/on-unimplemented/on-trait.rs
index 22afda16f43..109cb5ba969 100644
--- a/src/test/ui/on-unimplemented/on-trait.rs
+++ b/src/test/ui/on-unimplemented/on-trait.rs
@@ -15,7 +15,7 @@ fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T {
 
 #[rustc_on_unimplemented="a collection of type `{Self}` cannot be built from an iterator over elements of type `{A}`"]
 trait MyFromIterator<A> {
-    /// Build a container with elements from an external iterator.
+    /// Builds a container with elements from an external iterator.
     fn my_from_iter<T: Iterator<Item=A>>(iterator: T) -> Self;
 }
 
diff --git a/src/test/ui/svh/auxiliary/svh-b.rs b/src/test/ui/svh/auxiliary/svh-b.rs
index 03869aeb371..57029f70888 100644
--- a/src/test/ui/svh/auxiliary/svh-b.rs
+++ b/src/test/ui/svh/auxiliary/svh-b.rs
@@ -1,7 +1,7 @@
-//! This is a client of the `a` crate defined in "svn-a-base.rs".  The
-//! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
+//! This is a client of the `a` crate defined in `svn-a-base.rs`. The
+//! rpass and cfail tests (such as `run-pass/svh-add-comment.rs`) use
 //! it by swapping in a different object code library crate built from
-//! some variant of "svn-a-base.rs", and then we are checking if the
+//! some variant of `svn-a-base.rs`, and then we are checking if the
 //! compiler properly ignores or accepts the change, based on whether
 //! the change could affect the downstream crate content or not
 //! (#14132).