about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-08-15 02:02:52 +0100
committervarkor <github@varkor.com>2018-08-15 02:02:52 +0100
commitd305f68cb9c0d93a30f65af0cd33acd90e3f2532 (patch)
tree5a9bf729dd921d7a4b93143f5b971b094e8c5f8e /src/test
parenta5733050de780ae4d11e3a7af615df792fdf908e (diff)
downloadrust-d305f68cb9c0d93a30f65af0cd33acd90e3f2532.tar.gz
rust-d305f68cb9c0d93a30f65af0cd33acd90e3f2532.zip
Warn when `generic_associated_types` feature gate is enabled
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.rs16
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr6
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.rs b/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.rs
new file mode 100644
index 00000000000..7f48408b369
--- /dev/null
+++ b/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.rs
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// run-pass
+
+#![feature(generic_associated_types)]
+//~^ WARNING the feature `generic_associated_types` is incomplete
+
+fn main() {}
diff --git a/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr b/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr
new file mode 100644
index 00000000000..67682dcb8fb
--- /dev/null
+++ b/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr
@@ -0,0 +1,6 @@
+warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
+  --> $DIR/gat-incomplete-warning.rs:13:12
+   |
+LL | #![feature(generic_associated_types)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^
+