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 GlobalAlloc and #[global_allocator] #51241

Merged
merged 20 commits into from Jun 12, 2018

Conversation

@glandium
Contributor

glandium commented May 31, 2018

This PR implements the changes discussed in #49668 (comment)

Fixes #49668
Fixes #27389

This does not change the default global allocator: #36963

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive May 31, 2018

Collaborator

r? @aidanhs

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

Collaborator

rust-highfive commented May 31, 2018

r? @aidanhs

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

@glandium

This comment has been minimized.

Show comment
Hide comment
@glandium
Contributor

glandium commented May 31, 2018

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin May 31, 2018

Contributor

Oh, I have pretty much the same branch and was only waiting to add docs before I submit it… :)

Contributor

SimonSapin commented May 31, 2018

Oh, I have pretty much the same branch and was only waiting to add docs before I submit it… :)

@glandium

This comment has been minimized.

Show comment
Hide comment
@glandium

glandium May 31, 2018

Contributor

I wanted to see how that would impact me, so I went ahead but didn't bother with the doc. :)

Contributor

glandium commented May 31, 2018

I wanted to see how that would impact me, so I went ahead but didn't bother with the doc. :)

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive May 31, 2018

Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:45:09] ......................................................................i.............................
[00:45:13] ....................................................................................................
[00:45:19] ....................................................................................................
[00:45:25] ....................................................................................................
[00:45:29] ..i.................iiiiiiiii...................................................
[00:45:29] 
[00:45:29] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:46:17] ......................................................................i.............................
[00:46:22] ....................................................................................................
[00:46:27] ....................................................................................................
[00:46:32] ....................................................................................................
[00:46:36] ..i.................iiiiiiiii...................................................
[00:46:36] 
[00:46:36]  finished in 67.009
[00:46:36] travis_fold:end:test_ui_nll

---
travis_time:start:test_run-pass
Check compiletest suite=run-pass mode=run-pass (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:46:36] 
[00:46:36] running 3017 tests
[00:46:50] .............F......................................................................................
[00:47:19] ....................................................................................................
[00:47:32] ....................................................................................................
[00:47:44] ....................................................................................................
[00:48:03] ....................................................................................................
---
[00:54:57] 
[00:54:57] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:54:57] 
[00:54:57] 
[00:54:57] 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/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:54:57] 
[00:54:57] 
[00:54:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:54:57] Build completed unsuccessfully in 0:12:00
[00:54:57] Build completed unsuccessfully in 0:12:00
[00:54:57] Makefile:58: recipe for target 'check' failed
[00:54:57] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d807eb0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

Collaborator

rust-highfive commented May 31, 2018

The job x86_64-gnu-llvm-3.9 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.
[00:45:09] ......................................................................i.............................
[00:45:13] ....................................................................................................
[00:45:19] ....................................................................................................
[00:45:25] ....................................................................................................
[00:45:29] ..i.................iiiiiiiii...................................................
[00:45:29] 
[00:45:29] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:46:17] ......................................................................i.............................
[00:46:22] ....................................................................................................
[00:46:27] ....................................................................................................
[00:46:32] ....................................................................................................
[00:46:36] ..i.................iiiiiiiii...................................................
[00:46:36] 
[00:46:36]  finished in 67.009
[00:46:36] travis_fold:end:test_ui_nll

---
travis_time:start:test_run-pass
Check compiletest suite=run-pass mode=run-pass (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:46:36] 
[00:46:36] running 3017 tests
[00:46:50] .............F......................................................................................
[00:47:19] ....................................................................................................
[00:47:32] ....................................................................................................
[00:47:44] ....................................................................................................
[00:48:03] ....................................................................................................
---
[00:54:57] 
[00:54:57] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:54:57] 
[00:54:57] 
[00:54:57] 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/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:54:57] 
[00:54:57] 
[00:54:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:54:57] Build completed unsuccessfully in 0:12:00
[00:54:57] Build completed unsuccessfully in 0:12:00
[00:54:57] Makefile:58: recipe for target 'check' failed
[00:54:57] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d807eb0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive May 31, 2018

Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:46:02] ......................................................................i.............................
[00:46:06] ....................................................................................................
[00:46:12] ....................................................................................................
[00:46:19] ....................................................................................................
[00:46:22] ..i.................iiiiiiiii...................................................
[00:46:22] 
[00:46:22] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:47:13] ......................................................................i.............................
[00:47:18] ....................................................................................................
[00:47:23] ....................................................................................................
[00:47:29] ....................................................................................................
[00:47:33] ..i.................iiiiiiiii...................................................
[00:47:33] 
[00:47:33]  finished in 70.534
[00:47:33] travis_fold:end:test_ui_nll

