diff options
Diffstat (limited to 'tests/ui/stability-attribute/suggest-vec-allocator-api.rs')
-rw-r--r-- | tests/ui/stability-attribute/suggest-vec-allocator-api.rs | 9 |
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 000000000..fac52ab77 --- /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' +} |