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

Scope format! temporaries #64856

Open
wants to merge 4 commits into
base: master
from

Conversation

@jonhoo
Copy link
Contributor

commented Sep 27, 2019

This places the temporaries that format! generates to refer to its arguments (through &dyn Trait) in a short-lived scope surrounding just the invocation of format!. This enables format! to be used in generators without the temporaries preventing the generator from being Send (due to dyn Trait not being Sync).

See #64477 for details.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Sep 27, 2019

r? @sfackler

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

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 27, 2019

See in particular @nikomatsakis' description of the problem in #64477 (comment) and @Nemo157's proposed solution in #64477 (comment) (which this PR implements).

src/test/ui/fmt/issue-64477.rs Outdated Show resolved Hide resolved
This places the temporaries that `format!` generates to refer to its
arguments (through `&dyn Trait`) in a short-lived scope surrounding just
the invocation of `format!`. This enables `format!` to be used in
generators without the temporaries preventing the generator from being
`Send` (due to `dyn Trait` not being `Sync`).

See #64477 for details.
@jonhoo jonhoo force-pushed the jonhoo:format-temporaries branch from 6ab3f04 to 06e4ff4 Sep 27, 2019
@Centril

This comment has been minimized.

Copy link
Member

commented Sep 27, 2019

This is a breaking change (that may only be noticed in the dynamic semantics rather than the static semantics). By inserting the let you are changing the drop order:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3231f995544ca8cf48045a108a28ac78

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 27, 2019

That is true — I hadn't considered that. I wonder if there's an easy way for us to just cause the created &dyn Trait items to be dropped, and not the inputs. I can't immediately think of one 🤔

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

