summaryrefslogtreecommitdiffstats
path: root/src/test/ui/stability-attribute/suggest-vec-allocator-api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/stability-attribute/suggest-vec-allocator-api.rs')
-rw-r--r--src/test/ui/stability-attribute/suggest-vec-allocator-api.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/stability-attribute/suggest-vec-allocator-api.rs b/src/test/ui/stability-attribute/suggest-vec-allocator-api.rs
new file mode 100644
index 000000000..fac52ab77
--- /dev/null
+++ b/src/test/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'
+}