---
travis_time:start:test_run-pass
Check compiletest suite=run-pass mode=run-pass (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:47:33] 
[00:47:33] running 3017 tests
[00:47:48] ........F...........................................................................................
[00:48:18] ....................................................................................................
[00:48:32] ....................................................................................................
[00:48:44] ....................................................................................................
[00:49:05] ....................................................................................................
---
[00:56:10] ---- [run-pass] run-pass/allocator/custom.rs stdout ----
[00:56:10] 
[00:56:10] error: compilation failed!
[00:56:10] status: exit code: 101
[00:56:10] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/allocator/custom.rs" "--target=x86_64-unknown-linux-gnu" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/allocator/custom/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/run-pass/allocator/custom/auxiliary"
[00:56:10] ------------------------------------------
[00:56:10] 
[00:56:10] ------------------------------------------
[00:56:10] stderr:
[00:56:10] stderr:
[00:56:10] ------------------------------------------
[00:56:10] error[E0599]: no method named `unwrap` found for type `*mut u8` in the current scope
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:48:41
[00:56:10]    |
[00:56:10] 48 |         let ptr = alloc(layout.clone()).unwrap();
[00:56:10] 
[00:56:10] 
[00:56:10] error[E0277]: the trait bound `std::fmt::Debug: std::marker::Sized` is not satisfied
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:48:13
[00:56:10]    |
[00:56:10] 48 |         let ptr = alloc(layout.clone()).unwrap();
[00:56:10]    |             ^^^ `std::fmt::Debug` does not have a constant size known at compile-time
[00:56:10]    |
[00:56:10]    = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug`
[00:56:10]    = note: all local variables must have a statically known size
[00:56:10] error[E0308]: mismatched types
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:51:17
[00:56:10]    |
[00:56:10]    |
[00:56:10] 51 |         dealloc(ptr, layout.clone());
[00:56:10]    |                 ^^^ expected *-ptr, found trait std::fmt::Debug
[00:56:10]    |
[00:56:10]    = note: expected type `*mut u8`
[00:56:10]               found type `std::fmt::Debug`
[00:56:10] 
[00:56:10] error[E0599]: no method named `alloc` found for type `std::heap::System` in the current scope
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:60:26
[00:56:10]    |
[00:56:10] 60 |         let ptr = System.alloc(layout.clone()).unwrap();
[00:56:10]    |
[00:56:10]    = help: items from traits can only be used if the trait is in scope
[00:56:10] help: the following trait is implemented but not in scope, perhaps add a `use` for it:
[00:56:10]    |
[00:56:10]    |
[00:56:10] 18 | use std::heap::GlobalAlloc;
[00:56:10]    |
[00:56:10] 
[00:56:10] error[E0277]: the trait bound `std::fmt::Debug: std::marker::Sized` is not satisfied
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:60:13
[00:56:10]    |
[00:56:10] 60 |         let ptr = System.alloc(layout.clone()).unwrap();
[00:56:10]    |             ^^^ `std::fmt::Debug` does not have a constant size known at compile-time
[00:56:10]    |
[00:56:10]    = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug`
[00:56:10]    = note: all local variables must have a statically known size
[00:56:10] 
[00:56:10] error[E0599]: no method named `dealloc` found for type `std::heap::System` in the current scope
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:63:16
[00:56:10]    |
[00:56:10] 63 |         System.dealloc(ptr, layout);
[00:56:10]    |
[00:56:10]    = help: items from traits can only be used if the trait is in scope
[00:56:10] help: the following trait is implemented but not in scope, perhaps add a `use` for it:
[00:56:10]    |
---
[00:56:10] 
[00:56:10] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:56:10] 
[00:56:10] 
[00:56:10] 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/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:56:10] 
[00:56:10] 
[00:56:10] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:56:10] Build completed unsuccessfully in 0:12:30
[00:56:10] Build completed unsuccessfully in 0:12:30
[00:56:10] make: *** [check] Error 1
[00:56:10] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:12c84752
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

Collaborator

rust-highfive commented May 31, 2018

The job x86_64-gnu-llvm-3.9 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.
[00:46:02] ......................................................................i.............................
[00:46:06] ....................................................................................................
[00:46:12] ....................................................................................................
[00:46:19] ....................................................................................................
[00:46:22] ..i.................iiiiiiiii...................................................
[00:46:22] 
[00:46:22] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:47:13] ......................................................................i.............................
[00:47:18] ....................................................................................................
[00:47:23] ....................................................................................................
[00:47:29] ....................................................................................................
[00:47:33] ..i.................iiiiiiiii...................................................
[00:47:33] 
[00:47:33]  finished in 70.534
[00:47:33] travis_fold:end:test_ui_nll

