about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-04-14 00:23:25 +0200
committerGitHub <noreply@github.com>2019-04-14 00:23:25 +0200
commitbdb264ff5f4ecb39e5c8babf594d355bc4795afc (patch)
treebf10fc6164cf9db8de31cc7587ddf6f03f8f0aa7 /src/test/ui
parente4c66afba5d69356879570aeff22db5a38566a86 (diff)
parentfc928a18bad0b6aa275a6908351b164f6f4abcd6 (diff)
Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichton
Stabilize the `alloc` crate.

This implements RFC 2480:

* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md

Closes https://github.com/rust-lang/rust/issues/27783
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/allocator-submodule.rs2
-rw-r--r--src/test/ui/allocator-submodule.stderr2
-rw-r--r--src/test/ui/error-codes/E0254.rs1
-rw-r--r--src/test/ui/error-codes/E0254.stderr2
-rw-r--r--src/test/ui/error-codes/E0259.rs2
-rw-r--r--src/test/ui/error-codes/E0260.rs1
-rw-r--r--src/test/ui/error-codes/E0260.stderr2
-rw-r--r--src/test/ui/missing/missing-alloc_error_handler.rs2
-rw-r--r--src/test/ui/missing/missing-allocator.rs2
-rw-r--r--src/test/ui/resolve_self_super_hint.rs1
-rw-r--r--src/test/ui/resolve_self_super_hint.stderr8
-rw-r--r--src/test/ui/rust-2018/remove-extern-crate.fixed1
-rw-r--r--src/test/ui/rust-2018/remove-extern-crate.rs1
-rw-r--r--src/test/ui/rust-2018/remove-extern-crate.stderr8
-rw-r--r--src/test/ui/unnecessary-extern-crate.rs2
15 files changed, 15 insertions, 22 deletions
diff --git a/src/test/ui/allocator-submodule.rs b/src/test/ui/allocator-submodule.rs
index a1cca50ba98..7a8d86b8da1 100644
--- a/src/test/ui/allocator-submodule.rs
+++ b/src/test/ui/allocator-submodule.rs
@@ -1,8 +1,6 @@
 // Tests that it is possible to create a global allocator in a submodule, rather than in the crate
 // root.
 
-#![feature(alloc, allocator_api, global_allocator)]
-
 extern crate alloc;
 
 use std::{
diff --git a/src/test/ui/allocator-submodule.stderr b/src/test/ui/allocator-submodule.stderr
index 26d7aa80eee..91c7c0f6b8e 100644
--- a/src/test/ui/allocator-submodule.stderr
+++ b/src/test/ui/allocator-submodule.stderr
@@ -1,5 +1,5 @@
 error: `global_allocator` cannot be used in submodules
-  --> $DIR/allocator-submodule.rs:27:5
+  --> $DIR/allocator-submodule.rs:25:5
    |
 LL |     static MY_HEAP: MyAlloc = MyAlloc;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/error-codes/E0254.rs b/src/test/ui/error-codes/E0254.rs
index 706cd347e13..d166aff5657 100644
--- a/src/test/ui/error-codes/E0254.rs
+++ b/src/test/ui/error-codes/E0254.rs
@@ -1,4 +1,3 @@
-#![feature(alloc)]
 #![allow(unused_extern_crates, non_camel_case_types)]
 
 extern crate alloc;
diff --git a/src/test/ui/error-codes/E0254.stderr b/src/test/ui/error-codes/E0254.stderr
index c2d013da417..10456fd5a5d 100644
--- a/src/test/ui/error-codes/E0254.stderr
+++ b/src/test/ui/error-codes/E0254.stderr
@@ -1,5 +1,5 @@
 error[E0254]: the name `alloc` is defined multiple times
-  --> $DIR/E0254.rs:12:5
+  --> $DIR/E0254.rs:11:5
    |
 LL | extern crate alloc;
    | ------------------- previous import of the extern crate `alloc` here
diff --git a/src/test/ui/error-codes/E0259.rs b/src/test/ui/error-codes/E0259.rs
index cda3db34dfc..c83561be9c6 100644
--- a/src/test/ui/error-codes/E0259.rs
+++ b/src/test/ui/error-codes/E0259.rs
@@ -1,4 +1,4 @@
-#![feature(alloc, rustc_private)]
+#![feature(rustc_private)]
 #![allow(unused_extern_crates)]
 
 extern crate alloc;
diff --git a/src/test/ui/error-codes/E0260.rs b/src/test/ui/error-codes/E0260.rs
index 80382c0d2fc..73b8934159f 100644
--- a/src/test/ui/error-codes/E0260.rs
+++ b/src/test/ui/error-codes/E0260.rs
@@ -1,4 +1,3 @@
-#![feature(alloc)]
 #![allow(unused_extern_crates)]
 
 extern crate alloc;
diff --git a/src/test/ui/error-codes/E0260.stderr b/src/test/ui/error-codes/E0260.stderr
index bfe2ed0cfc7..7d0b3022914 100644
--- a/src/test/ui/error-codes/E0260.stderr
+++ b/src/test/ui/error-codes/E0260.stderr
@@ -1,5 +1,5 @@
 error[E0260]: the name `alloc` is defined multiple times
-  --> $DIR/E0260.rs:6:1
+  --> $DIR/E0260.rs:5:1
    |
 LL | extern crate alloc;
    | ------------------- previous import of the extern crate `alloc` here
diff --git a/src/test/ui/missing/missing-alloc_error_handler.rs b/src/test/ui/missing/missing-alloc_error_handler.rs
index 1a9e8688e8a..ae0c067bb5f 100644
--- a/src/test/ui/missing/missing-alloc_error_handler.rs
+++ b/src/test/ui/missing/missing-alloc_error_handler.rs
@@ -3,7 +3,7 @@
 
 #![no_std]
 #![crate_type = "staticlib"]
-#![feature(panic_handler, alloc_error_handler, alloc)]
+#![feature(panic_handler, alloc_error_handler)]
 
 #[panic_handler]
 fn panic(_: &core::panic::PanicInfo) -> ! {
diff --git a/src/test/ui/missing/missing-allocator.rs b/src/test/ui/missing/missing-allocator.rs
index dbb10d1e7b9..6d867e2e8b4 100644
--- a/src/test/ui/missing/missing-allocator.rs
+++ b/src/test/ui/missing/missing-allocator.rs
@@ -3,7 +3,7 @@
 
 #![no_std]
 #![crate_type = "staticlib"]
-#![feature(panic_handler, alloc_error_handler, alloc)]
+#![feature(panic_handler, alloc_error_handler)]
 
 #[panic_handler]
 fn panic(_: &core::panic::PanicInfo) -> ! {
diff --git a/src/test/ui/resolve_self_super_hint.rs b/src/test/ui/resolve_self_super_hint.rs
index 91a01cc0fa2..a9423830d90 100644
--- a/src/test/ui/resolve_self_super_hint.rs
+++ b/src/test/ui/resolve_self_super_hint.rs
@@ -1,4 +1,3 @@
-#![feature(alloc)]
 #![allow(unused_extern_crates)]
 
 mod a {
diff --git a/src/test/ui/resolve_self_super_hint.stderr b/src/test/ui/resolve_self_super_hint.stderr
index 03214cad8e4..14cdae97d14 100644
--- a/src/test/ui/resolve_self_super_hint.stderr
+++ b/src/test/ui/resolve_self_super_hint.stderr
@@ -1,17 +1,17 @@
 error[E0432]: unresolved import `alloc`
-  --> $DIR/resolve_self_super_hint.rs:6:9
+  --> $DIR/resolve_self_super_hint.rs:5:9
    |
 LL |     use alloc::HashMap;
    |         ^^^^^ help: a similar path exists: `self::alloc`
 
 error[E0432]: unresolved import `alloc`
-  --> $DIR/resolve_self_super_hint.rs:11:13
+  --> $DIR/resolve_self_super_hint.rs:10:13
    |
 LL |         use alloc::HashMap;
    |             ^^^^^ help: a similar path exists: `super::alloc`
 
 error[E0432]: unresolved import `alloc`
-  --> $DIR/resolve_self_super_hint.rs:16:17
+  --> $DIR/resolve_self_super_hint.rs:15:17
    |
 LL |             use alloc::HashMap;
    |                 ^^^^^
@@ -20,7 +20,7 @@ LL |             use alloc::HashMap;
    |                 help: a similar path exists: `a::alloc`
 
 error[E0432]: unresolved import `alloc`
-  --> $DIR/resolve_self_super_hint.rs:21:21
+  --> $DIR/resolve_self_super_hint.rs:20:21
    |
 LL |                 use alloc::HashMap;
    |                     ^^^^^
diff --git a/src/test/ui/rust-2018/remove-extern-crate.fixed b/src/test/ui/rust-2018/remove-extern-crate.fixed
index a977e00c013..17449caf84f 100644
--- a/src/test/ui/rust-2018/remove-extern-crate.fixed
+++ b/src/test/ui/rust-2018/remove-extern-crate.fixed
@@ -4,7 +4,6 @@
 // aux-build:remove-extern-crate.rs
 // compile-flags:--extern remove_extern_crate
 
-#![feature(alloc)]
 #![warn(rust_2018_idioms)]
 
 
diff --git a/src/test/ui/rust-2018/remove-extern-crate.rs b/src/test/ui/rust-2018/remove-extern-crate.rs
index cafe82d846e..fb2217df000 100644
--- a/src/test/ui/rust-2018/remove-extern-crate.rs
+++ b/src/test/ui/rust-2018/remove-extern-crate.rs
@@ -4,7 +4,6 @@
 // aux-build:remove-extern-crate.rs
 // compile-flags:--extern remove_extern_crate
 
-#![feature(alloc)]
 #![warn(rust_2018_idioms)]
 
 extern crate core;
diff --git a/src/test/ui/rust-2018/remove-extern-crate.stderr b/src/test/ui/rust-2018/remove-extern-crate.stderr
index 4e08b7aa6a0..549693201b7 100644
--- a/src/test/ui/rust-2018/remove-extern-crate.stderr
+++ b/src/test/ui/rust-2018/remove-extern-crate.stderr
@@ -1,24 +1,24 @@
 warning: unused extern crate
-  --> $DIR/remove-extern-crate.rs:10:1
+  --> $DIR/remove-extern-crate.rs:9:1
    |
 LL | extern crate core;
    | ^^^^^^^^^^^^^^^^^^ help: remove it
    |
 note: lint level defined here
-  --> $DIR/remove-extern-crate.rs:8:9
+  --> $DIR/remove-extern-crate.rs:7:9
    |
 LL | #![warn(rust_2018_idioms)]
    |         ^^^^^^^^^^^^^^^^
    = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]
 
 warning: `extern crate` is not idiomatic in the new edition
-  --> $DIR/remove-extern-crate.rs:11:1
+  --> $DIR/remove-extern-crate.rs:10:1
    |
 LL | extern crate core as another_name;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
 
 warning: `extern crate` is not idiomatic in the new edition
-  --> $DIR/remove-extern-crate.rs:29:5
+  --> $DIR/remove-extern-crate.rs:28:5
    |
 LL |     extern crate core;
    |     ^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
diff --git a/src/test/ui/unnecessary-extern-crate.rs b/src/test/ui/unnecessary-extern-crate.rs
index e25b99bcb61..67eaaf4b6c2 100644
--- a/src/test/ui/unnecessary-extern-crate.rs
+++ b/src/test/ui/unnecessary-extern-crate.rs
@@ -1,7 +1,7 @@
 // edition:2018
 
 #![deny(unused_extern_crates)]
-#![feature(alloc, test, rustc_private, crate_visibility_modifier)]
+#![feature(test, rustc_private, crate_visibility_modifier)]
 
 extern crate libc;
 //~^ ERROR unused extern crate