about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2018-09-18 04:26:39 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2018-10-25 16:47:35 +0200
commit7c34f2da577a0b3b8effdbcc0705499bc2a6861f (patch)
treec94f3c2d55d6ac78bf93d523a8e04c922a471b5f /src/test
parentbf8471aeda0a00c37a4798942ef9d5ae551eef20 (diff)
downloadrust-7c34f2da577a0b3b8effdbcc0705499bc2a6861f.tar.gz
rust-7c34f2da577a0b3b8effdbcc0705499bc2a6861f.zip
Addressed minor issues brought up in review.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc/const-evalutation-ice.rs2
-rw-r--r--src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs10
-rw-r--r--src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr3
3 files changed, 6 insertions, 9 deletions
diff --git a/src/test/rustdoc/const-evalutation-ice.rs b/src/test/rustdoc/const-evalutation-ice.rs
index 5675f61bd4b..64a20d49876 100644
--- a/src/test/rustdoc/const-evalutation-ice.rs
+++ b/src/test/rustdoc/const-evalutation-ice.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Just check if we don't get an ICE for the _S type.
+// Just check we don't get an ICE for the S type.
 
 use std::cell::Cell;
 use std::mem;
diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs
index 9f19e68f2a8..dca8f3c4745 100644
--- a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs
+++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.rs
@@ -19,17 +19,15 @@ union Bar {
 
 const fn bar() -> u8 {
     unsafe {
-        // this will error as long as this test
-        // is run on a system whose pointers need more
-        // than 8 bits
+        // This will error as long as this test is run on a system whose
+        // pointers need more than 8 bits.
         Bar { a: &42 }.b as u8
     }
 }
 
 fn main() {
-    // FIXME(oli-obk): this should panic at runtime
-    // this will actually compile, but then
-    // abort at runtime (not panic, hard abort).
+    // This will compile, but then hard-abort at runtime.
+    // FIXME(oli-obk): this should instead panic (not hard-abort) at runtime.
     let x: &'static u8 = &(bar() + 1);
     let y = *x;
     unreachable!();
diff --git a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr
index 3eeacbf842a..8e21f909954 100644
--- a/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr
+++ b/src/test/ui/consts/const-eval/promoted_const_fn_fail_deny_const_err.stderr
@@ -1,5 +1,5 @@
 error: reaching this expression at runtime will panic or abort
-  --> $DIR/promoted_const_fn_fail_deny_const_err.rs:33:26
+  --> $DIR/promoted_const_fn_fail_deny_const_err.rs:31:26
    |
 LL |         Bar { a: &42 }.b as u8
    |         ---------------------- a raw memory access tried to access part of a pointer value as raw bytes
@@ -16,4 +16,3 @@ LL | #![deny(const_err)]
    |         ^^^^^^^^^
 
 error: aborting due to previous error
-