about summary refs log tree commit diff
path: root/tests/ui/stability-attribute/suggest-vec-allocator-api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/stability-attribute/suggest-vec-allocator-api.rs')
-rw-r--r--tests/ui/stability-attribute/suggest-vec-allocator-api.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/stability-attribute/suggest-vec-allocator-api.rs b/tests/ui/stability-attribute/suggest-vec-allocator-api.rs
new file mode 100644
index 00000000000..fac52ab77c6
--- /dev/null
+++ b/tests/ui/stability-attribute/suggest-vec-allocator-api.rs
@@ -0,0 +1,9 @@
+fn main() {
+    let _: Vec<u8, _> = vec![]; //~ ERROR use of unstable library feature 'allocator_api'
+    #[rustfmt::skip]
+    let _: Vec<
+        String,
+        _> = vec![]; //~ ERROR use of unstable library feature 'allocator_api'
+    let _ = Vec::<u16, _>::new(); //~ ERROR use of unstable library feature 'allocator_api'
+    let _boxed: Box<u32, _> = Box::new(10); //~ ERROR use of unstable library feature 'allocator_api'
+}