---
travis_time:start:test_run-pass
Check compiletest suite=run-pass mode=run-pass (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:47:33] 
[00:47:33] running 3017 tests
[00:47:48] ........F...........................................................................................
[00:48:18] ....................................................................................................
[00:48:32] ....................................................................................................
[00:48:44] ....................................................................................................
[00:49:05] ....................................................................................................
---
[00:56:10] ---- [run-pass] run-pass/allocator/custom.rs stdout ----
[00:56:10] 
[00:56:10] error: compilation failed!
[00:56:10] status: exit code: 101
[00:56:10] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/allocator/custom.rs" "--target=x86_64-unknown-linux-gnu" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/allocator/custom/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/run-pass/allocator/custom/auxiliary"
[00:56:10] ------------------------------------------
[00:56:10] 
[00:56:10] ------------------------------------------
[00:56:10] stderr:
[00:56:10] stderr:
[00:56:10] ------------------------------------------
[00:56:10] error[E0599]: no method named `unwrap` found for type `*mut u8` in the current scope
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:48:41
[00:56:10]    |
[00:56:10] 48 |         let ptr = alloc(layout.clone()).unwrap();
[00:56:10] 
[00:56:10] 
[00:56:10] error[E0277]: the trait bound `std::fmt::Debug: std::marker::Sized` is not satisfied
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:48:13
[00:56:10]    |
[00:56:10] 48 |         let ptr = alloc(layout.clone()).unwrap();
[00:56:10]    |             ^^^ `std::fmt::Debug` does not have a constant size known at compile-time
[00:56:10]    |
[00:56:10]    = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug`
[00:56:10]    = note: all local variables must have a statically known size
[00:56:10] error[E0308]: mismatched types
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:51:17
[00:56:10]    |
[00:56:10]    |
[00:56:10] 51 |         dealloc(ptr, layout.clone());
[00:56:10]    |                 ^^^ expected *-ptr, found trait std::fmt::Debug
[00:56:10]    |
[00:56:10]    = note: expected type `*mut u8`
[00:56:10]               found type `std::fmt::Debug`
[00:56:10] 
[00:56:10] error[E0599]: no method named `alloc` found for type `std::heap::System` in the current scope
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:60:26
[00:56:10]    |
[00:56:10] 60 |         let ptr = System.alloc(layout.clone()).unwrap();
[00:56:10]    |
[00:56:10]    = help: items from traits can only be used if the trait is in scope
[00:56:10] help: the following trait is implemented but not in scope, perhaps add a `use` for it:
[00:56:10]    |
[00:56:10]    |
[00:56:10] 18 | use std::heap::GlobalAlloc;
[00:56:10]    |
[00:56:10] 
[00:56:10] error[E0277]: the trait bound `std::fmt::Debug: std::marker::Sized` is not satisfied
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:60:13
[00:56:10]    |
[00:56:10] 60 |         let ptr = System.alloc(layout.clone()).unwrap();
[00:56:10]    |             ^^^ `std::fmt::Debug` does not have a constant size known at compile-time
[00:56:10]    |
[00:56:10]    = help: the trait `std::marker::Sized` is not implemented for `std::fmt::Debug`
[00:56:10]    = note: all local variables must have a statically known size
[00:56:10] 
[00:56:10] error[E0599]: no method named `dealloc` found for type `std::heap::System` in the current scope
[00:56:10]   --> /checkout/src/test/run-pass/allocator/custom.rs:63:16
[00:56:10]    |
[00:56:10] 63 |         System.dealloc(ptr, layout);
[00:56:10]    |
[00:56:10]    = help: items from traits can only be used if the trait is in scope
[00:56:10] help: the following trait is implemented but not in scope, perhaps add a `use` for it:
[00:56:10]    |
---
[00:56:10] 
[00:56:10] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:56:10] 
[00:56:10] 
[00:56:10] 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/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:56:10] 
[00:56:10] 
[00:56:10] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:56:10] Build completed unsuccessfully in 0:12:30
[00:56:10] Build completed unsuccessfully in 0:12:30
[00:56:10] make: *** [check] Error 1
[00:56:10] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:12c84752
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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 changed the title from Final changes to GlobalAlloc for stabilization to Stabilize GlobalAlloc and #[global_allocator] May 31, 2018

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin May 31, 2018

Contributor

I’ve pushed additional commits to this PR. @glandium’s commits look good to me, mine still need review. In particular for the new docs and the API contracts they describe.

Both tracking issues for features being stabilized have already finished FCP, but since we’re making last minute changes let’s have a final Final Comment Perdiod:

@rfcbot fcp merge

Contributor

SimonSapin commented May 31, 2018

I’ve pushed additional commits to this PR. @glandium’s commits look good to me, mine still need review. In particular for the new docs and the API contracts they describe.

Both tracking issues for features being stabilized have already finished FCP, but since we’re making last minute changes let’s have a final Final Comment Perdiod:

@rfcbot fcp merge

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot May 31, 2018

Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

rfcbot commented May 31, 2018

Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

Show outdated Hide outdated src/libcore/alloc.rs
@@ -357,23 +360,28 @@ impl fmt::Display for AllocErr {
/// The `CannotReallocInPlace` error is used when `grow_in_place` or
/// `shrink_in_place` were unable to reuse the given memory block for
/// a requested layout.
// FIXME: should this be in libcore or liballoc?

This comment has been minimized.

@Amanieu

Amanieu May 31, 2018

Contributor

This is used in the Alloc trait and therefore needs to be in libcore.

@Amanieu

Amanieu May 31, 2018

Contributor

This is used in the Alloc trait and therefore needs to be in libcore.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

Indeed. Removed that comment.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

Indeed. Removed that comment.

impl fmt::Display for CannotReallocInPlace {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
/// Augments `AllocErr` with a CapacityOverflow variant.
// FIXME: should this be in libcore or liballoc?

This comment has been minimized.

@Amanieu

Amanieu May 31, 2018

Contributor

This could probably be moved to liballoc since it is only used by collections.

@Amanieu

Amanieu May 31, 2018

Contributor

This could probably be moved to liballoc since it is only used by collections.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

I moved it when I created the core::alloc module because it doesn’t depend on anything else, but with "collections" in the name maybe it belongs more where collections are define. I’ll leave this to whenever those APIs are stabilized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

I moved it when I created the core::alloc module because it doesn’t depend on anything else, but with "collections" in the name maybe it belongs more where collections are define. I’ll leave this to whenever those APIs are stabilized.

Show outdated Hide outdated src/libcore/alloc.rs
///
/// * Pointers returned from allocation functions must point to valid memory and
/// retain their validity until at least the instance of `GlobalAlloc` is dropped
/// itself.

This comment has been minimized.

@Amanieu

Amanieu May 31, 2018

Contributor

Does the concept of dropping an instance of GlobalAlloc really make sense? Should we just require pointers to be valid forever until explicitly freed?

@Amanieu

Amanieu May 31, 2018

Contributor

Does the concept of dropping an instance of GlobalAlloc really make sense? Should we just require pointers to be valid forever until explicitly freed?

This comment has been minimized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

Good point, a static is never dropped. I copied this from Alloc docs but it doesn’t make sense here, removed.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

Good point, a static is never dropped. I copied this from Alloc docs but it doesn’t make sense here, removed.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive May 31, 2018

Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:42:43]  Documenting core v0.0.0 (file:///checkout/src/libcore)
[00:42:43]    Compiling std v0.0.0 (file:///checkout/src/libstd)
[00:43:30] warning: [1] cannot be resolved, ignoring it...
[00:43:30] 
[00:43:31] warning: [oom] cannot be resolved, ignoring it...
[00:43:31] warning: [x] cannot be resolved, ignoring it...
[00:43:31] 
[00:43:31] warning: [] cannot be resolved, ignoring it...
[00:43:31] 
---
[00:43:40]     Checking unwind v0.0.0 (file:///checkout/src/libunwind)
[00:43:40]     Checking alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:43:40]     Checking panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:43:40]     Checking alloc_jemalloc v0.0.0 (file:///checkout/src/liballoc_jemalloc)
[00:43:44] warning: [std::alloc::set_oom_hook] cannot be resolved, ignoring it...
[00:43:44] 
[00:43:44] warning: [std::alloc::take_oom_hook] cannot be resolved, ignoring it...
[00:43:44]     Checking rustc_tsan v0.0.0 (file:///checkout/src/librustc_tsan)
[00:43:44]     Checking rustc_msan v0.0.0 (file:///checkout/src/librustc_msan)
[00:43:44]     Checking rustc_lsan v0.0.0 (file:///checkout/src/librustc_lsan)
[00:43:44]     Checking panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:43:44]     Checking panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:43:44]     Checking rustc_asan v0.0.0 (file:///checkout/src/librustc_asan)
[00:43:44]  Documenting std v0.0.0 (file:///checkout/src/libstd)
[00:43:55] warning: [oom] cannot be resolved, ignoring it...
[00:43:55] 
[00:43:57] warning: [System] cannot be resolved, ignoring it...
[00:43:57] 
[00:43:57] warning: [GlobalAlloc] cannot be resolved, ignoring it...
[00:44:02]     Finished release [optimized] target(s) in 1m 19.61s
[00:44:02] Documenting stage2 test (x86_64-unknown-linux-gnu)
[00:44:03]     Checking getopts v0.2.17
[00:44:03]     Checking term v0.0.0 (file:///checkout/src/libterm)
[00:44:03]     Checking term v0.0.0 (file:///checkout/src/libterm)
[00:44:03]  Documenting test v0.0.0 (file:///checkout/src/libtest)
[00:44:04] warning: [System] cannot be resolved, ignoring it...
[00:44:04] 
[00:44:04] warning: [GlobalAlloc] cannot be resolved, ignoring it...
[00:44:04]     Finished release [optimized] target(s) in 2.07s
[00:44:05] Documenting stage2 whitelisted compiler (x86_64-unknown-linux-gnu)
[00:44:05]     Checking nodrop v0.1.12
[00:44:05]     Checking cfg-if v0.1.2
---
[00:44:15]     Checking syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:44:17]     Checking rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:44:18]     Checking syntax v0.0.0 (file:///checkout/src/libsyntax)
[00:44:35]  Documenting proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:44:36] warning: [System] cannot be resolved, ignoring it...
[00:44:36] 
[00:44:36] warning: [GlobalAlloc] cannot be resolved, ignoring it...
[00:44:36] warning: [cfg] cannot be resolved, ignoring it...
[00:44:36] 
[00:44:36] warning: [rayon::prelude] cannot be resolved, ignoring it...
[00:44:36] 
---
[00:47:02] ......................................................................i.............................
[00:47:06] ....................................................................................................
[00:47:12] ....................................................................................................
[00:47:18] ....................................................................................................
[00:47:22] ..i.................iiiiiiiii...................................................
[00:47:22] 
[00:47:22] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:48:10] ......................................................................i.............................
[00:48:14] ....................................................................................................
[00:48:19] ....................................................................................................
[00:48:25] ....................................................................................................
[00:48:29] ..i..................iiiiiiiii..................................................
[00:48:29] 
[00:48:29]  finished in 66.965
[00:48:29] travis_fold:end:test_ui_nll

---
[01:29:30] 
[01:29:30] ---- [ui] rustdoc-ui/intra-links-warning.rs stdout ----
[01:29:30] diff of stderr:
[01:29:30] 
[01:29:30] + warning: [System] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] + warning: [GlobalAlloc] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] 1 warning: [Foo::baz] cannot be resolved, ignoring it...
[01:29:30] 2 
[01:29:30] 3 warning: [Bar::foo] cannot be resolved, ignoring it...
[01:29:30] 
[01:29:30] The actual stderr differed from the expected stderr.
[01:29:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/intra-links-warning/intra-links-warning.stderr
[01:29:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/intra-links-warning/intra-links-warning.stderr
[01:29:30] To update references, rerun the tests and pass the `--bless` flag
[01:29:30] To only update this specific test, also pass `--test-args intra-links-warning.rs`
[01:29:30] error: 1 errors occurred comparing output.
[01:29:30] status: exit code: 0
[01:29:30] status: exit code: 0
[01:29:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/intra-links-warning.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/intra-links-warning/a" "-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/rustdoc-ui/intra-links-warning/auxiliary"
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] ------------------------------------------
[01:29:30] stderr:
[01:29:30] stderr:
[01:29:30] ------------------------------------------
[01:29:30] {"message":"[System] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [System] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[GlobalAlloc] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [GlobalAlloc] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[Foo::baz] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [Foo::baz] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[Bar::foo] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [Bar::foo] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[Uniooon::X] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [Uniooon::X] cannot be resolved, ignoring it...\n\n"}
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] thread '[ui] rustdoc-ui/intra-links-warning.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3096:9
[01:29:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:29:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:29:30] 
[01:29:30] ---- [ui] rustdoc-ui/deprecated-attrs.rs stdout ----
[01:29:30] diff of stderr:
[01:29:30] 
[01:29:30] + warning: [System] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] + warning: [GlobalAlloc] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] 1 warning: the `#![doc(no_default_passes)]` attribute is considered deprecated
[01:29:30] 3   = warning: please see https://github.com/rust-lang/rust/issues/44136
[01:29:30] 
[01:29:30] 
[01:29:30] The actual stderr differed from the expected stderr.
[01:29:30] The actual stderr differed from the expected stderr.
[01:29:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/deprecated-attrs/deprecated-attrs.stderr
[01:29:30] To update references, rerun the tests and pass the `--bless` flag
[01:29:30] To only update this specific test, also pass `--test-args deprecated-attrs.rs`
[01:29:30] error: 1 errors occurred comparing output.
[01:29:30] status: exit code: 0
[01:29:30] status: exit code: 0
[01:29:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/deprecated-attrs.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/deprecated-attrs/a" "-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/rustdoc-ui/deprecated-attrs/auxiliary"
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] ------------------------------------------
[01:29:30] stderr:
[01:29:30] stderr:
[01:29:30] ------------------------------------------
[01:29:30] {"message":"[System] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [System] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[GlobalAlloc] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [GlobalAlloc] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"the `#![doc(no_default_passes)]` attribute is considered deprecated","code":null,"level":"warning","spans":[],"children":[{"message":"please see https://github.com/rust-lang/rust/issues/44136","code":null,"level":"warning","spans":[],"children":[],"rendered":null},{"message":"you may want to use `#![doc(document_private_items)]`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"warning: the `#![doc(no_default_passes)]` attribute is considered deprecated\n  |\n  = warning: please see https://github.com/rust-lang/rust/issues/44136\n  = help: you may want to use `#![doc(document_private_items)]`\n\n"}
[01:29:30] {"message":"the `#![doc(passes = \"...\")]` attribute is considered deprecated","code":null,"level":"warning","spans":[],"children":[{"message":"please see https://github.com/rust-lang/rust/issues/44136","code":null,"level":"warning","spans":[],"children":[],"rendered":null}],"rendered":"warning: the `#![doc(passes = \"...\")]` attribute is considered deprecated\n  |\n  = warning: please see https://github.com/rust-lang/rust/issues/44136\n\n"}
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] thread '[ui] rustdoc-ui/deprecated-attrs.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3096:9
[01:29:30] 
---
[01:29:30] test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
[01:29:30] 
[01:29:30] 
[01:29:30] 
[01:29:30] 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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc-ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-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-3.9/bin/FileCheck" "--host-rustcflags" "-Zunstable-options " "--target-rustcflags" "-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" "3.9.1\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:29:30] 
[01:29:30] 
[01:29:30] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:29:30] Build completed unsuccessfully in 0:44:46
[01:29:30] Build completed unsuccessfully in 0:44:46
[01:29:30] make: *** [check] Error 1
[01:29:30] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:11e8453e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

