about summary refs log tree commit diff
path: root/src/test/ui/rfc-2632-const-trait-impl
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-01-30 02:42:33 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-02-13 10:39:23 +0100
commite839b2ec849246ec5efe5069c8d874dbef289462 (patch)
tree36489d29fe26c85fd9f283335acfb37d4915ee40 /src/test/ui/rfc-2632-const-trait-impl
parent2e6eaceedeeda764056eb0e2134735793533770d (diff)
downloadrust-e839b2ec849246ec5efe5069c8d874dbef289462.tar.gz
rust-e839b2ec849246ec5efe5069c8d874dbef289462.zip
Constness -> enum Const { Yes(Span), No }
Same idea for `Unsafety` & use new span for better diagnostics.
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl')
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/feature-gate.gated.stderr4
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/feature-gate.stock.stderr4
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/inherent-impl.stderr16
3 files changed, 18 insertions, 6 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/feature-gate.gated.stderr b/src/test/ui/rfc-2632-const-trait-impl/feature-gate.gated.stderr
index b196f9ef573..061af3c94b4 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/feature-gate.gated.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/feature-gate.gated.stderr
@@ -2,7 +2,9 @@ error: const trait impls are not yet implemented
   --> $DIR/feature-gate.rs:9:1
    |
 LL | impl const T for S {}
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^-----^^^^^^^^^^^
+   |      |
+   |      const because of this
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/feature-gate.stock.stderr b/src/test/ui/rfc-2632-const-trait-impl/feature-gate.stock.stderr
index 6e1cdde0843..cfe226ea7a7 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/feature-gate.stock.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/feature-gate.stock.stderr
@@ -11,7 +11,9 @@ error: const trait impls are not yet implemented
   --> $DIR/feature-gate.rs:9:1
    |
 LL | impl const T for S {}
-   | ^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^-----^^^^^^^^^^^
+   |      |
+   |      const because of this
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/inherent-impl.stderr b/src/test/ui/rfc-2632-const-trait-impl/inherent-impl.stderr
index 508c6f4c747..bdc95ff2a57 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/inherent-impl.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/inherent-impl.stderr
@@ -2,7 +2,9 @@ error: inherent impls cannot be `const`
   --> $DIR/inherent-impl.rs:9:1
    |
 LL | impl const S {}
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^-----^^^^^
+   |      |
+   |      `const` because of this
    |
    = note: only trait implementations may be annotated with `const`
 
@@ -10,7 +12,9 @@ error: inherent impls cannot be `const`
   --> $DIR/inherent-impl.rs:13:1
    |
 LL | impl const T {}
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^-----^^^^^
+   |      |
+   |      `const` because of this
    |
    = note: only trait implementations may be annotated with `const`
 
@@ -18,13 +22,17 @@ error: const trait impls are not yet implemented
   --> $DIR/inherent-impl.rs:9:1
    |
 LL | impl const S {}
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^-----^^^^^
+   |      |
+   |      const because of this
 
 error: const trait impls are not yet implemented
   --> $DIR/inherent-impl.rs:13:1
    |
 LL | impl const T {}
-   | ^^^^^^^^^^^^^^^
+   | ^^^^^-----^^^^^
+   |      |
+   |      const because of this
 
 error: aborting due to 4 previous errors