commented Sep 27, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-09-27T21:51:17.3168809Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-27T21:51:17.3380469Z ##[command]git config gc.auto 0
2019-09-27T21:51:17.3452223Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-27T21:51:17.3526501Z ##[command]git config --get-all http.proxy
2019-09-27T21:51:17.3661091Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64856/merge:refs/remotes/pull/64856/merge
---
2019-09-27T22:55:46.7034151Z .................................................................................................... 1500/9047
2019-09-27T22:55:52.9767431Z .................................................................................................... 1600/9047
2019-09-27T22:56:05.6844016Z .........................................................................i...............i.......... 1700/9047
2019-09-27T22:56:12.9983631Z .................................................................................................... 1800/9047
2019-09-27T22:56:22.0116588Z ................................................................iiiii............................... 1900/9047
2019-09-27T22:56:41.8989910Z .................................................................................................... 2100/9047
2019-09-27T22:56:44.5167621Z .................................................................................................... 2200/9047
2019-09-27T22:56:47.8979223Z .................................................................................................... 2300/9047
2019-09-27T22:56:56.5347848Z .................................................................................................... 2400/9047
---
2019-09-27T23:00:03.7611204Z .....................................................i...............i.............................. 4700/9047
2019-09-27T23:00:13.3034917Z .................................................................................................... 4800/9047
2019-09-27T23:00:22.0979048Z .................................................................................................... 4900/9047
2019-09-27T23:00:29.9461624Z .................................................................................................... 5000/9047
2019-09-27T23:00:39.9951799Z .........................................ii.ii...................................................... 5100/9047
2019-09-27T23:00:50.4455972Z .................................................................................................... 5300/9047
2019-09-27T23:01:01.1503641Z .................................................................................................... 5400/9047
2019-09-27T23:01:08.9648116Z ......i............................................................................................. 5500/9047
2019-09-27T23:01:14.6753102Z .................................................................................................... 5600/9047
2019-09-27T23:01:14.6753102Z .................................................................................................... 5600/9047
2019-09-27T23:01:26.9088010Z .................................................................................................... 5700/9047
2019-09-27T23:01:40.5306113Z .ii...i..ii...........i............................................................................. 5800/9047
2019-09-27T23:02:02.9098668Z .................................................................................................... 6000/9047
2019-09-27T23:02:08.5872489Z .................................................................................................... 6100/9047
2019-09-27T23:02:08.5872489Z .................................................................................................... 6100/9047
2019-09-27T23:02:22.8029304Z ....i..ii........................................................................................... 6200/9047
2019-09-27T23:02:42.3567851Z ................................................................i................................... 6400/9047
2019-09-27T23:02:44.6965056Z .................................................................................................... 6500/9047
2019-09-27T23:02:47.3392269Z ....................................i............................................................... 6600/9047
2019-09-27T23:02:51.5035911Z .................................................................................................... 6700/9047
---
2019-09-27T23:07:01.8461498Z failures:
2019-09-27T23:07:01.8494339Z 
2019-09-27T23:07:01.8496065Z ---- [ui] ui/fmt/issue-64477.rs stdout ----
2019-09-27T23:07:01.8499581Z normalized stderr:
2019-09-27T23:07:01.8499640Z error[E0670]: `async fn` is not permitted in the 2015 edition
2019-09-27T23:07:01.8499977Z   --> $DIR/issue-64477.rs:6:1
2019-09-27T23:07:01.8500021Z    |
2019-09-27T23:07:01.8500222Z LL | async fn foo(_: String) {}
2019-09-27T23:07:01.8500317Z 
2019-09-27T23:07:01.8500317Z 
2019-09-27T23:07:01.8500362Z error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `move`
2019-09-27T23:07:01.8500608Z   --> $DIR/issue-64477.rs:9:11
2019-09-27T23:07:01.8500703Z LL |     async move {
2019-09-27T23:07:01.8500744Z    |           ^^^^ expected one of 8 possible tokens here
2019-09-27T23:07:01.8500770Z 
2019-09-27T23:07:01.8500823Z error: aborting due to 2 previous errors
2019-09-27T23:07:01.8500823Z error: aborting due to 2 previous errors
2019-09-27T23:07:01.8500847Z 
2019-09-27T23:07:01.8501065Z For more information about this error, try `rustc --explain E0670`.
2019-09-27T23:07:01.8501093Z 
2019-09-27T23:07:01.8501131Z 
2019-09-27T23:07:01.8501152Z 
2019-09-27T23:07:01.8501191Z The actual stderr differed from the expected stderr.
2019-09-27T23:07:01.8501443Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/fmt/issue-64477/issue-64477.stderr
2019-09-27T23:07:01.8501678Z To update references, rerun the tests and pass the `--bless` flag
2019-09-27T23:07:01.8501898Z To only update this specific test, also pass `--test-args fmt/issue-64477.rs`
2019-09-27T23:07:01.8501988Z error: 1 errors occurred comparing output.
2019-09-27T23:07:01.8502027Z status: exit code: 1
2019-09-27T23:07:01.8502027Z status: exit code: 1
2019-09-27T23:07:01.8502625Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/fmt/issue-64477.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/fmt/issue-64477" "-Crpath" "-O" "-Cdebuginfo=0" "-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/fmt/issue-64477/auxiliary" "-A" "unused"
2019-09-27T23:07:01.8503500Z ------------------------------------------
2019-09-27T23:07:01.8503569Z 
2019-09-27T23:07:01.8503798Z ------------------------------------------
2019-09-27T23:07:01.8503844Z stderr:
2019-09-27T23:07:01.8503844Z stderr:
2019-09-27T23:07:01.8504070Z ------------------------------------------
2019-09-27T23:07:01.8504141Z error[E0670]: `async fn` is not permitted in the 2015 edition
2019-09-27T23:07:01.8504375Z   --> /checkout/src/test/ui/fmt/issue-64477.rs:6:1
2019-09-27T23:07:01.8504423Z    |
2019-09-27T23:07:01.8504485Z LL | async fn foo(_: String) {}
2019-09-27T23:07:01.8504556Z 
2019-09-27T23:07:01.8504556Z 
2019-09-27T23:07:01.8504606Z error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `move`
2019-09-27T23:07:01.8504862Z   --> /checkout/src/test/ui/fmt/issue-64477.rs:9:11
2019-09-27T23:07:01.8504952Z LL |     async move {
2019-09-27T23:07:01.8505017Z    |           ^^^^ expected one of 8 possible tokens here
2019-09-27T23:07:01.8505047Z 
2019-09-27T23:07:01.8505090Z error: aborting due to 2 previous errors
---
2019-09-27T23:07:01.8537372Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-09-27T23:07:01.8537476Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-09-27T23:07:01.8556689Z 
2019-09-27T23:07:01.8556765Z 
2019-09-27T23:07:01.8558433Z 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 -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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"
2019-09-27T23:07:01.8558694Z 
2019-09-27T23:07:01.8558722Z 
2019-09-27T23:07:01.8567463Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-09-27T23:07:01.8567526Z Build completed unsuccessfully in 1:08:10
2019-09-27T23:07:01.8567526Z Build completed unsuccessfully in 1:08:10
2019-09-27T23:07:01.8620217Z == clock drift check ==
2019-09-27T23:07:01.8639948Z   local time: Fri Sep 27 23:07:01 UTC 2019
2019-09-27T23:07:02.0160637Z   network time: Fri, 27 Sep 2019 23:07:02 GMT
2019-09-27T23:07:02.0165859Z == end clock drift check ==
2019-09-27T23:07:03.4607752Z ##[error]Bash exited with code '1'.
2019-09-27T23:07:03.4693207Z ##[section]Starting: Checkout
2019-09-27T23:07:03.4695088Z ==============================================================================
2019-09-27T23:07:03.4695145Z Task         : Get sources
2019-09-27T23:07:03.4695215Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 was marked as outdated.

Copy link
Collaborator

commented Sep 28, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-09-28T03:20:26.2082027Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-28T03:20:26.2305002Z ##[command]git config gc.auto 0
2019-09-28T03:20:26.2375729Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-28T03:20:26.2423567Z ##[command]git config --get-all http.proxy
2019-09-28T03:20:26.9207003Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/64856/merge:refs/remotes/pull/64856/merge
---
2019-09-28T04:26:18.3303367Z .................................................................................................... 1500/9047
2019-09-28T04:26:24.6634101Z .................................................................................................... 1600/9047
2019-09-28T04:26:37.7894625Z ..........................................................................i...............i......... 1700/9047
2019-09-28T04:26:44.8388064Z .................................................................................................... 1800/9047
2019-09-28T04:26:53.8594311Z .................................................................iiiii.............................. 1900/9047
2019-09-28T04:27:14.6821596Z .................................................................................................... 2100/9047
2019-09-28T04:27:17.4271865Z .................................................................................................... 2200/9047
2019-09-28T04:27:20.7515056Z .................................................................................................... 2300/9047
2019-09-28T04:27:29.9396978Z .................................................................................................... 2400/9047
---
2019-09-28T04:30:38.8168978Z .....................................................i...............i.............................. 4700/9047
2019-09-28T04:30:48.7628877Z .................................................................................................... 4800/9047
2019-09-28T04:30:57.7072417Z .................................................................................................... 4900/9047
2019-09-28T04:31:05.5162386Z .................................................................................................... 5000/9047
2019-09-28T04:31:15.6991096Z .........................................ii.ii...................................................... 5100/9047
2019-09-28T04:31:26.3302948Z .................................................................................................... 5300/9047
2019-09-28T04:31:37.4005443Z .................................................................................................... 5400/9047
2019-09-28T04:31:45.1091485Z ......i............................................................................................. 5500/9047
2019-09-28T04:31:50.8447353Z .................................................................................................... 5600/9047
2019-09-28T04:31:50.8447353Z .................................................................................................... 5600/9047
2019-09-28T04:32:03.3620578Z .................................................................................................... 5700/9047
2019-09-28T04:32:17.0265485Z .ii...i..ii...........i............................................................................. 5800/9047
2019-09-28T04:32:39.5640827Z .................................................................................................... 6000/9047
2019-09-28T04:32:49.1795645Z .................................................................................................... 6100/9047
2019-09-28T04:32:49.1795645Z .................................................................................................... 6100/9047
2019-09-28T04:33:08.3355599Z ....i..ii........................................................................................... 6200/9047
2019-09-28T04:33:29.2670239Z ................................................................i................................... 6400/9047
2019-09-28T04:33:31.5912496Z .................................................................................................... 6500/9047
2019-09-28T04:33:34.7824019Z ....................................i............................................................... 6600/9047
2019-09-28T04:33:38.6144286Z .................................................................................................... 6700/9047
---
2019-09-28T04:38:23.4323724Z  finished in 5.960
2019-09-28T04:38:23.4522561Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:38:23.6407633Z 
2019-09-28T04:38:23.6408958Z running 150 tests
2019-09-28T04:38:27.1883525Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/150
2019-09-28T04:38:29.2966628Z ..iiii..............i.........iii.i.......ii......
2019-09-28T04:38:29.2968108Z 
2019-09-28T04:38:29.2975234Z  finished in 5.845
2019-09-28T04:38:29.3193715Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:38:30.3778149Z 
---
2019-09-28T04:38:31.6596522Z  finished in 2.340
2019-09-28T04:38:31.6798337Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:38:31.8461910Z 
2019-09-28T04:38:31.8462727Z running 9 tests
2019-09-28T04:38:31.8463699Z iiiiiiiii
2019-09-28T04:38:31.8464563Z 
2019-09-28T04:38:31.8467298Z  finished in 0.166
2019-09-28T04:38:31.8668437Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:38:32.8783703Z 
---
2019-09-28T04:38:51.2034416Z  finished in 19.336
2019-09-28T04:38:51.2251182Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:38:51.3978140Z 
2019-09-28T04:38:51.3978280Z running 123 tests
2019-09-28T04:39:17.8445783Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-09-28T04:39:23.1159760Z i.i.i......iii.i.....ii
2019-09-28T04:39:23.1162003Z 
2019-09-28T04:39:23.1163099Z  finished in 31.891
2019-09-28T04:39:23.1175016Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-28T04:39:23.1176229Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-09-28T04:47:40.8204415Z 
2019-09-28T04:47:40.8205259Z error: pretty-printed source does not match expected source
2019-09-28T04:47:40.8205649Z expected:
2019-09-28T04:47:40.8206430Z ------------------------------------------
2019-09-28T04:47:40.8206501Z #[prelude_import]
2019-09-28T04:47:40.8207124Z use ::std::prelude::v1::*;
2019-09-28T04:47:40.8207220Z #[macro_use]
2019-09-28T04:47:40.8207286Z extern crate std;
2019-09-28T04:47:40.8208303Z // pretty-compare-only
2019-09-28T04:47:40.8208854Z // pretty-mode:hir,typed
2019-09-28T04:47:40.8209826Z // pp-exact:issue-4264.pp
2019-09-28T04:47:40.8210598Z 
2019-09-28T04:47:40.8211650Z // #4264 fixed-length vector types
2019-09-28T04:47:40.8211858Z 
2019-09-28T04:47:40.8211914Z pub fn foo(_: [i32; (3 as usize)]) ({ } as ())
2019-09-28T04:47:40.8212020Z pub fn bar() ({
2019-09-28T04:47:40.8212020Z pub fn bar() ({
2019-09-28T04:47:40.8213708Z                   const FOO: usize = ((5 as usize) - (4 as usize) as usize);
2019-09-28T04:47:40.8213800Z                   let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);
2019-09-28T04:47:40.8213836Z 
2019-09-28T04:47:40.8213918Z                   let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);
2019-09-28T04:47:40.8213998Z                   let _ =
2019-09-28T04:47:40.8213998Z                   let _ =
2019-09-28T04:47:40.8214070Z                       (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])
2019-09-28T04:47:40.8214508Z                             as &[i32; 3]) as *const _ as *const [i32; 3]) as
2019-09-28T04:47:40.8214570Z                           *const [i32; (3 as usize)] as *const [i32; 3]);
2019-09-28T04:47:40.8214665Z 
2019-09-28T04:47:40.8214694Z 
2019-09-28T04:47:40.8214721Z 
2019-09-28T04:47:40.8214749Z 
2019-09-28T04:47:40.8214749Z 
2019-09-28T04:47:40.8214775Z 
2019-09-28T04:47:40.8214802Z 
2019-09-28T04:47:40.8214848Z 
2019-09-28T04:47:40.8214875Z 
2019-09-28T04:47:40.8214923Z                   ((::alloc::fmt::format as
2019-09-28T04:47:40.8215704Z                        for<'r> fn(std::fmt::Arguments<'r>) -> std::string::String {std::fmt::format})(((<::core::fmt::Arguments>::new_v1
2019-09-28T04:47:40.8216157Z                                                                                                            as
2019-09-28T04:47:40.8217040Z                                                                                                            fn(&[&str], &[std::fmt::ArgumentV1<'_>]) -> std::fmt::Arguments<'_> {std::fmt::Arguments::<'_>::new_v1})((&([("test"
2019-09-28T04:47:40.8217745Z                                                                                                                                                                                                                             &'static str)]
2019-09-28T04:47:40.8217867Z                                                                                                                                                                                                                           as
2019-09-28T04:47:40.8217867Z                                                                                                                                                                                                                           as
2019-09-28T04:47:40.8218203Z                                                                                                                                                                                                                           [&str; 1])
2019-09-28T04:47:40.8218336Z                                                                                                                                                                                                                         as
2019-09-28T04:47:40.8218451Z                                                                                                                                                                                                                         &[&str; 1]),
2019-09-28T04:47:40.8218545Z                                                                                                                                                                                                                     (&(match (()
2019-09-28T04:47:40.8218756Z                                                                                                                                                                                                                                  ())
2019-09-28T04:47:40.8218946Z                                                                                                                                                                                                                            {
2019-09-28T04:47:40.8219036Z                                                                                                                                                                                                                            ()
2019-09-28T04:47:40.8219150Z                                                                                                                                                                                                                            =>
2019-09-28T04:47:40.8219150Z                                                                                                                                                                                                                            =>
2019-09-28T04:47:40.8219237Z                                                                                                                                                                                                                            ([]
2019-09-28T04:47:40.8219353Z                                                                                                                                                                                                                                as
2019-09-28T04:47:40.8219898Z                                                                                                                                                                                                                                [std::fmt::ArgumentV1<'_>; 0]),
2019-09-28T04:47:40.8220467Z                                                                                                                                                                                                                           as
2019-09-28T04:47:40.8220467Z                                                                                                                                                                                                                           as
2019-09-28T04:47:40.8221828Z                                                                                                                                                                                                                           [std::fmt::ArgumentV1<'_>; 0])
2019-09-28T04:47:40.8221949Z                                                                                                                                                                                                                         as
2019-09-28T04:47:40.8222644Z                                                                                                                                                                                                                         &[std::fmt::ArgumentV1<'_>; 0]))
2019-09-28T04:47:40.8223501Z                                                                                                           std::fmt::Arguments<'_>))
2019-09-28T04:47:40.8223578Z                       as std::string::String);
2019-09-28T04:47:40.8223578Z                       as std::string::String);
2019-09-28T04:47:40.8223629Z               } as ())
2019-09-28T04:47:40.8223679Z pub type Foo = [i32; (3 as usize)];
2019-09-28T04:47:40.8223745Z pub struct Bar {
2019-09-28T04:47:40.8223793Z     pub x: [i32; (3 as usize)],
2019-09-28T04:47:40.8223840Z }
2019-09-28T04:47:40.8223907Z pub struct TupleBar([i32; (4 as usize)]);
2019-09-28T04:47:40.8223959Z pub enum Baz { BazVariant([i32; (5 as usize)]), }
2019-09-28T04:47:40.8224214Z pub fn id<T>(x: T) -> T ({ (x as T) } as T)
2019-09-28T04:47:40.8224283Z pub fn use_id() ({
2019-09-28T04:47:40.8224344Z                      let _ =
2019-09-28T04:47:40.8224397Z                          ((id::<[i32; (3 as usize)]> as
2019-09-28T04:47:40.8224709Z                               fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1
2019-09-28T04:47:40.8224996Z                                                                                i32),
2019-09-28T04:47:40.8225072Z                                                                            (2
2019-09-28T04:47:40.8225132Z                                                                                as
2019-09-28T04:47:40.8225193Z                                                                                i32),
2019-09-28T04:47:40.8225193Z                                                                                i32),
2019-09-28T04:47:40.8225272Z                                                                            (3
2019-09-28T04:47:40.8225332Z                                                                                as
2019-09-28T04:47:40.8225401Z                                                                                i32)]
2019-09-28T04:47:40.8225479Z                                                                              as
2019-09-28T04:47:40.8225549Z                                                                              [i32; 3]))
2019-09-28T04:47:40.8225602Z                              as [i32; 3]);
2019-09-28T04:47:40.8225670Z                  } as ())
2019-09-28T04:47:40.8225718Z fn main() ({ } as ())
2019-09-28T04:47:40.8226044Z ------------------------------------------
2019-09-28T04:47:40.8226118Z actual:
2019-09-28T04:47:40.8226359Z ------------------------------------------
2019-09-28T04:47:40.8226359Z ------------------------------------------
2019-09-28T04:47:40.8226410Z #[prelude_import]
2019-09-28T04:47:40.8226477Z use ::std::prelude::v1::*;
2019-09-28T04:47:40.8226525Z #[macro_use]
2019-09-28T04:47:40.8226571Z extern crate std;
2019-09-28T04:47:40.8226790Z // pretty-compare-only
2019-09-28T04:47:40.8227029Z // pretty-mode:hir,typed
2019-09-28T04:47:40.8227260Z // pp-exact:issue-4264.pp
2019-09-28T04:47:40.8227293Z 
2019-09-28T04:47:40.8227530Z // #4264 fixed-length vector types
2019-09-28T04:47:40.8227583Z 
2019-09-28T04:47:40.8227642Z pub fn foo(_: [i32; (3 as usize)]) ({ } as ())
2019-09-28T04:47:40.8227720Z pub fn bar() ({
2019-09-28T04:47:40.8227720Z pub fn bar() ({
2019-09-28T04:47:40.8228025Z                   const FOO: usize = ((5 as usize) - (4 as usize) as usize);
2019-09-28T04:47:40.8228087Z                   let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);
2019-09-28T04:47:40.8228123Z 
2019-09-28T04:47:40.8246463Z                   let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);
2019-09-28T04:47:40.8246619Z                   let _ =
2019-09-28T04:47:40.8246619Z                   let _ =
2019-09-28T04:47:40.8246675Z                       (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])
2019-09-28T04:47:40.8246748Z                             as &[i32; 3]) as *const _ as *const [i32; 3]) as
2019-09-28T04:47:40.8246995Z                           *const [i32; (3 as usize)] as *const [i32; 3]);
2019-09-28T04:47:40.8247073Z 
2019-09-28T04:47:40.8247108Z 
2019-09-28T04:47:40.8247136Z 
2019-09-28T04:47:40.8247164Z 
2019-09-28T04:47:40.8247164Z 
2019-09-28T04:47:40.8247203Z 
2019-09-28T04:47:40.8247231Z 
2019-09-28T04:47:40.8247257Z 
2019-09-28T04:47:40.8247296Z 
2019-09-28T04:47:40.8247342Z                   ({
2019-09-28T04:47:40.8247391Z                        let res =
2019-09-28T04:47:40.8247453Z                            ((::alloc::fmt::format as
2019-09-28T04:47:40.8248045Z                                 for<'r> fn(std::fmt::Arguments<'r>) -> std::string::String {std::fmt::format})(((<::core::fmt::Arguments>::new_v1
2019-09-28T04:47:40.8248124Z                                                                                                                     as
2019-09-28T04:47:40.8248617Z                                                                                                                     fn(&[&str], &[std::fmt::ArgumentV1<'_>]) -> std::fmt::Arguments<'_> {std::fmt::Arguments::<'_>::new_v1})((&([("test"
2019-09-28T04:47:40.8249504Z                                                                                                                                                                                                                                      &'static str)]
2019-09-28T04:47:40.8249605Z                                                                                                                                                                                                                                    as
2019-09-28T04:47:40.8249605Z                                                                                                                                                                                                                                    as
2019-09-28T04:47:40.8250046Z                                                                                                                                                                                                                                    [&str; 1])
2019-09-28T04:47:40.8250233Z                                                                                                                                                                                                                                  as
2019-09-28T04:47:40.8250335Z                                                                                                                                                                                                                                  &[&str; 1]),
2019-09-28T04:47:40.8250433Z                                                                                                                                                                                                                              (&(match (()
2019-09-28T04:47:40.8250848Z                                                                                                                                                                                                                                           ())
2019-09-28T04:47:40.8251154Z                                                                                                                                                                                                                                     {
2019-09-28T04:47:40.8251265Z                                                                                                                                                                                                                                     ()
2019-09-28T04:47:40.8251490Z                                                                                                                                                                                                                                     =>
2019-09-28T04:47:40.8251490Z                                                                                                                                                                                                                                     =>
2019-09-28T04:47:40.8251603Z                                                                                                                                                                                                                                     ([]
2019-09-28T04:47:40.8251928Z                                                                                                                                                                                                                                         as
2019-09-28T04:47:40.8252577Z                                                                                                                                                                                                                                         [std::fmt::ArgumentV1<'_>; 0]),
2019-09-28T04:47:40.8253974Z                                                                                                                                                                                                                                    as
2019-09-28T04:47:40.8253974Z                                                                                                                                                                                                                                    as
2019-09-28T04:47:40.8254633Z                                                                                                                                                                                                                                    [std::fmt::ArgumentV1<'_>; 0])
2019-09-28T04:47:40.8254745Z                                                                                                                                                                                                                                  as
2019-09-28T04:47:40.8255248Z                                                                                                                                                                                                                                  &[std::fmt::ArgumentV1<'_>; 0]))
2019-09-28T04:47:40.8255714Z                                                                                                                    std::fmt::Arguments<'_>))
2019-09-28T04:47:40.8255779Z                                as std::string::String);
2019-09-28T04:47:40.8255842Z                        (res as std::string::String)
2019-09-28T04:47:40.8255895Z                    } as std::string::String);
2019-09-28T04:47:40.8255895Z                    } as std::string::String);
2019-09-28T04:47:40.8255945Z               } as ())
2019-09-28T04:47:40.8256000Z pub type Foo = [i32; (3 as usize)];
2019-09-28T04:47:40.8256048Z pub struct Bar {
2019-09-28T04:47:40.8256096Z     pub x: [i32; (3 as usize)],
2019-09-28T04:47:40.8256152Z }
2019-09-28T04:47:40.8256208Z pub struct TupleBar([i32; (4 as usize)]);
2019-09-28T04:47:40.8256260Z pub enum Baz { BazVariant([i32; (5 as usize)]), }
2019-09-28T04:47:40.8256523Z pub fn id<T>(x: T) -> T ({ (x as T) } as T)
2019-09-28T04:47:40.8256583Z pub fn use_id() ({
2019-09-28T04:47:40.8256631Z                      let _ =
2019-09-28T04:47:40.8256685Z                          ((id::<[i32; (3 as usize)]> as
2019-09-28T04:47:40.8256979Z                               fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1
2019-09-28T04:47:40.8257101Z                                                                                i32),
2019-09-28T04:47:40.8257168Z                                                                            (2
2019-09-28T04:47:40.8257226Z                                                                                as
2019-09-28T04:47:40.8257464Z                                                                                i32),
2019-09-28T04:47:40.8257464Z                                                                                i32),
2019-09-28T04:47:40.8257543Z                                                                            (3
2019-09-28T04:47:40.8257612Z                                                                                as
2019-09-28T04:47:40.8257671Z                                                                                i32)]
2019-09-28T04:47:40.8257737Z                                                                              as
2019-09-28T04:47:40.8257797Z                                                                              [i32; 3]))
2019-09-28T04:47:40.8257851Z                              as [i32; 3]);
2019-09-28T04:47:40.8257907Z                  } as ())
2019-09-28T04:47:40.8257953Z fn main() ({ } as ())
2019-09-28T04:47:40.8258284Z ------------------------------------------
2019-09-28T04:47:40.8258328Z 
2019-09-28T04:47:40.8258356Z 
2019-09-28T04:47:40.8258356Z 
2019-09-28T04:47:40.8279706Z [ERROR compiletest::runtest] fatal error, panic: "pretty-printed source does not match expected source\nexpected:\n------------------------------------------\n#[prelude_import]\nuse ::std::prelude::v1::*;\n#[macro_use]\nextern crate std;\n// pretty-compare-only\n// pretty-mode:hir,typed\n// pp-exact:issue-4264.pp\n\n// #4264 fixed-length vector types\n\npub fn foo(_: [i32; (3 as usize)]) ({ } as ())\n\npub fn bar() ({\n                  const FOO: usize = ((5 as usize) - (4 as usize) as usize);\n                  let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);\n\n                  let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);\n\n                  let _ =\n                      (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])\n                            as &[i32; 3]) as *const _ as *const [i32; 3]) as\n                          *const [i32; (3 as usize)] as *const [i32; 3]);\n\n\n\n\n\n\n\n\n\n                  ((::alloc::fmt::format as\n                       for<\'r> fn(std::fmt::Arguments<\'r>) -> std::string::String {std::fmt::format})(((<::core::fmt::Arguments>::new_v1\n                                                                                                           as\n                                                                                                           fn(&[&str], &[std::fmt::ArgumentV1<\'_>]) -> std::fmt::Arguments<\'_> {std::fmt::Arguments::<\'_>::new_v1})((&([(\"test\"\n                                                                                                                                                                                                                            as\n                                                                                                                                                                                                                            &\'static str)]\n                                                                                                                                                                                                                          as\n                                                                                                                                                                                                                          [&str; 1])\n                                                                                                                                                                                                                        as\n                                                                                                                                                                                                                        &[&str; 1]),\n                                                                                                                                                                                                                    (&(match (()\n                                                                                                                                                                                                                                 as\n                                                                                                                                                                                                                                 ())\n                                                                                                                                                                                                                           {\n                                                                                                                                                                                                                           ()\n                                                                                                                                                                                                                           =>\n                                                                                                                                                                                                                           ([]\n                                                                                                                                                                                                                               as\n                                                                                                                                                                                                                               [std::fmt::ArgumentV1<\'_>; 0]),\n                                                                                                                                                                                                                       }\n                                                                                                                                                                                                                          as\n                                                                                                                                                                                                                          [std::fmt::ArgumentV1<\'_>; 0])\n                                                                                                                                                                                                                        as\n                                                                                                                                                                                                                        &[std::fmt::ArgumentV1<\'_>; 0]))\n                                                                                                          as\n                                                                                                          std::fmt::Arguments<\'_>))\n                      as std::string::String);\n              } as ())\npub type Foo = [i32; (3 as usize)];\npub struct Bar {\n    pub x: [i32; (3 as usize)],\n}\npub struct TupleBar([i32; (4 as usize)]);\npub enum Baz { BazVariant([i32; (5 as usize)]), }\npub fn id<T>(x: T) -> T ({ (x as T) } as T)\npub fn use_id() ({\n                     let _ =\n                         ((id::<[i32; (3 as usize)]> as\n                              fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1\n                                                                               as\n                                                                               i32),\n                                                                           (2\n                                                                               as\n                                                                               i32),\n                                                                           (3\n                                                                               as\n                                                                               i32)]\n                                                                             as\n                                                                             [i32; 3]))\n                             as [i32; 3]);\n                 } as ())\nfn main() ({ } as ())\n\n------------------------------------------\nactual:\n------------------------------------------\n#[prelude_import]\nuse ::std::prelude::v1::*;\n#[macro_use]\nextern crate std;\n// pretty-compare-only\n// pretty-mode:hir,typed\n// pp-exact:issue-4264.pp\n\n// #4264 fixed-length vector types\n\npub fn foo(_: [i32; (3 as usize)]) ({ } as ())\n\npub fn bar() ({\n                  const FOO: usize = ((5 as usize) - (4 as usize) as usize);\n                  let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);\n\n                  let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);\n\n                  let _ =\n                      (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])\n                            as &[i32; 3]) as *const _ as *const [i32; 3]) as\n                          *const [i32; (3 as usize)] as *const [i32; 3]);\n\n\n\n\n\n\n\n\n\n                  ({\n                       let res =\n                           ((::alloc::fmt::format as\n                                for<\'r> fn(std::fmt::Arguments<\'r>) -> std::string::String {std::fmt::format})(((<::core::fmt::Arguments>::new_v1\n                                                                                                                    as\n                                                                                                                    fn(&[&str], &[std::fmt::ArgumentV1<\'_>]) -> std::fmt::Arguments<\'_> {std::fmt::Arguments::<\'_>::new_v1})((&([(\"test\"\n                                                                                                                                                                                                                                     as\n                                                                                                                                                                                                                                     &\'static str)]\n                                                                                                                                                                                                                                   as\n                                                                                                                                                                                                                                   [&str; 1])\n                                                                                                                                                                                                                                 as\n                                                                                                                                                                                                                                 &[&str; 1]),\n                                                                                                                                                                                                                             (&(match (()\n                                                                                                                                                                                                                                          as\n                                                                                                                                                                                                                                          ())\n                                                                                                                                                                                                                                    {\n                                                                                                                                                                                                                                    ()\n                                                                                                                                                                                                                                    =>\n                                                                                                                                                                                                                                    ([]\n                                                                                                                                                                                                                                        as\n                                                                                                                                                                                                                                        [std::fmt::ArgumentV1<\'_>; 0]),\n                                                                                                                                                                                                                                }\n                                                                                                                                                                                                                                   as\n                                                                                                                                                                                                                                   [std::fmt::ArgumentV1<\'_>; 0])\n                                                                                                                                                                                                                                 as\n                                                                                                                                                                                                                                 &[std::fmt::ArgumentV1<\'_>; 0]))\n                                                                                                                   as\n                                                                                                                   std::fmt::Arguments<\'_>))\n                               as std::string::String);\n                       (res as std::string::String)\n                   } as std::string::String);\n              } as ())\npub type Foo = [i32; (3 as usize)];\npub struct Bar {\n    pub x: [i32; (3 as usize)],\n}\npub struct TupleBar([i32; (4 as usize)]);\npub enum Baz { BazVariant([i32; (5 as usize)]), }\npub fn id<T>(x: T) -> T ({ (x as T) } as T)\npub fn use_id() ({\n                     let _ =\n                         ((id::<[i32; (3 as usize)]> as\n                              fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1\n                                                                               as\n                                                                               i32),\n                                                                           (2\n                                                                               as\n                                                                               i32),\n                                                                           (3\n                                                                               as\n                                                                               i32)]\n                                                                             as\n                                                                             [i32; 3]))\n                             as [i32; 3]);\n                 } as ())\nfn main() ({ } as ())\n\n------------------------------------------\n\n"
2019-09-28T04:47:40.8284417Z thread '[pretty] pretty/issue-4264.rs' panicked at 'fatal error', src/tools/compiletest/src/runtest.rs:2254:9
2019-09-28T04:47:40.8284562Z 
2019-09-28T04:47:40.8298406Z 
2019-09-28T04:47:40.8298548Z failures:
2019-09-28T04:47:40.8299018Z     [pretty] pretty/issue-4264.rs
2019-09-28T04:47:40.8299018Z     [pretty] pretty/issue-4264.rs
2019-09-28T04:47:40.8299059Z 
2019-09-28T04:47:40.8299367Z test result: FAILED. 54 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
2019-09-28T04:47:40.8299418Z 
2019-09-28T04:47:40.8299726Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-09-28T04:47:40.8299768Z 
2019-09-28T04:47:40.8299796Z 
2019-09-28T04:47:40.8302059Z 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/pretty" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/pretty" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "pretty" "--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 -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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"
2019-09-28T04:47:40.8302325Z 
2019-09-28T04:47:40.8302359Z 
2019-09-28T04:47:40.8302426Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-09-28T04:47:40.8302483Z Build completed unsuccessfully in 1:19:32
2019-09-28T04:47:40.8302483Z Build completed unsuccessfully in 1:19:32
2019-09-28T04:47:40.8326809Z == clock drift check ==
2019-09-28T04:47:40.8341580Z   local time: Sat Sep 28 04:47:40 UTC 2019
2019-09-28T04:47:40.9842096Z   network time: Sat, 28 Sep 2019 04:47:40 GMT
2019-09-28T04:47:40.9845729Z == end clock drift check ==
2019-09-28T04:47:43.1403730Z ##[error]Bash exited with code '1'.
2019-09-28T04:47:43.1468824Z ##[section]Starting: Checkout
2019-09-28T04:47:43.1472843Z ==============================================================================
2019-09-28T04:47:43.1472900Z Task         : Get sources
2019-09-28T04:47:43.1472963Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 28, 2019

@Centril thinking some more about this, I don't think there's a way to get out of changing the drop order except by making format! actually parse its arguments and ensure that it takes a reference to each one somehow. I toyed around with something like

macro_rules! format {
    ($($arg:tt)*) => ((|| {$crate::fmt::format($crate::__export::format_args!($($arg)*))})())
}

But the closure tries to move arguments passed to format! without & (despite not having a move annotation), so that won't work.

In #64477 (comment), @nikomatsakis said:

Unfortunately, the format! temporaries include dyn Trait objects that are not Send. So the error is correct. The shorter-term fix would I think be to alter the desugaring of format! so that its intermediate values are Send, I'm afraid.

I'm not sure how we could go about doing that without adding additional bounds on types passed to format! (which would definitely be a breaking change). If you have suggestions though, I'm all ears.

Ultimately, my guess at the moment is that we will either have to change drop order, have format! fully parse its arguments so it can drop only the references, or change the bounds of format!. I think the last one is out. The second one would probably be a fairly large change (possibly even making format! a proc-macro), and would be error-prone as we'd have to replicate the parsing from format_args! and then appropriately transform all inputs. The original suggestion seems like a neat compromise, but we would then have to decide whether the change in drop order is acceptable.

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 28, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2019

⌛️ Trying commit 8990f7d with merge 4465d00...

bors added a commit that referenced this pull request Sep 28, 2019
Scope format! temporaries

This places the temporaries that `format!` generates to refer to its arguments (through `&dyn Trait`) in a short-lived scope surrounding just the invocation of `format!`. This enables `format!` to be used in generators without the temporaries preventing the generator from being `Send` (due to `dyn Trait` not being `Sync`).

See #64477 for details.
@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2019

☀️ Try build successful - checks-azure
Build commit: 4465d00 (4465d0049bf00b9224f1908770f277c145361aed)

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 28, 2019

@craterbot run mode=check-only

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Sep 28, 2019

👌 Experiment pr-64856 created and queued.
🤖 Automatically detected try build 4465d00
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 28, 2019

@craterbot abort

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Sep 28, 2019

🗑 Experiment pr-64856 deleted!

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 28, 2019

@craterbot run mode=build-and-test

(Changes dynamic semantics possibly.)

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Sep 28, 2019

👌 Experiment pr-64856 created and queued.
🤖 Automatically detected try build 4465d00
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Sep 29, 2019

@Centril the azure crater agent appears to be stuck, and the aws agent isn't picking up any new jobs?

@Centril

This comment has been minimized.

Copy link
Member

commented Sep 29, 2019

@pietroalbini

This comment has been minimized.

Copy link
Member

commented Sep 30, 2019

The Azure agent being stuck is expected, as we had problems with that VM over the weekend without actually time to investigate them. Not sure what happened with the AWS agent though, after a restart it started working again.

jonhoo added a commit to tokio-rs/tokio that referenced this pull request Sep 30, 2019
jonhoo added a commit to tokio-rs/tokio that referenced this pull request Sep 30, 2019
`foo(format!(...)).await` no longer compiles. There's a fix in
rust-lang/rust#64856, but this works around the problem.
jonhoo added a commit to tokio-rs/tokio that referenced this pull request Sep 30, 2019
`foo(format!(...)).await` no longer compiles. There's a fix in
rust-lang/rust#64856, but this works around the problem.
@nikomatsakis

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2019

@jonhoo can you say a bit more about the specifics here? The temporaries that are being created -- what are their types? There may be room to make the analysis more precise. In particular, we know that &dyn Foo objects don't have destructors (and NLL already takes advantage of this), so maybe we don't have to worry about when the temporaries containing them are freed.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

commented Oct 1, 2019

Actually, @jonhoo, don't answer that -- can you open a new issue describing the ergonomic problem and some of the details, and we can file it to be discussed there?

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 1, 2019

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2019

@jonhoo thanks!

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Oct 14, 2019

🚧 Experiment pr-64856 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

This comment has been minimized.

Copy link
Collaborator

commented Oct 19, 2019

🎉 Experiment pr-64856 is completed!
📊 18 regressed and 28 fixed (74234 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Centril

This comment has been minimized.

Copy link
Member

commented Oct 19, 2019

@jonhoo can you triage the regressions?

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2019

I'll do some digging and report back. A cursory reading suggests that varkor.metasub.223fb77cb9866a58013d7eb7afab2d2711224d12 might be genuine (see here), but the others are unlikely to be.

@Centril

This comment has been minimized.

Copy link
Member

commented Oct 19, 2019

@varkor Seems your proof assistant doesn't want to play ball. :)

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2019

Triage:

AttilaOrs._tempBug.7d087eed8cecac718445cba03999bbeedc5c1585

same spurious failure on current nightly

dobrakmato.rust-brainfuck.b9e6db9065dee7bb0ad5587763477c1f2264aad6

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.

duriantang.nickel_cors.5685cd9045bc264276689410a4052e3a8ed0a8e1

same spurious failure on current nightly

mantal.expert_system.873622fa400d5bd721e592f22561e98860f69536

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.

northpole79.tcp_comms.a943d47b88f905bf6ebe20c3d69d0308969d5739

same failure on current nightly

proudlygeek.emuchip-8.2f6e44576998b85f3dc3454fa50b51f03d33b1f1

same failure on current nightly

tommyjk.kv-server.61e87f3703ad4db2c0210a2ab04c0c52ea2a5745

same failure on current nightly

varkor.metasub.223fb77cb9866a58013d7eb7afab2d2711224d12

⚠️ genuine compile-time error

autoperf-0.9.4

same failure on current nightly

bosun_emitter-1.2.0

fails to compile on nightly

carboxyl_time-0.0.3

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.
looks to be an issue with crater being slow, and tests being time-based.

extsort-0.2.0

same failure on current nightly

globwalk-0.7.1

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.
looks like some weird compile issue around multiple rlibs

psyche-serde-0.2.19

same failure on current nightly

rsst-0.1.0

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.
seems to be related to the crater home dir layout.

s_app_dir-0.0.0

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.
seems to be related to the crater home dir layout.

sodium-rust-1.0.1

same failure on current nightly

strip-ansi-escapes-0.1.0

cannot reproduce failure on nightly.
manual inspection says format! isn't to blame.
looks like some weird compile issue around multiple rlibs

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2019

@Centril based on ^ I'd say that @vorner's is the only regression.

@vorner

This comment has been minimized.

Copy link
Contributor

commented Oct 19, 2019

😕 I'm having trouble figuring what my regression you're referring to. Did you want to highlight me, or someone else?

@jonhoo

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2019

@vorner sorry, I meant @varkor !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.