Collaborator

rust-highfive commented May 31, 2018

The job x86_64-gnu-llvm-3.9 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.
[00:42:43]  Documenting core v0.0.0 (file:///checkout/src/libcore)
[00:42:43]    Compiling std v0.0.0 (file:///checkout/src/libstd)
[00:43:30] warning: [1] cannot be resolved, ignoring it...
[00:43:30] 
[00:43:31] warning: [oom] cannot be resolved, ignoring it...
[00:43:31] warning: [x] cannot be resolved, ignoring it...
[00:43:31] 
[00:43:31] warning: [] cannot be resolved, ignoring it...
[00:43:31] 
---
[00:43:40]     Checking unwind v0.0.0 (file:///checkout/src/libunwind)
[00:43:40]     Checking alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:43:40]     Checking panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:43:40]     Checking alloc_jemalloc v0.0.0 (file:///checkout/src/liballoc_jemalloc)
[00:43:44] warning: [std::alloc::set_oom_hook] cannot be resolved, ignoring it...
[00:43:44] 
[00:43:44] warning: [std::alloc::take_oom_hook] cannot be resolved, ignoring it...
[00:43:44]     Checking rustc_tsan v0.0.0 (file:///checkout/src/librustc_tsan)
[00:43:44]     Checking rustc_msan v0.0.0 (file:///checkout/src/librustc_msan)
[00:43:44]     Checking rustc_lsan v0.0.0 (file:///checkout/src/librustc_lsan)
[00:43:44]     Checking panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:43:44]     Checking panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:43:44]     Checking rustc_asan v0.0.0 (file:///checkout/src/librustc_asan)
[00:43:44]  Documenting std v0.0.0 (file:///checkout/src/libstd)
[00:43:55] warning: [oom] cannot be resolved, ignoring it...
[00:43:55] 
[00:43:57] warning: [System] cannot be resolved, ignoring it...
[00:43:57] 
[00:43:57] warning: [GlobalAlloc] cannot be resolved, ignoring it...
[00:44:02]     Finished release [optimized] target(s) in 1m 19.61s
[00:44:02] Documenting stage2 test (x86_64-unknown-linux-gnu)
[00:44:03]     Checking getopts v0.2.17
[00:44:03]     Checking term v0.0.0 (file:///checkout/src/libterm)
[00:44:03]     Checking term v0.0.0 (file:///checkout/src/libterm)
[00:44:03]  Documenting test v0.0.0 (file:///checkout/src/libtest)
[00:44:04] warning: [System] cannot be resolved, ignoring it...
[00:44:04] 
[00:44:04] warning: [GlobalAlloc] cannot be resolved, ignoring it...
[00:44:04]     Finished release [optimized] target(s) in 2.07s
[00:44:05] Documenting stage2 whitelisted compiler (x86_64-unknown-linux-gnu)
[00:44:05]     Checking nodrop v0.1.12
[00:44:05]     Checking cfg-if v0.1.2
---
[00:44:15]     Checking syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:44:17]     Checking rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:44:18]     Checking syntax v0.0.0 (file:///checkout/src/libsyntax)
[00:44:35]  Documenting proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:44:36] warning: [System] cannot be resolved, ignoring it...
[00:44:36] 
[00:44:36] warning: [GlobalAlloc] cannot be resolved, ignoring it...
[00:44:36] warning: [cfg] cannot be resolved, ignoring it...
[00:44:36] 
[00:44:36] warning: [rayon::prelude] cannot be resolved, ignoring it...
[00:44:36] 
---
[00:47:02] ......................................................................i.............................
[00:47:06] ....................................................................................................
[00:47:12] ....................................................................................................
[00:47:18] ....................................................................................................
[00:47:22] ..i.................iiiiiiiii...................................................
[00:47:22] 
[00:47:22] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:48:10] ......................................................................i.............................
[00:48:14] ....................................................................................................
[00:48:19] ....................................................................................................
[00:48:25] ....................................................................................................
[00:48:29] ..i..................iiiiiiiii..................................................
[00:48:29] 
[00:48:29]  finished in 66.965
[00:48:29] travis_fold:end:test_ui_nll

---
[01:29:30] 
[01:29:30] ---- [ui] rustdoc-ui/intra-links-warning.rs stdout ----
[01:29:30] diff of stderr:
[01:29:30] 
[01:29:30] + warning: [System] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] + warning: [GlobalAlloc] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] 1 warning: [Foo::baz] cannot be resolved, ignoring it...
[01:29:30] 2 
[01:29:30] 3 warning: [Bar::foo] cannot be resolved, ignoring it...
[01:29:30] 
[01:29:30] The actual stderr differed from the expected stderr.
[01:29:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/intra-links-warning/intra-links-warning.stderr
[01:29:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/intra-links-warning/intra-links-warning.stderr
[01:29:30] To update references, rerun the tests and pass the `--bless` flag
[01:29:30] To only update this specific test, also pass `--test-args intra-links-warning.rs`
[01:29:30] error: 1 errors occurred comparing output.
[01:29:30] status: exit code: 0
[01:29:30] status: exit code: 0
[01:29:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/intra-links-warning.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/intra-links-warning/a" "-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/rustdoc-ui/intra-links-warning/auxiliary"
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] ------------------------------------------
[01:29:30] stderr:
[01:29:30] stderr:
[01:29:30] ------------------------------------------
[01:29:30] {"message":"[System] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [System] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[GlobalAlloc] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [GlobalAlloc] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[Foo::baz] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [Foo::baz] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[Bar::foo] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [Bar::foo] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[Uniooon::X] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [Uniooon::X] cannot be resolved, ignoring it...\n\n"}
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] thread '[ui] rustdoc-ui/intra-links-warning.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3096:9
[01:29:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:29:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:29:30] 
[01:29:30] ---- [ui] rustdoc-ui/deprecated-attrs.rs stdout ----
[01:29:30] diff of stderr:
[01:29:30] 
[01:29:30] + warning: [System] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] + warning: [GlobalAlloc] cannot be resolved, ignoring it...
[01:29:30] + 
[01:29:30] 1 warning: the `#![doc(no_default_passes)]` attribute is considered deprecated
[01:29:30] 3   = warning: please see https://github.com/rust-lang/rust/issues/44136
[01:29:30] 
[01:29:30] 
[01:29:30] The actual stderr differed from the expected stderr.
[01:29:30] The actual stderr differed from the expected stderr.
[01:29:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/deprecated-attrs/deprecated-attrs.stderr
[01:29:30] To update references, rerun the tests and pass the `--bless` flag
[01:29:30] To only update this specific test, also pass `--test-args deprecated-attrs.rs`
[01:29:30] error: 1 errors occurred comparing output.
[01:29:30] status: exit code: 0
[01:29:30] status: exit code: 0
[01:29:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "/checkout/src/test/rustdoc-ui/deprecated-attrs.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-ui/deprecated-attrs/a" "-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/rustdoc-ui/deprecated-attrs/auxiliary"
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] ------------------------------------------
[01:29:30] stderr:
[01:29:30] stderr:
[01:29:30] ------------------------------------------
[01:29:30] {"message":"[System] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [System] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"[GlobalAlloc] cannot be resolved, ignoring it...","code":null,"level":"warning","spans":[],"children":[],"rendered":"warning: [GlobalAlloc] cannot be resolved, ignoring it...\n\n"}
[01:29:30] {"message":"the `#![doc(no_default_passes)]` attribute is considered deprecated","code":null,"level":"warning","spans":[],"children":[{"message":"please see https://github.com/rust-lang/rust/issues/44136","code":null,"level":"warning","spans":[],"children":[],"rendered":null},{"message":"you may want to use `#![doc(document_private_items)]`","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"warning: the `#![doc(no_default_passes)]` attribute is considered deprecated\n  |\n  = warning: please see https://github.com/rust-lang/rust/issues/44136\n  = help: you may want to use `#![doc(document_private_items)]`\n\n"}
[01:29:30] {"message":"the `#![doc(passes = \"...\")]` attribute is considered deprecated","code":null,"level":"warning","spans":[],"children":[{"message":"please see https://github.com/rust-lang/rust/issues/44136","code":null,"level":"warning","spans":[],"children":[],"rendered":null}],"rendered":"warning: the `#![doc(passes = \"...\")]` attribute is considered deprecated\n  |\n  = warning: please see https://github.com/rust-lang/rust/issues/44136\n\n"}
[01:29:30] ------------------------------------------
[01:29:30] 
[01:29:30] thread '[ui] rustdoc-ui/deprecated-attrs.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3096:9
[01:29:30] 
---
[01:29:30] test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
[01:29:30] 
[01:29:30] 
[01:29:30] 
[01:29:30] 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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc-ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-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-3.9/bin/FileCheck" "--host-rustcflags" "-Zunstable-options " "--target-rustcflags" "-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" "3.9.1\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:29:30] 
[01:29:30] 
[01:29:30] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:29:30] Build completed unsuccessfully in 0:44:46
[01:29:30] Build completed unsuccessfully in 0:44:46
[01:29:30] make: *** [check] Error 1
[01:29:30] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:11e8453e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

/// library that aborts on memory exhaustion.)
///
/// Clients wishing to abort computation in response to an
/// allocation error are encouraged to call the [`oom`] function,

This comment has been minimized.

@sfackler

sfackler Jun 1, 2018

Member

Will this link work?

@sfackler

sfackler Jun 1, 2018

Member

Will this link work?

This comment has been minimized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

I hoped it would, but it doesn’t when the target is not in the source crate (or its dependencies?). Will fix.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

I hoped it would, but it doesn’t when the target is not in the source crate (or its dependencies?). Will fix.

/// or NULL to indicate reallocation failure.
/// If this returns a non-null pointer, then ownership of the memory block
/// referenced by `ptr` has been transferred to this alloctor.
/// The memory may or may not have been deallocated,

This comment has been minimized.

@sfackler

sfackler Jun 1, 2018

Member

In what situation would the memory not be deallocated?

@sfackler

sfackler Jun 1, 2018

Member

In what situation would the memory not be deallocated?

This comment has been minimized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

I’m not sure, I copied this form Alloc::realloc docs. Maybe when realloc succeeds in place and returns the same pointer? Would you rather I remove that sentence?

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

I’m not sure, I copied this form Alloc::realloc docs. Maybe when realloc succeeds in place and returns the same pointer? Would you rather I remove that sentence?

This comment has been minimized.

@glandium

glandium Jun 1, 2018

Contributor

ownership of the memory block referenced by ptr has been transferred to this alloctor.

There's a typo on allocator. I'd add a "back" after transferred, too, to make it subtly clearer that ownership of the memory block started from this allocator.

@glandium

glandium Jun 1, 2018

Contributor

ownership of the memory block referenced by ptr has been transferred to this alloctor.

There's a typo on allocator. I'd add a "back" after transferred, too, to make it subtly clearer that ownership of the memory block started from this allocator.

//! dox
//! Memory allocation APIs
//!
//! In a given program, the standard library has one “global” memory allocator

This comment has been minimized.

@sfackler

sfackler Jun 1, 2018

Member

Some smart quotes snuck in here.

@sfackler

sfackler Jun 1, 2018

Member

Some smart quotes snuck in here.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

Is that bad?

@SimonSapin

SimonSapin Jun 1, 2018

Contributor

Is that bad?

This comment has been minimized.

@steveklabnik

steveklabnik Jun 1, 2018

Member

We try to use smart quotes in the docs, but the API reference is all over the place. The book uses them 100%. Either way is fine by me.

@steveklabnik

steveklabnik Jun 1, 2018

Member

We try to use smart quotes in the docs, but the API reference is all over the place. The book uses them 100%. Either way is fine by me.

@sfackler

This comment has been minimized.

Show comment
Hide comment
@sfackler

sfackler Jun 1, 2018

Member

Couple of doc nits, but LGTM!

Member

sfackler commented Jun 1, 2018

Couple of doc nits, but LGTM!

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 1, 2018

Contributor

☔️ The latest upstream changes (presumably #51264) made this pull request unmergeable. Please resolve the merge conflicts.

Contributor

bors commented Jun 1, 2018

☔️ The latest upstream changes (presumably #51264) made this pull request unmergeable. Please resolve the merge conflicts.

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Jun 1, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

rfcbot commented Jun 1, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@glandium

This comment has been minimized.

Show comment
Hide comment
@glandium

glandium Jun 2, 2018

Contributor

Rebased.

Contributor

glandium commented Jun 2, 2018

Rebased.

@shaleh shaleh referenced this pull request Jun 3, 2018

Merged

Update toolchain #772

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 3, 2018

Contributor

☔️ The latest upstream changes (presumably #51319) made this pull request unmergeable. Please resolve the merge conflicts.

Contributor

bors commented Jun 3, 2018

☔️ The latest upstream changes (presumably #51319) made this pull request unmergeable. Please resolve the merge conflicts.

@mark-i-m

This comment has been minimized.

Show comment
Hide comment
@mark-i-m

mark-i-m Jun 3, 2018

Contributor

Does #44113 need to be fixed before this is stabilized?

Contributor

mark-i-m commented Jun 3, 2018

Does #44113 need to be fixed before this is stabilized?

@sfackler

This comment has been minimized.

Show comment
Hide comment
@sfackler

sfackler Jun 3, 2018

Member

@mark-i-m I don't think it needs to be fixed, but we should probably have a better error message.

Member

sfackler commented Jun 3, 2018

@mark-i-m I don't think it needs to be fixed, but we should probably have a better error message.

@mark-i-m

This comment has been minimized.

Show comment
Hide comment
@mark-i-m

mark-i-m Jun 3, 2018

Contributor

The current error happens simply because the current implementation causes weird hygeine bugs. I tried to fix it, but hygiene is hard. Neither I nor @alexcrichton knew how to fix it.

In the end, we agreed that maybe for now global_allocator should be disallowed in submodules. I started to implement that but ran into an error in #49320. If anyone has suggestions, I would be glad to fix that up and submit it.

Contributor

mark-i-m commented Jun 3, 2018

The current error happens simply because the current implementation causes weird hygeine bugs. I tried to fix it, but hygiene is hard. Neither I nor @alexcrichton knew how to fix it.

In the end, we agreed that maybe for now global_allocator should be disallowed in submodules. I started to implement that but ran into an error in #49320. If anyone has suggestions, I would be glad to fix that up and submit it.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 3, 2018

Contributor

I think that #44113 should be fixed eventually, but that it doesn’t need to block stabilization.

Contributor

SimonSapin commented Jun 3, 2018

I think that #44113 should be fixed eventually, but that it doesn’t need to block stabilization.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 11, 2018

Contributor

@bors r=sfackler,SimonSapin

Contributor

SimonSapin commented Jun 11, 2018

@bors r=sfackler,SimonSapin

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 11, 2018

Contributor

📌 Commit 7f0d54d has been approved by sfackler,SimonSapin

Contributor

bors commented Jun 11, 2018

📌 Commit 7f0d54d has been approved by sfackler,SimonSapin

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 12, 2018

Contributor

⌛️ Testing commit 7f0d54d with merge 4367e41...

Contributor

bors commented Jun 12, 2018

⌛️ Testing commit 7f0d54d with merge 4367e41...

bors added a commit that referenced this pull request Jun 12, 2018

Auto merge of #51241 - glandium:globalalloc, r=sfackler,SimonSapin
Stabilize GlobalAlloc and #[global_allocator]

This PR implements the changes discussed in #49668 (comment)

Fixes #49668
Fixes #27389

This does not change the default global allocator: #36963
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jun 12, 2018

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: sfackler,SimonSapin
Pushing 4367e41 to master...

Contributor

bors commented Jun 12, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: sfackler,SimonSapin
Pushing 4367e41 to master...

@bors bors merged commit 7f0d54d into rust-lang:master Jun 12, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@glandium

This comment has been minimized.

Show comment
Hide comment
@glandium

glandium Jun 13, 2018

Contributor

Now that docs are up-to-date on https://doc.rust-lang.org/nightly/std/alloc/index.html, it feels like the docs for the reexports should be "inlined" (e.g. alloc, alloc_zeroed, oom), since the alloc crate is still unstable.

Contributor

glandium commented Jun 13, 2018

Now that docs are up-to-date on https://doc.rust-lang.org/nightly/std/alloc/index.html, it feels like the docs for the reexports should be "inlined" (e.g. alloc, alloc_zeroed, oom), since the alloc crate is still unstable.

@glandium glandium deleted the glandium:globalalloc branch Jun 13, 2018

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 13, 2018

Bug 1465709 - Hook rust OOM handler on rustc 1.28. r=froydnj
Bug 1458161 added a rust OOM handler based on an unstable API that was
removed in 1.27, replaced with something that didn't allow to get the
failed allocation size.

Latest 1.28 nightly (2018-06-13) has
rust-lang/rust#50880,
rust-lang/rust#51264 and
rust-lang/rust#51241 merged, which allow to
hook the OOM handler and get the failed allocation size again.

Because this is still an unstable API, we explicitly depend on strict
versions of rustc. We also explicitly error out if automation builds
end up using a rustc version that doesn't allow us to get the allocation
size for rust OOM, because we don't want that to happen without knowing.

--HG--
extra : rebase_source : 6c097151046d088cf51f4755dd69bde97bb8bd8b

mykmelez pushed a commit to mozilla/gecko that referenced this pull request Jun 13, 2018

Bug 1465709 - Hook rust OOM handler on rustc 1.28. r=froydnj
Bug 1458161 added a rust OOM handler based on an unstable API that was
removed in 1.27, replaced with something that didn't allow to get the
failed allocation size.

Latest 1.28 nightly (2018-06-13) has
rust-lang/rust#50880,
rust-lang/rust#51264 and
rust-lang/rust#51241 merged, which allow to
hook the OOM handler and get the failed allocation size again.

Because this is still an unstable API, we explicitly depend on strict
versions of rustc. We also explicitly error out if automation builds
end up using a rustc version that doesn't allow us to get the allocation
size for rust OOM, because we don't want that to happen without knowing.
@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 14, 2018

Contributor

@glandium Indeed. This is a rustdoc bug: #51252. Maybe until that’s fixed we should explicitly re-export each item, but that leaves the opportunity to forget adding a re-export when a new item is added to core::alloc or alloc::alloc.

Contributor

SimonSapin commented Jun 14, 2018

@glandium Indeed. This is a rustdoc bug: #51252. Maybe until that’s fixed we should explicitly re-export each item, but that leaves the opportunity to forget adding a re-export when a new item is added to core::alloc or alloc::alloc.

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Jun 17, 2018

Contributor

@glandium, #51584 just fixed this

Contributor

SimonSapin commented Jun 17, 2018

@glandium, #51584 just fixed this

bors added a commit that referenced this pull request Jun 25, 2018

Auto merge of #51335 - mark-i-m:allocator, r=oli-obk
Prohibit `global_allocator` in submodules

Background: #44113 is caused by weird interactions with hygiene. Hygiene is hard. After a lot of playing around, we decided that the best path forward would be to prohibit `global_allocator`s from being in submodules for now. When somebody gets it working, we can re-enable it.

This PR contains the following
- Some hygiene "fixes" -- things I suspect are the correct thing to do that will make life easier in the future. This includes using call_site hygiene for the generated module and passing the correct crate name to the expansion config.
- Comments and minor formatting fixes
- Some debugging code
- Code to prohibit `global_allocator` in submodules
- Test checking that the proper error occurs.

cc #44113 #49320 #51241

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment