Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize the `alloc` crate. #59675

Merged
merged 1 commit into from Apr 14, 2019

Conversation

Projects
None yet
6 participants
@SimonSapin
Copy link
Contributor

commented Apr 3, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 3, 2019

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@SimonSapin

This comment has been minimized.

Copy link
Contributor Author

commented Apr 3, 2019

Note that the alloc::prelude module is not being stabilized in this PR. It was moved to a dedicated feature gate alloc_prelude and tracking issue #58935.

@Centril Centril added this to the 1.35 milestone Apr 3, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 3, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:04f9a054:start=1554315498485361337,finish=1554315500618617468,duration=2133256131
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
travis_time:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:11:59] 
[01:11:59] running 5522 tests
[01:12:02] ..........................F......................................................................... 100/5522
[01:12:08] .................................................................................................... 300/5522
[01:12:11] .................................................................................................... 400/5522
[01:12:15] .................................................................................................... 500/5522
[01:12:18] ..........................................i......................................................... 600/5522
[01:12:18] ..........................................i......................................................... 600/5522
[01:12:22] .................................................................................................... 700/5522
[01:12:27] .................................................................................................... 800/5522
[01:12:31] .................................................................................................... 900/5522
[01:12:36] .i...............i.................................................................................. 1000/5522
[01:12:39] ..................................iiiii............................................................. 1100/5522
[01:12:43] .................................................................................................... 1200/5522
[01:12:45] .....................................................F.F............................................ 1300/5522
[01:12:51] .................................................................................................... 1500/5522
[01:12:54] .................................................................................................... 1600/5522
[01:12:57] ..................................................i................................................. 1700/5522
[01:13:00] .................................................................................................... 1800/5522
---
[01:14:32] .................................................................................................... 4300/5522
[01:14:41] .................................................................................................... 4400/5522
[01:14:45] .................................................................................................... 4500/5522
[01:14:48] .................................................................................................... 4600/5522
[01:14:52] ................F................................................................................... 4700/5522
[01:14:58] ........................................................F........................................... 4800/5522
[01:15:05] .................................................................................................... 5000/5522
[01:15:10] .................................................................................................... 5100/5522
[01:15:13] .................................................................................................... 5200/5522
[01:15:16] .................................................................................................... 5300/5522
---
[01:15:23] 1 error: `global_allocator` cannot be used in submodules
[01:15:23] -   --> $DIR/allocator-submodule.rs:27:5
[01:15:23] +   --> $DIR/allocator-submodule.rs:25:5
[01:15:23] 3    |
[01:15:23] 4 LL |     static MY_HEAP: MyAlloc = MyAlloc;
[01:15:23] 
[01:15:23] 
[01:15:23] The actual stderr differed from the expected stderr.
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/allocator-submodule/allocator-submodule.stderr
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/allocator-submodule/allocator-submodule.stderr
[01:15:23] To update references, rerun the tests and pass the `--bless` flag
[01:15:23] To only update this specific test, also pass `--test-args allocator-submodule.rs`
[01:15:23] error: 1 errors occurred comparing output.
[01:15:23] status: exit code: 1
[01:15:23] status: exit code: 1
[01:15:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/allocator-submodule.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/allocator-submodule/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/allocator-submodule/auxiliary" "-A" "unused"
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] stderr:
[01:15:23] stderr:
[01:15:23] ------------------------------------------
[01:15:23] {"message":"`global_allocator` cannot be used in submodules","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/allocator-submodule.rs","byte_start":461,"byte_end":495,"line_start":25,"line_end":25,"column_start":5,"column_end":39,"is_primary":true,"text":[{"text":"    static MY_HEAP: MyAlloc = MyAlloc; //~ ERROR global_allocator","highlight_start":5,"highlight_end":39}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `global_allocator` cannot be used in submodules\n  --> /checkout/src/test/ui/allocator-submodule.rs:25:5\n   |\nLL |     static MY_HEAP: MyAlloc = MyAlloc; //~ ERROR global_allocator\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] thread '[ui] ui/allocator-submodule.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3422:9
---
[01:15:23] 1 error[E0254]: the name `alloc` is defined multiple times
[01:15:23] -   --> $DIR/E0254.rs:12:5
[01:15:23] +   --> $DIR/E0254.rs:11:5
[01:15:23] 3    |
[01:15:23] 4 LL | extern crate alloc;
[01:15:23] 5    | ------------------- previous import of the extern crate `alloc` here
[01:15:23] 
[01:15:23] The actual stderr differed from the expected stderr.
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0254/E0254.stderr
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0254/E0254.stderr
[01:15:23] To update references, rerun the tests and pass the `--bless` flag
[01:15:23] To only update this specific test, also pass `--test-args error-codes/E0254.rs`
[01:15:23] error: 1 errors occurred comparing output.
[01:15:23] status: exit code: 1
[01:15:23] status: exit code: 1
[01:15:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0254.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0254/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0254/auxiliary" "-A" "unused"
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] stderr:
[01:15:23] stderr:
[01:15:23] ------------------------------------------
[01:15:23] {"message":"the name `alloc` is defined multiple times","code":{"code":"E0254","explanation":"\nAttempt was made to import an item whereas an extern crate with this name has\nalready been imported.\n\nErroneous code example:\n\n```compile_fail,E0254\nextern crate core;\n\nmod foo {\n    pub trait core {\n        fn do_something();\n    }\n}\n\nuse foo::core;  // error: an extern crate named `core` has already\n                //        been imported in this module\n\nfn main() {}\n```\n\nTo fix this issue, you have to rename at least one of the two imports.\nExample:\n\n```\nextern crate core as libcore; // ok!\n\nmod foo {\n    pub trait core {\n        fn do_something();\n    }\n}\n\nuse foo::core;\n\nfn main() {}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0254.rs","byte_start":148,"byte_end":158,"line_start":11,"line_end":11,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"use foo::alloc;","highlight_start":5,"highlight_end":15}],"label":"`alloc` reimported here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/error-codes/E0254.rs","byte_start":55,"byte_end":74,"line_start":3,"line_end":3,"column_start":1,"column_end":20,"is_primary":false,"text":[{"text":"extern crate alloc;","highlight_start":1,"highlight_end":20}],"label":"previous import of the extern crate `alloc` here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`alloc` must be defined only once in the type namespace of this module","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"you can use `as` to change the binding name of the import","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0254.rs","byte_start":148,"byte_end":158,"line_start":11,"line_end":11,"column_start":5,"column_end":15,"is_primary":true,"text":[{"text":"use foo::alloc;","highlight_start":5,"highlight_end":15}],"label":null,"suggested_replacement":"foo::alloc as other_alloc","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0254]: the name `alloc` is defined multiple times\n  --> /checkout/src/test/ui/error-codes/E0254.rs:11:5\n   |\nLL | extern crate alloc;\n   | ------------------- previous import of the extern crate `alloc` here\n...\nLL | use foo::alloc;\n   |     ^^^^^^^^^^ `alloc` reimported here\n   |\n   = note: `alloc` must be defined only once in the type namespace of this module\nhelp: you can use `as` to change the binding name of the import\n   |\nLL | use foo::alloc as other_alloc;\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:15:23] {"message":"For more information about this error, try `rustc --explain E0254`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0254`.\n"}
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] 
---
[01:15:23] 1 error[E0260]: the name `alloc` is defined multiple times
[01:15:23] -   --> $DIR/E0260.rs:6:1
[01:15:23] +   --> $DIR/E0260.rs:5:1
[01:15:23] 3    |
[01:15:23] 4 LL | extern crate alloc;
[01:15:23] 5    | ------------------- previous import of the extern crate `alloc` here
[01:15:23] 
[01:15:23] The actual stderr differed from the expected stderr.
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0260/E0260.stderr
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0260/E0260.stderr
[01:15:23] To update references, rerun the tests and pass the `--bless` flag
[01:15:23] To only update this specific test, also pass `--test-args error-codes/E0260.rs`
[01:15:23] error: 1 errors occurred comparing output.
[01:15:23] status: exit code: 1
[01:15:23] status: exit code: 1
[01:15:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0260.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0260/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0260/auxiliary" "-A" "unused"
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] stderr:
[01:15:23] stderr:
[01:15:23] ------------------------------------------
[01:15:23] {"message":"the name `alloc` is defined multiple times","code":{"code":"E0260","explanation":"\nThe name for an item declaration conflicts with an external crate's name.\n\nErroneous code example:\n\n```compile_fail,E0260\nextern crate core;\n\nstruct core;\n\nfn main() {}\n```\n\nThere are two possible solutions:\n\nSolution #1: Rename the item.\n\n```\nextern crate core;\n\nstruct xyz;\n```\n\nSolution #2: Import the crate with a different name.\n\n```\nextern crate core as xyz;\n\nstruct abc;\n```\n\nSee the Declaration Statements section of the reference for more information\nabout what constitutes an Item declaration and what does not:\n\nhttps://doc.rust-lang.org/reference.html#statements\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0260.rs","byte_start":54,"byte_end":63,"line_start":5,"line_end":5,"column_start":1,"column_end":10,"is_primary":true,"text":[{"text":"mod alloc {","highlight_start":1,"highlight_end":10}],"label":"`alloc` redefined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/error-codes/E0260.rs","byte_start":33,"byte_end":52,"line_start":3,"line_end":3,"column_start":1,"column_end":20,"is_primary":false,"text":[{"text":"extern crate alloc;","highlight_start":1,"highlight_end":20}],"label":"previous import of the extern crate `alloc` here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`alloc` must be defined only once in the type namespace of this module","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"you can use `as` to change the binding name of the import","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0260.rs","byte_start":33,"byte_end":52,"line_start":3,"line_end":3,"column_start":1,"column_end":20,"is_primary":true,"text":[{"text":"extern crate alloc;","highlight_start":1,"highlight_end":20}],"label":null,"suggested_replacement":"extern crate alloc as other_alloc;","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0260]: the name `alloc` is defined multiple times\n  --> /checkout/src/test/ui/error-codes/E0260.rs:5:1\n   |\nLL | extern crate alloc;\n   | ------------------- previous import of the extern crate `alloc` here\nLL | \nLL | mod alloc {\n   | ^^^^^^^^^ `alloc` redefined here\n   |\n   = note: `alloc` must be defined only once in the type namespace of this module\nhelp: you can use `as` to change the binding name of the import\n   |\nLL | extern crate alloc as other_alloc;\n   |\n\n"}
[01:15:23] {"message":"For more information about this error, try `rustc --explain E0260`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0260`.\n"}
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] 
---
[01:15:23] 15    |
[01:15:23] 16 LL |             use alloc::HashMap;
[01:15:23] 17    |                 ^^^^^
[01:15:23] 
[01:15:23] 20    |                 help: a similar path exists: `a::alloc`
[01:15:23] 22 error[E0432]: unresolved import `alloc`
[01:15:23] -   --> $DIR/resolve_self_super_hint.rs:21:21
[01:15:23] +   --> $DIR/resolve_self_super_hint.rs:20:21
[01:15:23] 24    |
[01:15:23] 24    |
[01:15:23] 25 LL |                 use alloc::HashMap;
[01:15:23] 26    |                     ^^^^^
[01:15:23] 
[01:15:23] 
[01:15:23] The actual stderr differed from the expected stderr.
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve_self_super_hint/resolve_self_super_hint.stderr
[01:15:23] To update references, rerun the tests and pass the `--bless` flag
[01:15:23] To only update this specific test, also pass `--test-args resolve_self_super_hint.rs`
[01:15:23] error: 1 errors occurred comparing output.
[01:15:23] status: exit code: 1
[01:15:23] status: exit code: 1
[01:15:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve_self_super_hint.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve_self_super_hint/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve_self_super_hint/auxiliary" "-A" "unused"
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] stderr:
[01:15:23] stderr:
[01:15:23] ------------------------------------------
[01:15:23] {"message":"unresolved import `alloc`","code":{"code":"E0432","explanation":"\nAn import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n    pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":73,"byte_end":78,"line_start":5,"line_end":5,"column_start":9,"column_end":14,"is_primary":true,"text":[{"text":"    use alloc::HashMap;","highlight_start":9,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a similar path exists","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":73,"byte_end":78,"line_start":5,"line_end":5,"column_start":9,"column_end":14,"is_primary":true,"text":[{"text":"    use alloc::HashMap;","highlight_start":9,"highlight_end":14}],"label":null,"suggested_replacement":"self::alloc","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0432]: unresolved import `alloc`\n  --> /checkout/src/test/ui/resolve_self_super_hint.rs:5:9\n   |\nLL |     use alloc::HashMap;\n   |         ^^^^^ help: a similar path exists: `self::alloc`\n\n"}
[01:15:23] {"message":"unresolved import `alloc`","code":{"code":"E0432","explanation":"\nAn import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n    pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":230,"byte_end":235,"line_start":10,"line_end":10,"column_start":13,"column_end":18,"is_primary":true,"text":[{"text":"        use alloc::HashMap;","highlight_start":13,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a similar path exists","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":230,"byte_end":235,"line_start":10,"line_end":10,"column_start":13,"column_end":18,"is_primary":true,"text":[{"text":"        use alloc::HashMap;","highlight_start":13,"highlight_end":18}],"label":null,"suggested_replacement":"super::alloc","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0432]: unresolved import `alloc`\n  --> /checkout/src/test/ui/resolve_self_super_hint.rs:10:13\n   |\nLL |         use alloc::HashMap;\n   |             ^^^^^ help: a similar path exists: `super::alloc`\n\n"}
[01:15:23] {"message":"unresolved import `alloc`","code":{"code":"E0432","explanation":"\nAn import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n    pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":408,"byte_end":413,"line_start":15,"line_end":15,"column_start":17,"column_end":22,"is_primary":true,"text":[{"text":"            use alloc::HashMap;","highlight_start":17,"highlight_end":22}],"label":"unresolved import","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a similar path exists","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":408,"byte_end":413,"line_start":15,"line_end":15,"column_start":17,"column_end":22,"is_primary":true,"text":[{"text":"            use alloc::HashMap;","highlight_start":17,"highlight_end":22}],"label":null,"suggested_replacement":"a::alloc","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0432]: unresolved import `alloc`\n  --> /checkout/src/test/ui/resolve_self_super_hint.rs:15:17\n   |\nLL |             use alloc::HashMap;\n   |                 ^^^^^\n   |                 |\n   |                 unresolved import\n   |                 help: a similar path exists: `a::alloc`\n\n"}
[01:15:23] {"message":"unresolved import `alloc`","code":{"code":"E0432","explanation":"\nAn import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nPaths in `use` statements are relative to the crate root. To import items\nrelative to the current and parent modules, use the `self::` and `super::`\nprefixes, respectively. Also verify that you didn't misspell the import\nname and that the import exists in the module from where you tried to\nimport it. Example:\n\n```\nuse self::something::Foo; // ok!\n\nmod something {\n    pub struct Foo;\n}\n# fn main() {}\n```\n\nOr, if you tried to use a module from an external crate, you may have missed\nthe `extern crate` declaration (which is usually placed in the crate root):\n\n```\nextern crate core; // Required to use the `core` crate\n\nuse core::any;\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":602,"byte_end":607,"line_start":20,"line_end":20,"column_start":21,"column_end":26,"is_primary":true,"text":[{"text":"                use alloc::HashMap;","highlight_start":21,"highlight_end":26}],"label":"unresolved import","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"a similar path exists","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve_self_super_hint.rs","byte_start":602,"byte_end":607,"line_start":20,"line_end":20,"column_start":21,"column_end":26,"is_primary":true,"text":[{"text":"                use alloc::HashMap;","highlight_start":21,"highlight_end":26}],"label":null,"suggested_replacement":"a::alloc","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0432]: unresolved import `alloc`\n  --> /checkout/src/test/ui/resolve_self_super_hint.rs:20:21\n   |\nLL |                 use alloc::HashMap;\n   |                     ^^^^^\n   |                     |\n   |                     unresolved import\n   |                     help: a similar path exists: `a::alloc`\n\n"}
[01:15:23] {"message":"For more information about this error, try `rustc --explain E0432`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0432`.\n"}
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] 
---
[01:15:23] 7 note: lint level defined here
[01:15:23] -   --> $DIR/remove-extern-crate.rs:8:9
[01:15:23] +   --> $DIR/remove-extern-crate.rs:7:9
[01:15:23] 9    |
[01:15:23] 10 LL | #![warn(rust_2018_idioms)]
[01:15:23] 
[01:15:23] 
[01:15:23] 12    = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]
[01:15:23] 14 warning: `extern crate` is not idiomatic in the new edition
[01:15:23] -   --> $DIR/remove-extern-crate.rs:11:1
[01:15:23] +   --> $DIR/remove-extern-crate.rs:10:1
[01:15:23] 16    |
---
[01:15:23] 24    |     ^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
[01:15:23] 
[01:15:23] 
[01:15:23] The actual stderr differed from the expected stderr.
[01:15:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/remove-extern-crate/remove-extern-crate.stderr
[01:15:23] To update references, rerun the tests and pass the `--bless` flag
[01:15:23] To only update this specific test, also pass `--test-args rust-2018/remove-extern-crate.rs`
[01:15:23] error: 1 errors occurred comparing output.
[01:15:23] status: exit code: 0
[01:15:23] status: exit code: 0
[01:15:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rust-2018/remove-extern-crate.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/remove-extern-crate/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018" "--extern" "remove_extern_crate" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/remove-extern-crate/auxiliary" "-A" "unused"
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] ------------------------------------------
[01:15:23] stderr:
[01:15:23] stderr:
[01:15:23] ------------------------------------------
[01:15:23] {"message":"unused extern crate","code":{"code":"unused_extern_crates","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":158,"byte_end":176,"line_start":9,"line_end":9,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"extern crate core;","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"lint level defined here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":138,"byte_end":154,"line_start":7,"line_end":7,"column_start":9,"column_end":25,"is_primary":true,"text":[{"text":"#![warn(rust_2018_idioms)]","highlight_start":9,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"#[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove it","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":158,"byte_end":176,"line_start":9,"line_end":9,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"extern crate core;","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: unused extern crate\n  --> /checkout/src/test/ui/rust-2018/remove-extern-crate.rs:9:1\n   |\nLL | extern crate core;\n   | ^^^^^^^^^^^^^^^^^^ help: remove it\n   |\nnote: lint level defined here\n  --> /checkout/src/test/ui/rust-2018/remove-extern-crate.rs:7:9\n   |\nLL | #![warn(rust_2018_idioms)]\n   |         ^^^^^^^^^^^^^^^^\n   = note: #[warn(unused_extern_crates)] implied by #[warn(rust_2018_idioms)]\n\n"}
[01:15:23] {"message":"`extern crate` is not idiomatic in the new edition","code":{"code":"unused_extern_crates","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":177,"byte_end":211,"line_start":10,"line_end":10,"column_start":1,"column_end":35,"is_primary":true,"text":[{"text":"extern crate core as another_name;","highlight_start":1,"highlight_end":35}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert it to a `use`","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":177,"byte_end":211,"line_start":10,"line_end":10,"column_start":1,"column_end":35,"is_primary":true,"text":[{"text":"extern crate core as another_name;","highlight_start":1,"highlight_end":35}],"label":null,"suggested_replacement":"use core as another_name;","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: `extern crate` is not idiomatic in the new edition\n  --> /checkout/src/test/ui/rust-2018/remove-extern-crate.rs:10:1\n   |\nLL | extern crate core as another_name;\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`\n\n"}
[01:15:23] {"message":"`extern crate` is not idiomatic in the new edition","code":{"code":"unused_extern_crates","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":581,"byte_end":599,"line_start":28,"line_end":28,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    extern crate core;","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert it to a `use`","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/remove-extern-crate.rs","byte_start":581,"byte_end":599,"line_start":28,"line_end":28,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    extern crate core;","highlight_start":5,"highlight_end":23}],"label":null,"suggested_replacement":"use core;","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"warning: `extern crate` is not idiomatic in the new edition\n  --> /checkout/src/test/ui/rust-2018/remove-extern-crate.rs:28:5\n   |\nLL |     extern crate core;\n   |     ^^^^^^^^^^^^^^^^^^ help: convert it to a `use`\n\n"}
[01:15:23] ------------------------------------------
[01:15:23] 
[01:15:23] thread '[ui] ui/rust-2018/remove-extern-crate.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3422:9
[01:15:23] 
---
[01:15:23] 
[01:15:23] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:516:22
[01:15:23] 
[01:15:23] 
[01:15:23] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:15:23] 
[01:15:23] 
[01:15:23] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:15:23] Build completed unsuccessfully in 0:04:24
[01:15:23] Build completed unsuccessfully in 0:04:24
[01:15:23] make: *** [check] Error 1
[01:15:23] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:17ea4658
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Apr  3 19:33:57 UTC 2019
---
travis_time:end:1012d79c:start=1554320038771387391,finish=1554320038776551106,duration=5163715
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:018bc910
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:05b3c280
travis_time:start:05b3c280
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0daf452f
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@SimonSapin SimonSapin force-pushed the SimonSapin:stable-alloc branch from 3cf9852 to f3173fe Apr 4, 2019

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

I think it's probably best to land this after the beta branch next week? Just want to give it a but more time to bake if we can.

Other than that though r=me!

@SimonSapin

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

That’s fine if you prefer, though in a way this has been baking for years already. The only thing changing now is stability attributes.

@kennytm

This comment has been minimized.

Copy link
Member

commented Apr 6, 2019

(Marking as blocked by the beta release)

@flosse flosse referenced this pull request Apr 6, 2019

Open

nostd support #16

@taiki-e taiki-e referenced this pull request Apr 7, 2019

Merged

Stabilize alloc feature #1515

@pepyakin pepyakin referenced this pull request Apr 10, 2019

Open

Compile the runtime with a stable toolchain #1252

0 of 1 task complete
@alexcrichton

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

📌 Commit f3173fe has been approved by alexcrichton

@bors bors added S-waiting-on-bors and removed S-blocked labels Apr 11, 2019

@Centril Centril modified the milestones: 1.35, 1.36 Apr 12, 2019

Show resolved Hide resolved src/liballoc/lib.rs Outdated
@Centril

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

@bors r-

Version number is wrong.

@SimonSapin SimonSapin force-pushed the SimonSapin:stable-alloc branch from f3173fe to fc928a1 Apr 12, 2019

@SimonSapin

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2019

Fixed.

@bors r=alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 12, 2019

📌 Commit fc928a1 has been approved by alexcrichton

Centril added a commit to Centril/rust that referenced this pull request Apr 12, 2019

bors added a commit that referenced this pull request Apr 12, 2019

Auto merge of #59921 - Centril:rollup-amorbbw, r=Centril
Rollup of 17 pull requests

Successful merges:

 - #59675 (Stabilize the `alloc` crate.)
 - #59693 (Increase `Span` from 4 bytes to 8 bytes.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59752 (Limit dylib symbols)
 - #59796 (Retire `IsNotConst` naming)
 - #59804 (Clean up jobserver integration)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59879 (Use SecRandomCopyBytes instead of /dev/urandom on MacOS)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019

Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019

Rollup merge of rust-lang#59937 - Centril:rollup-6pousju, r=Centril
Rollup of 18 pull requests

Successful merges:

 - rust-lang#59612 (Use normal newtype_index macro for MIR dataflows)
 - rust-lang#59675 (Stabilize the `alloc` crate.)
 - rust-lang#59708 (Mark variables captured by reference as mutable correctly)
 - rust-lang#59735 (remove lookup_char_pos_adj)
 - rust-lang#59747 (Copy book.toml unstable book generator)
 - rust-lang#59796 (Retire `IsNotConst` naming)
 - rust-lang#59804 (Clean up jobserver integration)
 - rust-lang#59818 (Eliminate `FnBox` usages from libstd.)
 - rust-lang#59830 (Fix links on keyword docs.)
 - rust-lang#59835 (Re-export NonZero signed variant in std)
 - rust-lang#59852 (std: Add `{read,write}_vectored` for more types)
 - rust-lang#59855 (Fix attributes position in type declaration)
 - rust-lang#59858 (Make duplicate matcher bindings a hard error)
 - rust-lang#59879 (Use SecRandomCopyBytes instead of /dev/urandom on MacOS)
 - rust-lang#59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - rust-lang#59912 (MaybeUninit: remove deprecated functions)
 - rust-lang#59925 (Fix paste error in split_ascii_whitespace docs.)
 - rust-lang#59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request Apr 13, 2019

Auto merge of #59937 - Centril:rollup-6pousju, r=Centril
Rollup of 18 pull requests

Successful merges:

 - #59612 (Use normal newtype_index macro for MIR dataflows)
 - #59675 (Stabilize the `alloc` crate.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59796 (Retire `IsNotConst` naming)
 - #59804 (Clean up jobserver integration)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59879 (Use SecRandomCopyBytes instead of /dev/urandom on MacOS)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)
 - #59925 (Fix paste error in split_ascii_whitespace docs.)
 - #59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019

bors added a commit that referenced this pull request Apr 13, 2019

Auto merge of #59941 - Centril:rollup-ugml7zw, r=Centril
Rollup of 16 pull requests

Successful merges:

 - #59675 (Stabilize the `alloc` crate.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59796 (Retire `IsNotConst` naming)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59879 (Use SecRandomCopyBytes instead of /dev/urandom on MacOS)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)
 - #59925 (Fix paste error in split_ascii_whitespace docs.)
 - #59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2019

⌛️ Testing commit fc928a1 with merge bd438f9...

bors added a commit that referenced this pull request Apr 13, 2019

Centril added a commit to Centril/rust that referenced this pull request Apr 13, 2019

@Centril

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2019

@bors retry

bors added a commit that referenced this pull request Apr 13, 2019

Auto merge of #59949 - Centril:rollup-lsiqq1g, r=Centril
Rollup of 16 pull requests

Successful merges:

 - #59675 (Stabilize the `alloc` crate.)
 - #59708 (Mark variables captured by reference as mutable correctly)
 - #59735 (remove lookup_char_pos_adj)
 - #59747 (Copy book.toml unstable book generator)
 - #59796 (Retire `IsNotConst` naming)
 - #59804 (Clean up jobserver integration)
 - #59818 (Eliminate `FnBox` usages from libstd.)
 - #59830 (Fix links on keyword docs.)
 - #59835 (Re-export NonZero signed variant in std)
 - #59852 (std: Add `{read,write}_vectored` for more types)
 - #59855 (Fix attributes position in type declaration)
 - #59858 (Make duplicate matcher bindings a hard error)
 - #59899 (In `-Zprint-type-size` output, sort enum variants by size.)
 - #59912 (MaybeUninit: remove deprecated functions)
 - #59925 (Fix paste error in split_ascii_whitespace docs.)
 - #59930 (Exclude some copies of old book editions from search engines)

Failed merges:

r? @ghost

@bors bors merged commit fc928a1 into rust-lang:master Apr 14, 2019

1 of 2 checks passed

homu Testing commit fc928a18bad0b6aa275a6908351b164f6f4abcd6 with merge bd438f99f5cc387dd1853510445269c62e2d8e1e...
Details
Travis CI - Pull Request Build Passed
Details

@Lokathor Lokathor referenced this pull request Apr 22, 2019

Open

Interchange TODOs #17

2 of 6 tasks complete

@Florob Florob referenced this pull request May 1, 2019

Closed

Mai 2019 #79

6 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.