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

Improve raw string diagnostic #61255

Closed
wants to merge 2 commits into from

Conversation

hellow554
Copy link
Contributor

This PR tries to improve unbalanced raw string literals, e.g. too many or too little hashtags in the end.

Unified parsing of rwa byte and raw string literals by introducing a new enum. The difference is that '\r' cannot appear solely in raw strings and that raw byte is ascii only.

Resolves #60762

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 28, 2019
@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
travis_time:end:36405690:start=1559030288828577675,finish=1559030291031888498,duration=2203310823
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:05:00] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:05:00] tidy error: /checkout/src/libsyntax/parse/lexer/mod.rs:1322: line longer than 100 chars
[00:05:05] some tidy checks failed
[00:05:05] 
[00:05:05] 
[00:05:05] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:05:05] 
[00:05:05] 
[00:05:05] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:05:05] Build completed unsuccessfully in 0:01:16
[00:05:05] Build completed unsuccessfully in 0:01:16
[00:05:05] Makefile:67: recipe for target 'tidy' failed
[00:05:05] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0012c9a5
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue May 28 08:03:27 UTC 2019
---
travis_time:end:00c28791:start=1559030608193513475,finish=1559030608198934983,duration=5421508
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00bc8180
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:186483a9
travis_time:start:186483a9
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:17d1532a
$ dmesg | grep -i kill

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

@petrochenkov
Copy link
Contributor

cc @matklad

@petrochenkov petrochenkov self-assigned this May 28, 2019
@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
travis_time:end:0c77d68c:start=1559031758942179067,finish=1559031761124872781,duration=2182693714
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[01:16:20] ...................................................................................................i 3800/5593
[01:16:24] i................................................................................................... 3900/5593
[01:16:26] ....................i............................................................................... 4000/5593
[01:16:28] ....................................................................................i............... 4100/5593
[01:16:30] .................................F...F.............................................................. 4200/5593
[01:16:46] .................................................................................................... 4400/5593
[01:16:49] .................................................................................................... 4500/5593
[01:16:53] .................................................................................................... 4600/5593
[01:16:57] .................................................................................................... 4700/5593
---
[01:17:36] 1 error: unterminated raw string
[01:17:36] -   --> $DIR/raw-string-long.rs:2:13
[01:17:36] +   --> $DIR/raw-str-long.rs:2:13
[01:17:36] 3    |
[01:17:36] 4 LL |     let a = r##"This
[01:17:36] 5    |             ^^^ unterminated raw string
[01:17:36] 
[01:17:36] The actual stderr differed from the expected stderr.
[01:17:36] The actual stderr differed from the expected stderr.
[01:17:36] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/raw/raw-str-long/raw-str-long.stderr
[01:17:36] To update references, rerun the tests and pass the `--bless` flag
[01:17:36] To only update this specific test, also pass `--test-args parser/raw/raw-str-long.rs`
[01:17:36] error: 1 errors occurred comparing output.
[01:17:36] status: exit code: 1
[01:17:36] status: exit code: 1
[01:17:36] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/raw/raw-str-long.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/parser/raw/raw-str-long" "-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/parser/raw/raw-str-long/auxiliary" "-A" "unused"
[01:17:36] ------------------------------------------
[01:17:36] 
[01:17:36] ------------------------------------------
[01:17:36] stderr:
[01:17:36] stderr:
[01:17:36] ------------------------------------------
[01:17:36] error: unterminated raw string
[01:17:36]   --> /checkout/src/test/ui/parser/raw/raw-str-long.rs:2:13
[01:17:36]    |
[01:17:36] LL |     let a = r##"This //~ ERROR unterminated raw string
[01:17:36]    |             ^^^ unterminated raw string
[01:17:36] help: Raw string could be meant to end here
[01:17:36] LL |     "##;
[01:17:36]    |     ^^^
[01:17:36]    |     ^^^
[01:17:36] help: Raw string could be meant to end here
[01:17:36] LL | }"##
[01:17:36]    |   ^^^
[01:17:36] 
[01:17:36] error: aborting due to previous error
---
[01:17:36] 1 error: unterminated raw string
[01:17:36] -   --> $DIR/raw_string.rs:2:13
[01:17:36] +   --> $DIR/raw-str.rs:2:13
[01:17:36] 3    |
[01:17:36] 4 LL |     let x = r##"lol"#;
[01:17:36] 5    |             ^^^ unterminated raw string
[01:17:36] 
[01:17:36] The actual stderr differed from the expected stderr.
[01:17:36] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/raw/raw-str/raw-str.stderr
[01:17:36] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/raw/raw-str/raw-str.stderr
[01:17:36] To update references, rerun the tests and pass the `--bless` flag
[01:17:36] To only update this specific test, also pass `--test-args parser/raw/raw-str.rs`
[01:17:36] error: 1 errors occurred comparing output.
[01:17:36] status: exit code: 1
[01:17:36] status: exit code: 1
[01:17:36] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/raw/raw-str.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/parser/raw/raw-str" "-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/parser/raw/raw-str/auxiliary" "-A" "unused"
[01:17:36] ------------------------------------------
[01:17:36] 
[01:17:36] ------------------------------------------
[01:17:36] stderr:
[01:17:36] stderr:
[01:17:36] ------------------------------------------
[01:17:36] error: unterminated raw string
[01:17:36]   --> /checkout/src/test/ui/parser/raw/raw-str.rs:2:13
[01:17:36]    |
[01:17:36] LL |     let x = r##"lol"#;
[01:17:36]    |             ^^^ unterminated raw string
[01:17:36] help: Raw string could be meant to end here
[01:17:36]    |
[01:17:36] LL |     let x = r##"lol"##;
[01:17:36]    |                    ^^^
[01:17:36] help: Raw string could be meant to end here
[01:17:36] LL | }"##
[01:17:36]    |   ^^^
[01:17:36] 
[01:17:36] error: aborting due to previous error
---
[01:17:36] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:521:22
[01:17:36] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:17:36] 
[01:17:36] 
[01:17:36] 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"
[01:17:36] 
[01:17:36] 
[01:17:36] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:17:36] Build completed unsuccessfully in 0:05:02
[01:17:36] Build completed unsuccessfully in 0:05:02
[01:17:36] make: *** [check] Error 1
[01:17:36] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:10ca7abe
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue May 28 09:40:28 UTC 2019

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)

@hellow554
Copy link
Contributor Author

hellow554 commented May 28, 2019

Should I rebase the 7 commits into one before the actual merge happens?

@estebank
Copy link
Contributor

Should I rebase the 7 commits into one before the actual merge happens?

No, it's fine. Each commit actually follows reasonable work units.

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach. Please clean up indentation throughout and make the wording changes.

src/libsyntax/parse/lexer/mod.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/lexer/mod.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/lexer/mod.rs Outdated Show resolved Hide resolved
src/test/ui/parser/raw/raw-byte-string-literals.stderr Outdated Show resolved Hide resolved
src/libsyntax/parse/lexer/mod.rs Outdated Show resolved Hide resolved
src/libsyntax/parse/lexer/mod.rs Outdated Show resolved Hide resolved
@petrochenkov
Copy link
Contributor

petrochenkov commented May 29, 2019

Does this PR change how code is broken up into tokens? (It shouldn't.)
Could you add this test case.

macro_rules! m {
    ($tt:tt #) => ()
}

m!(r#"abc"##); // OK

@petrochenkov petrochenkov removed their assignment May 29, 2019
@hellow554
Copy link
Contributor Author

hellow554 commented May 29, 2019

Could you add this test case.

Do you have a prefered folder for that testcase (and name maybe)?

@hellow554
Copy link
Contributor Author

hellow554 commented May 29, 2019

Unfortunately it does :(

error: too many `#` when terminating raw string
 --> src/test/ui/parser/raw/parse_petro.rs:5:4
  |
5 | m!(r#"abc"##);
  |    ^-^^^^^--
  |     |     |
  |     |     ...but is closed with 2.
  |     this raw string has 1 leading `#`...
  = help: remove the unneeded `#`

error: this file contains an un-closed delimiter
 --> src/test/ui/parser/raw/parse_petro.rs:5:16
  |
1 | macro_rules!( m {
  |             - un-closed delimiter
...
5 | m!(r#"abc"##);
  |                ^

error: expected identifier, found `(`
 --> src/test/ui/parser/raw/parse_petro.rs:1:13
  |
1 | macro_rules!( m {
  |             ^ expected identifier

error: aborting due to 3 previous errors

I'll try to fix that tomorrow.

@@ -2,9 +2,7 @@ error: unterminated raw string
--> $DIR/raw-str-unterminated.rs:2:5
|
LL | r#" string literal goes on
| ^ unterminated raw string
|
= note: this raw string should be terminated with `"#`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should keep the current note for this case where no likely close is found.

@estebank
Copy link
Contributor

@petrochenkov good catch. Wasn't aware of that behavior.

Do you have a prefered folder for that testcase (and name maybe)?

ui/parser/raw/raw-str-in-macro-call.rs

I'll try to fix that tomorrow.

The parser now tracks what parser is doing the parsing, and @petrochenkov will probably be able to answer this with certainty, but I believe that you might be able check self.subparser_name.is_none() and if it isn't, do not consume the trailing token. I'm not 100% sure that it will work, but it is worth a check.

@hellow554
Copy link
Contributor Author

but I believe that you might be able check self.subparser_name.is_none()

Sadly that's not possible, if I'm correct. subparser_name is defined in

#[derive(Clone)]
pub struct Parser<'a> {
pub sess: &'a ParseSess,
/// the current token:
pub token: token::Token,
/// the span of the current token:
pub span: Span,
/// the span of the previous token:
meta_var_span: Option<Span>,
pub prev_span: Span,
/// the previous token kind
prev_token_kind: PrevTokenKind,
restrictions: Restrictions,
/// Used to determine the path to externally loaded source files
crate directory: Directory<'a>,
/// Whether to parse sub-modules in other files.
pub recurse_into_file_modules: bool,
/// Name of the root module this parser originated from. If `None`, then the
/// name is not known. This does not change while the parser is descending
/// into modules, and sub-parsers have new values for this name.
pub root_module_name: Option<String>,
crate expected_tokens: Vec<TokenType>,
crate token_cursor: TokenCursor,
desugar_doc_comments: bool,
/// Whether we should configure out of line modules as we parse.
pub cfg_mods: bool,
/// This field is used to keep track of how many left angle brackets we have seen. This is
/// required in order to detect extra leading left angle brackets (`<` characters) and error
/// appropriately.
///
/// See the comments in the `parse_path_segment` function for more details.
crate unmatched_angle_bracket_count: u32,
crate max_angle_bracket_count: u32,
/// List of all unclosed delimiters found by the lexer. If an entry is used for error recovery
/// it gets removed from here. Every entry left at the end gets emitted as an independent
/// error.
crate unclosed_delims: Vec<UnmatchedBrace>,
crate last_unexpected_token_span: Option<Span>,
/// If present, this `Parser` is not parsing Rust code but rather a macro call.
crate subparser_name: Option<&'static str>,
}

but I'm not using the Parser struct, but Stringreader and I can't see a way to access it. I need some help here :/

@estebank
Copy link
Contributor

Don't consume the extra #s in the lexer and clean up the PR for merging. In a follow up PR we should try to ignore the extra #s in the parser instead, where we'll have greater context on wether doing so would be appropriate or not. I really like this improvement and wouldn't want it to get bogged down for one case out of three. The diagnostic improvements are worth it even without the recovery to continue compiling.

@bors
Copy link
Contributor

bors commented Jun 1, 2019

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

@hellow554
Copy link
Contributor Author

Sorry, I was away over the last couple of days (holidays in germany :) ). I'm looking into this probably wendsday. I'll going to rebase everything.

@estebank Should I remove the error completly or should I instead print a warning? Should I just comment out the code, but leave it there, or remove it?

@Xanewok
Copy link
Member

Xanewok commented Jun 8, 2019

If possible, I'd love for these changes to also account for #60793, which unifies the (raw/raw byte) actual scanning and defers the error reporting/validation step.

It'd be great to keep these separate, if possible ❤️

@estebank
Copy link
Contributor

estebank commented Jun 17, 2019

Should I remove the error completly or should I instead print a warning?

Leave the prior error behavior there.

Should I just comment out the code, but leave it there, or remove it?

Remove the code, there shouldn't ever be commented out code, it only raises questions like "why is this here" or "why wasn't this deleted".

Follow the path of least resistance. It's preferable to have solve a part of the whole problem and the rest later than letting the whole problem linger on.

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 8, 2019
@Dylan-DPC-zz
Copy link

ping from triage @hellow554 any updates on this?

@hellow554
Copy link
Contributor Author

@Dylan-DPC not really. Problem is that I hadn't time in a while and last week I started looking at this again. #60793 changed a lot. Need some time to look at the code again. Will update this.

@hellow554
Copy link
Contributor Author

Hey @estebank , long time no seen 😊
I finally managed to get some time to work on this again. Maybe you can look over it and give some feedback?
Sadly because of the macro thingy I'm currently not able to make a good suggestion if too many # are added after a raw string literal. Has anything changed since last time?

@Xanewok
Copy link
Member

Xanewok commented Jul 15, 2019

cc @matklad wrt changed raw strings lexer code

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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-07-15T14:37:22.9517452Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-15T14:37:22.9756154Z ##[command]git config gc.auto 0
2019-07-15T14:37:22.9820073Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-15T14:37:22.9867720Z ##[command]git config --get-all http.proxy
2019-07-15T14:37:23.0005054Z ##[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/61255/merge:refs/remotes/pull/61255/merge
---
2019-07-15T14:37:57.9003102Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-15T14:37:57.9004006Z 
2019-07-15T14:37:57.9005130Z   git checkout -b <new-branch-name>
2019-07-15T14:37:57.9006020Z 
2019-07-15T14:37:57.9006883Z HEAD is now at c3963640c Merge d94b2ff83a9cdd7a5768ee9ec0e3da2d220508f7 into 5480b47d7f9e708300d3ba319869f21cd1ffd487
2019-07-15T14:37:57.9130337Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-15T14:37:57.9133331Z ==============================================================================
2019-07-15T14:37:57.9133387Z Task         : Bash
2019-07-15T14:37:57.9133431Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-15T14:39:33.5053102Z Attempting with retry: curl -y 30 -Y 10 --connect-timeout 30 -f -L -C - -o /tmp/rustci_docker_cache https://.s3.amazonaws.com/docker/c7688a42c3598c0b7dfe0f9f69838f24b25841ef6f7f87b4686f4da367d970f5a477b9c1277bdc58ebfc14a49c51c0e2ddb2b3366d867d7aae1de3d9233c8624
2019-07-15T14:39:33.5104500Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-07-15T14:39:33.5104948Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-07-15T14:39:33.5105262Z 
2019-07-15T14:39:33.5149322Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: .s3.amazonaws.com
2019-07-15T14:39:34.5239162Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-07-15T14:39:34.5239395Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-07-15T14:39:34.5239430Z 
2019-07-15T14:39:34.5239430Z 
2019-07-15T14:39:34.5240724Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: .s3.amazonaws.com
2019-07-15T14:39:36.5327927Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-07-15T14:39:36.5328020Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-07-15T14:39:36.5328052Z 
2019-07-15T14:39:36.5328052Z 
2019-07-15T14:39:36.5362217Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: .s3.amazonaws.com
2019-07-15T14:39:39.5428638Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-07-15T14:39:39.5429188Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-07-15T14:39:39.5429496Z 
2019-07-15T14:39:39.5429496Z 
2019-07-15T14:39:39.5479324Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: .s3.amazonaws.com
2019-07-15T14:39:43.5549034Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2019-07-15T14:39:43.5549601Z                                  Dload  Upload   Total   Spent    Left  Speed
2019-07-15T14:39:43.5549675Z 
2019-07-15T14:39:43.5549675Z 
2019-07-15T14:39:43.5592366Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: .s3.amazonaws.com
2019-07-15T14:39:43.5598223Z The command has failed after 5 attempts.
2019-07-15T14:39:43.6134945Z open /tmp/rustci_docker_cache: no such file or directory
2019-07-15T14:39:43.6160394Z Attempting with retry: docker build --rm -t rust-ci -f /home/vsts/work/1/s/src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile /home/vsts/work/1/s/src/ci/docker
2019-07-15T14:39:43.7901610Z Sending build context to Docker daemon  521.7kB
2019-07-15T14:39:43.8116160Z 
2019-07-15T14:39:43.8116377Z Step 1/8 : FROM ubuntu:16.04
---
2019-07-15T14:39:59.5201566Z Reading package lists...
2019-07-15T14:40:00.5429843Z Reading package lists...
2019-07-15T14:40:00.7439171Z Building dependency tree...
2019-07-15T14:40:00.7439284Z Reading state information...
2019-07-15T14:40:00.8782675Z The following additional packages will be installed:
2019-07-15T14:40:00.8783934Z   binfmt-support binutils bzip2 cmake-data cpp cpp-5 dpkg-dev g++-5 gcc gcc-5
2019-07-15T14:40:00.8784480Z   git-man libarchive13 libasan2 libasn1-8-heimdal libatomic1
2019-07-15T14:40:00.8784828Z   libbabeltrace-ctf1 libbabeltrace1 libbsd-dev libbsd0 libbz2-1.0 libc-dev-bin
2019-07-15T14:40:00.8785304Z   libedit2 liberror-perl libexpat1 libffi-dev libffi6 libgcc-5-dev libgdbm3
2019-07-15T14:40:00.8785581Z   libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgssapi-krb5-2
2019-07-15T14:40:00.8785804Z   libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal
2019-07-15T14:40:00.8786087Z   libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libicu55 libidn11
2019-07-15T14:40:00.8786087Z   libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libicu55 libidn11
2019-07-15T14:40:00.8786374Z   libisl15 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal
2019-07-15T14:40:00.8786609Z   libkrb5-3 libkrb5support0 libldap-2.4-2 libllvm6.0 liblsan0 liblzo2-2
2019-07-15T14:40:00.8786841Z   libmagic1 libmpc3 libmpdec2 libmpfr4 libmpx0 libnettle6 libp11-kit0
2019-07-15T14:40:00.8787113Z   libperl5.22 libpipeline1 libpython-stdlib libpython2.7-minimal
2019-07-15T14:40:00.8787351Z   libpython2.7-stdlib libpython3.5 libpython3.5-minimal libpython3.5-stdlib
2019-07-15T14:40:00.8787587Z   libquadmath0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules-db
2019-07-15T14:40:00.8788034Z   libsqlite3-0 libssl1.0.0 libstdc++-5-dev libtasn1-6 libtinfo-dev libtsan0
2019-07-15T14:40:00.8788426Z   libubsan0 libwind0-heimdal libxml2 linux-libc-dev llvm-6.0 llvm-6.0-dev
2019-07-15T14:40:00.8788646Z   llvm-6.0-runtime mime-support openssl patch perl perl-modules-5.22 python
2019-07-15T14:40:00.8789224Z   python-minimal python2.7-minimal
2019-07-15T14:40:00.8789279Z Suggested packages:
2019-07-15T14:40:00.8789500Z   binutils-doc bzip2-doc codeblocks eclipse ninja-build cpp-doc gcc-5-locales
2019-07-15T14:40:00.8789759Z   debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg
2019-07-15T14:40:00.8789974Z   gcc-multilib manpages-dev autoconf automake libtool flex bison gcc-doc
2019-07-15T14:40:00.8790944Z   libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg
2019-07-15T14:40:00.8791189Z   libmpx0-dbg libquadmath0-dbg gdb-doc gettext-base git-daemon-run
2019-07-15T14:40:00.8791189Z   libmpx0-dbg libquadmath0-dbg gdb-doc gettext-base git-daemon-run
2019-07-15T14:40:00.8791441Z   | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch
2019-07-15T14:40:00.8791736Z   git-cvs git-mediawiki git-svn lrzip glibc-doc gnutls-bin krb5-doc krb5-user
2019-07-15T14:40:00.8791988Z   libstdc++-5-doc llvm-6.0-doc make-doc ed diffutils-doc perl-doc
2019-07-15T14:40:00.8792263Z   libterm-readline-gnu-perl | libterm-readline-perl-perl python-doc python-tk
2019-07-15T14:40:00.8792503Z   python2.7-doc
2019-07-15T14:40:00.8792553Z Recommended packages:
2019-07-15T14:40:00.8792804Z   build-essential fakeroot libalgorithm-merge-perl libc-dbg gdbserver less
2019-07-15T14:40:00.8793087Z   rsync ssh-client manpages manpages-dev libfile-fcntllock-perl
2019-07-15T14:40:00.8793348Z   libglib2.0-data shared-mime-info xdg-user-dirs krb5-locales libsasl2-modules
2019-07-15T14:40:00.8793723Z   libssl-doc xml-core netbase rename
2019-07-15T14:40:00.8793808Z The following NEW packages will be installed:
2019-07-15T14:40:00.8794071Z   binfmt-support binutils bzip2 ca-certificates cmake cmake-data cpp cpp-5
2019-07-15T14:40:00.8795546Z   curl dpkg-dev file g++ g++-5 gcc gcc-5 gdb git git-man libarchive13 libasan2
2019-07-15T14:40:00.8795958Z   libasn1-8-heimdal libatomic1 libbabeltrace-ctf1 libbabeltrace1 libbsd-dev
2019-07-15T14:40:00.8796222Z   libbsd0 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libcurl3 libcurl3-gnutls
2019-07-15T14:40:00.8796609Z   libdpkg-perl libedit-dev libedit2 liberror-perl libexpat1 libffi-dev libffi6
2019-07-15T14:40:00.8796932Z   libgcc-5-dev libgdbm3 libglib2.0-0 libgmp10 libgnutls30 libgomp1
2019-07-15T14:40:00.8797401Z   libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libicu55 libidn11
2019-07-15T14:40:00.8797882Z   libisl15 libitm1 libjsoncpp1 libk5crypto3 libkeyutils1 libkrb5-26-heimdal
2019-07-15T14:40:00.8798125Z   libkrb5-3 libkrb5support0 libldap-2.4-2 libllvm6.0 liblsan0 liblzo2-2
2019-07-15T14:40:00.8798519Z   libmagic1 libmpc3 libmpdec2 libmpfr4 libmpx0 libnettle6 libp11-kit0
2019-07-15T14:40:00.8798519Z   libmagic1 libmpc3 libmpdec2 libmpfr4 libmpx0 libnettle6 libp11-kit0
2019-07-15T14:40:00.8798776Z   libperl5.22 libpipeline1 libpython-stdlib libpython2.7-minimal
2019-07-15T14:40:00.8799012Z   libpython2.7-stdlib libpython3.5 libpython3.5-minimal libpython3.5-stdlib
2019-07-15T14:40:00.8799251Z   libquadmath0 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules-db
2019-07-15T14:40:00.8799525Z   libsqlite3-0 libssl-dev libssl1.0.0 libstdc++-5-dev libtasn1-6 libtinfo-dev
2019-07-15T14:40:00.8799946Z   libtsan0 libubsan0 libwind0-heimdal libxml2 linux-libc-dev llvm-6.0
2019-07-15T14:40:00.8800758Z   llvm-6.0-dev llvm-6.0-runtime llvm-6.0-tools make mime-support openssl patch
2019-07-15T14:40:00.8801064Z   perl perl-modules-5.22 pkg-config python python-minimal python2.7
2019-07-15T14:40:00.8801298Z   python2.7-minimal sudo xz-utils zlib1g-dev
2019-07-15T14:40:00.8801353Z The following packages will be upgraded:
2019-07-15T14:40:01.1479833Z 1 upgraded, 115 newly installed, 0 to remove and 4 not upgraded.
2019-07-15T14:40:01.1480054Z Need to get 121 MB of archives.
2019-07-15T14:40:01.1480109Z After this operation, 592 MB of additional disk space will be used.
2019-07-15T14:40:01.1480915Z Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgdbm3 amd64 1.8.3-13.1 [16.9 kB]
---
2019-07-15T14:40:02.2338740Z Get:61 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 sudo amd64 1.8.16-0ubuntu1.7 [390 kB]
2019-07-15T14:40:02.2401923Z Get:62 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssl amd64 1.0.2g-1ubuntu4.15 [492 kB]
2019-07-15T14:40:02.2475864Z Get:63 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ca-certificates all 20170717~16.04.2 [167 kB]
2019-07-15T14:40:02.2502199Z Get:64 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3-gnutls amd64 7.47.0-1ubuntu2.13 [184 kB]
2019-07-15T14:40:02.2528140Z Get:65 http://archive.ubuntu.com/ubuntu xenial/main amd64 libedit2 amd64 3.1-20150325-1ubuntu2 [76.5 kB]
2019-07-15T14:40:02.2546129Z Get:66 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpipeline1 amd64 1.4.1-2 [24.6 kB]
2019-07-15T14:40:02.2546444Z Get:67 http://archive.ubuntu.com/ubuntu xenial/main amd64 binfmt-support amd64 2.1.6-1 [50.7 kB]
2019-07-15T14:40:02.3233545Z Get:69 http://archive.ubuntu.com/ubuntu xenial/main amd64 libisl15 amd64 0.16.1-1 [524 kB]
2019-07-15T14:40:02.3311339Z Get:70 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.11 [7660 kB]
2019-07-15T14:40:02.4463512Z Get:71 http://archive.ubuntu.com/ubuntu xenial/main amd64 cpp amd64 4:5.3.1-1ubuntu1 [27.7 kB]
2019-07-15T14:40:02.4472072Z Get:72 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.13 [139 kB]
---
2019-07-15T14:40:21.1543388Z Unpacking ca-certificates (20170717~16.04.2) ...
2019-07-15T14:40:21.3019436Z Selecting previously unselected package libcurl3-gnutls:amd64.
2019-07-15T14:40:21.3034728Z Preparing to unpack .../libcurl3-gnutls_7.47.0-1ubuntu2.13_amd64.deb ...
2019-07-15T14:40:21.3196197Z Unpacking libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.13) ...
2019-07-15T14:40:21.4407825Z Selecting previously unselected package libedit2:amd64.
2019-07-15T14:40:21.4424864Z Preparing to unpack .../libedit2_3.1-20150325-1ubuntu2_amd64.deb ...
2019-07-15T14:40:21.4577048Z Unpacking libedit2:amd64 (3.1-20150325-1ubuntu2) ...
2019-07-15T14:40:21.5654821Z Selecting previously unselected package libpipeline1:amd64.
2019-07-15T14:40:21.5673756Z Preparing to unpack .../libpipeline1_1.4.1-2_amd64.deb ...
2019-07-15T14:40:21.5809472Z Unpacking libpipeline1:amd64 (1.4.1-2) ...
2019-07-15T14:40:21.6820267Z Selecting previously unselected package binfmt-support.
2019-07-15T14:40:21.6834273Z Preparing to unpack .../binfmt-support_2.1.6-1_amd64.deb ...
2019-07-15T14:40:21.6949563Z Unpacking binfmt-support (2.1.6-1) ...
2019-07-15T14:40:21.7986012Z Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.8_amd64.deb ...
2019-07-15T14:40:21.8118027Z Unpacking binutils (2.26.1-1ubuntu1~16.04.8) ...
2019-07-15T14:40:22.2773097Z Selecting previously unselected package libisl15:amd64.
2019-07-15T14:40:22.2789743Z Preparing to unpack .../libisl15_0.16.1-1_amd64.deb ...
---
2019-07-15T14:40:33.6787810Z Selecting previously unselected package libtinfo-dev:amd64.
2019-07-15T14:40:33.6806021Z Preparing to unpack .../libtinfo-dev_6.0+20160213-1ubuntu1_amd64.deb ...
2019-07-15T14:40:33.6919733Z Unpacking libtinfo-dev:amd64 (6.0+20160213-1ubuntu1) ...
2019-07-15T14:40:33.7774285Z Selecting previously unselected package libedit-dev:amd64.
2019-07-15T14:40:33.7795809Z Preparing to unpack .../libedit-dev_3.1-20150325-1ubuntu2_amd64.deb ...
2019-07-15T14:40:33.7911881Z Unpacking libedit-dev:amd64 (3.1-20150325-1ubuntu2) ...
2019-07-15T14:40:33.8964201Z Selecting previously unselected package libllvm6.0:amd64.
2019-07-15T14:40:33.8988286Z Preparing to unpack .../libllvm6.0_1%3a6.0-1ubuntu2~16.04.1_amd64.deb ...
2019-07-15T14:40:33.9104774Z Unpacking libllvm6.0:amd64 (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:36.8486353Z Selecting previously unselected package zlib1g-dev:amd64.
2019-07-15T14:40:36.8499167Z Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...
2019-07-15T14:40:36.8611110Z Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
2019-07-15T14:40:36.9548119Z Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.15_amd64.deb ...
2019-07-15T14:40:36.9660153Z Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.15) ...
2019-07-15T14:40:37.2746712Z Selecting previously unselected package llvm-6.0-runtime.
2019-07-15T14:40:37.2746712Z Selecting previously unselected package llvm-6.0-runtime.
2019-07-15T14:40:37.2770711Z Preparing to unpack .../llvm-6.0-runtime_1%3a6.0-1ubuntu2~16.04.1_amd64.deb ...
2019-07-15T14:40:37.2877780Z Unpacking llvm-6.0-runtime (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:37.4053217Z Selecting previously unselected package llvm-6.0.
2019-07-15T14:40:37.4073379Z Preparing to unpack .../llvm-6.0_1%3a6.0-1ubuntu2~16.04.1_amd64.deb ...
2019-07-15T14:40:37.4237414Z Unpacking llvm-6.0 (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:38.0723072Z Selecting previously unselected package libffi-dev:amd64.
2019-07-15T14:40:38.0760596Z Preparing to unpack .../libffi-dev_3.2.1-4_amd64.deb ...
2019-07-15T14:40:38.0875301Z Unpacking libffi-dev:amd64 (3.2.1-4) ...
2019-07-15T14:40:38.1968637Z Selecting previously unselected package llvm-6.0-dev.
2019-07-15T14:40:38.1988502Z Preparing to unpack .../llvm-6.0-dev_1%3a6.0-1ubuntu2~16.04.1_amd64.deb ...
2019-07-15T14:40:38.2109211Z Unpacking llvm-6.0-dev (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:42.8550121Z Selecting previously unselected package llvm-6.0-tools.
2019-07-15T14:40:42.8577577Z Preparing to unpack .../llvm-6.0-tools_1%3a6.0-1ubuntu2~16.04.1_amd64.deb ...
2019-07-15T14:40:42.8700488Z Unpacking llvm-6.0-tools (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:43.0089957Z Selecting previously unselected package pkg-config.
2019-07-15T14:40:43.0108493Z Preparing to unpack .../pkg-config_0.29.1-0ubuntu1_amd64.deb ...
2019-07-15T14:40:43.0225700Z Unpacking pkg-config (0.29.1-0ubuntu1) ...
2019-07-15T14:40:43.1236218Z Processing triggers for systemd (229-4ubuntu21.21) ...
2019-07-15T14:40:43.4590121Z Setting up libgdbm3:amd64 (1.8.3-13.1) ...
2019-07-15T14:40:43.5197876Z Setting up libffi6:amd64 (3.2.1-4) ...
2019-07-15T14:40:43.5547733Z Setting up libglib2.0-0:amd64 (2.48.2-0ubuntu4.3) ...
---
2019-07-15T14:40:47.1201426Z debconf: unable to initialize frontend: Dialog
2019-07-15T14:40:47.1201806Z debconf: (TERM is not set, so the dialog frontend is not usable.)
2019-07-15T14:40:47.1207760Z debconf: falling back to frontend: Readline
2019-07-15T14:40:47.8787156Z Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.13) ...
2019-07-15T14:40:47.9123253Z Setting up libedit2:amd64 (3.1-20150325-1ubuntu2) ...
2019-07-15T14:40:47.9457395Z Setting up libpipeline1:amd64 (1.4.1-2) ...
2019-07-15T14:40:47.9798118Z Setting up binfmt-support (2.1.6-1) ...
2019-07-15T14:40:48.0493011Z mount: permission denied
2019-07-15T14:40:48.0493838Z update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
2019-07-15T14:40:48.0507822Z mount: permission denied
2019-07-15T14:40:48.0527415Z update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
2019-07-15T14:40:48.2159491Z invoke-rc.d: could not determine current runlevel
2019-07-15T14:40:48.2188051Z invoke-rc.d: policy-rc.d denied execution of start.
2019-07-15T14:40:48.2702095Z Setting up libisl15:amd64 (0.16.1-1) ...
2019-07-15T14:40:48.3056315Z Setting up cpp-5 (5.4.0-6ubuntu1~16.04.11) ...
2019-07-15T14:40:48.3450996Z Setting up cpp (4:5.3.1-1ubuntu1) ...
2019-07-15T14:40:48.3895980Z Setting up curl (7.47.0-1ubuntu2.13) ...
---
2019-07-15T14:40:49.8949999Z Setting up libedit-dev:amd64 (3.1-20150325-1ubuntu2) ...
2019-07-15T14:40:49.9305142Z Setting up libllvm6.0:amd64 (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:49.9740380Z Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
2019-07-15T14:40:50.0084117Z Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.15) ...
2019-07-15T14:40:50.0503939Z Setting up llvm-6.0-runtime (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:50.0790944Z mount: permission denied
2019-07-15T14:40:50.0795328Z update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
2019-07-15T14:40:50.0917398Z Setting up llvm-6.0 (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:50.1262307Z Setting up libffi-dev:amd64 (3.2.1-4) ...
2019-07-15T14:40:50.1600272Z Setting up llvm-6.0-dev (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:50.1983220Z Setting up llvm-6.0-tools (1:6.0-1ubuntu2~16.04.1) ...
2019-07-15T14:40:50.2319308Z Setting up pkg-config (0.29.1-0ubuntu1) ...
2019-07-15T14:40:50.3523620Z Processing triggers for ca-certificates (20170717~16.04.2) ...
2019-07-15T14:40:50.3675978Z Updating certificates in /etc/ssl/certs...
2019-07-15T14:40:51.9453099Z 148 added, 0 removed; done.
2019-07-15T14:40:51.9455334Z Running hooks in /etc/ca-certificates/update.d...
---
2019-07-15T14:41:25.4850362Z  ---> 2d5f384afa41
2019-07-15T14:41:25.4924626Z Successfully built 2d5f384afa41
2019-07-15T14:41:25.6298467Z Successfully tagged rust-ci:latest
2019-07-15T14:41:25.7138879Z Built container sha256:2d5f384afa4121914421c584421c1d4c4bf3b50e04229019bfff3a9e4640e432
2019-07-15T14:41:25.7152191Z Uploading finished image to https://.s3.amazonaws.com/docker/c7688a42c3598c0b7dfe0f9f69838f24b25841ef6f7f87b4686f4da367d970f5a477b9c1277bdc58ebfc14a49c51c0e2ddb2b3366d867d7aae1de3d9233c8624
2019-07-15T14:42:27.2519970Z upload failed: - to s3:///docker/c7688a42c3598c0b7dfe0f9f69838f24b25841ef6f7f87b4686f4da367d970f5a477b9c1277bdc58ebfc14a49c51c0e2ddb2b3366d867d7aae1de3d9233c8624 Parameter validation failed:
2019-07-15T14:42:27.2521681Z Invalid bucket name "": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$"
2019-07-15T14:42:28.2754824Z [CI_JOB_NAME=x86_64-gnu-llvm-6.0]
2019-07-15T14:42:28.2807347Z Starting sccache server...
2019-07-15T14:42:28.3309601Z configure: processing command line
2019-07-15T14:42:28.3310503Z configure: 
---
2019-07-15T15:38:47.6207498Z .................................................................................................... 200/5809
2019-07-15T15:38:51.7303649Z .................................................................................................... 300/5809
2019-07-15T15:38:55.3319734Z .................................................................................................... 400/5809
2019-07-15T15:38:59.0690729Z .................................................................................................... 500/5809
2019-07-15T15:39:02.7951436Z ........................................................................i........................... 600/5809
2019-07-15T15:39:12.2546616Z .................................................................................................... 800/5809
2019-07-15T15:39:17.9711505Z .................................................................................................... 900/5809
2019-07-15T15:39:17.9711505Z .................................................................................................... 900/5809
2019-07-15T15:39:24.0617342Z ............................................................................................i....... 1000/5809
2019-07-15T15:39:28.5192626Z ....i............................................................................................... 1100/5809
2019-07-15T15:39:32.8153735Z ......................iiiii......................................................................... 1200/5809
2019-07-15T15:39:38.6692385Z .................................................................................................... 1400/5809
2019-07-15T15:39:41.4569081Z .................................................................................................... 1500/5809
2019-07-15T15:39:45.3913894Z .................................................................................................... 1600/5809
2019-07-15T15:39:47.9246268Z .................................................................................................... 1700/5809
2019-07-15T15:39:47.9246268Z .................................................................................................... 1700/5809
2019-07-15T15:39:51.5107547Z ...........................................................i........................................ 1800/5809
2019-07-15T15:40:00.1316816Z .................................................................................................... 2000/5809
2019-07-15T15:40:04.2109154Z .................................................................................................... 2100/5809
2019-07-15T15:40:08.3785972Z .................................................................................................... 2200/5809
2019-07-15T15:40:08.3785972Z .................................................................................................... 2200/5809
2019-07-15T15:40:11.9787727Z .........................i.......................................................................... 2300/5809
2019-07-15T15:40:21.8775709Z .................................................................................................... 2500/5809
2019-07-15T15:40:26.5212436Z .................................................................................................... 2600/5809
2019-07-15T15:40:30.8989733Z .................................................................................................... 2700/5809
2019-07-15T15:40:35.2769491Z .................................................................................................... 2800/5809
2019-07-15T15:40:35.2769491Z .................................................................................................... 2800/5809
2019-07-15T15:40:39.2913130Z .................................................................................................... 2900/5809
2019-07-15T15:40:44.7419339Z .................................................................................................... 3000/5809
2019-07-15T15:40:49.5099197Z .................................................................................................... 3100/5809
2019-07-15T15:40:54.0383186Z .................................................................................................... 3200/5809
2019-07-15T15:40:57.1429247Z .................................................................................................... 3300/5809
2019-07-15T15:41:02.5228343Z .................................................................................................... 3400/5809
2019-07-15T15:41:06.2639597Z .......................................................................................i............ 3500/5809
2019-07-15T15:41:10.0000834Z .................................................................................................... 3600/5809
2019-07-15T15:41:13.9101417Z .............................................................ii...i..ii............................. 3700/5809
2019-07-15T15:41:22.8437120Z .................................................................................................... 3900/5809
2019-07-15T15:41:22.8437120Z .................................................................................................... 3900/5809
2019-07-15T15:41:26.6361720Z ...........................................................................ii....................... 4000/5809
2019-07-15T15:41:29.3841787Z ................................................................................................i... 4100/5809
2019-07-15T15:41:31.5108462Z .................................................................................................... 4200/5809
2019-07-15T15:41:33.4340438Z .............................................................i...................................... 4300/5809
2019-07-15T15:41:35.9653335Z F................................................................................................... 4400/5809
2019-07-15T15:41:57.4890294Z .................................................................................................... 4600/5809
2019-07-15T15:42:01.0633326Z .................................................................................................... 4700/5809
2019-07-15T15:42:04.5535627Z .................................................................................................... 4800/5809
2019-07-15T15:42:11.0195440Z .................................................................................................... 4900/5809
---
2019-07-15T15:42:38.0421458Z .................................................................................................... 5400/5809
2019-07-15T15:42:42.6407130Z .................................................................................................... 5500/5809
2019-07-15T15:42:46.1989493Z .................................................................................................... 5600/5809
2019-07-15T15:42:49.3658042Z .................................................................................................... 5700/5809
2019-07-15T15:42:52.3240658Z .................................................i.................................................. 5800/5809
2019-07-15T15:42:52.8423591Z failures:
2019-07-15T15:42:52.8463111Z 
2019-07-15T15:42:52.8463693Z ---- [ui] ui/parser/raw/raw-byte-string-eof.rs stdout ----
2019-07-15T15:42:52.8463755Z diff of stderr:
2019-07-15T15:42:52.8463755Z diff of stderr:
2019-07-15T15:42:52.8463942Z 
2019-07-15T15:42:52.8464051Z 1 error: unterminated raw string
2019-07-15T15:42:52.8464517Z -   --> $DIR/raw-byte-string-eof.rs:2:6
2019-07-15T15:42:52.8464918Z +   --> $DIR/raw-byte-string-eof.rs:2:5
2019-07-15T15:42:52.8465125Z 3    |
2019-07-15T15:42:52.8465239Z 4 LL |     br##"a"#;
2019-07-15T15:42:52.8465540Z -    |      ^ unterminated raw string
2019-07-15T15:42:52.8465592Z +    |     ^^^^ unterminated raw string
2019-07-15T15:42:52.8465775Z + help: you migh have meant to end the raw string here
2019-07-15T15:42:52.8465872Z 6    |
2019-07-15T15:42:52.8466143Z -    = note: this raw string should be terminated with `"##`
2019-07-15T15:42:52.8466343Z + LL |     br##"a'##;
2019-07-15T15:42:52.8466757Z 8 
2019-07-15T15:42:52.8467161Z 9 error: aborting due to previous error
2019-07-15T15:42:52.8467205Z 10 
2019-07-15T15:42:52.8467254Z 
2019-07-15T15:42:52.8467254Z 
2019-07-15T15:42:52.8467584Z 
2019-07-15T15:42:52.8467697Z The actual stderr differed from the expected stderr.
2019-07-15T15:42:52.8468126Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/parser/raw/raw-byte-string-eof/raw-byte-string-eof.stderr
2019-07-15T15:42:52.8468575Z To update references, rerun the tests and pass the `--bless` flag
2019-07-15T15:42:52.8469069Z To only update this specific test, also pass `--test-args parser/raw/raw-byte-string-eof.rs`
2019-07-15T15:42:52.8469393Z error: 1 errors occurred comparing output.
2019-07-15T15:42:52.8469470Z status: exit code: 1
2019-07-15T15:42:52.8469470Z status: exit code: 1
2019-07-15T15:42:52.8470356Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/parser/raw/raw-byte-string-eof.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/parser/raw/raw-byte-string-eof" "-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/parser/raw/raw-byte-string-eof/auxiliary" "-A" "unused"
2019-07-15T15:42:52.8470983Z ------------------------------------------
2019-07-15T15:42:52.8471322Z 
2019-07-15T15:42:52.8472301Z ------------------------------------------
2019-07-15T15:42:52.8472355Z stderr:
2019-07-15T15:42:52.8472355Z stderr:
2019-07-15T15:42:52.8472566Z ------------------------------------------
2019-07-15T15:42:52.8472788Z error: unterminated raw string
2019-07-15T15:42:52.8473305Z   --> /checkout/src/test/ui/parser/raw/raw-byte-string-eof.rs:2:5
2019-07-15T15:42:52.8473491Z    |
2019-07-15T15:42:52.8473807Z LL |     br##"a"#;  //~ unterminated raw string
2019-07-15T15:42:52.8473887Z    |     ^^^^ unterminated raw string
2019-07-15T15:42:52.8474231Z help: you migh have meant to end the raw string here
2019-07-15T15:42:52.8474330Z    |
2019-07-15T15:42:52.8474674Z LL |     br##"a'##;  //~ unterminated raw string
2019-07-15T15:42:52.8474942Z 
2019-07-15T15:42:52.8475011Z error: aborting due to previous error
2019-07-15T15:42:52.8475061Z 
2019-07-15T15:42:52.8475129Z 
---
2019-07-15T15:42:52.8498583Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:535:22
2019-07-15T15:42:52.8498717Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-07-15T15:42:52.8514845Z 
2019-07-15T15:42:52.8514944Z 
2019-07-15T15:42:52.8520509Z 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-07-15T15:42:52.8521341Z 
2019-07-15T15:42:52.8521411Z 
2019-07-15T15:42:52.8535273Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-07-15T15:42:52.8535360Z Build completed unsuccessfully in 0:56:46
2019-07-15T15:42:52.8535360Z Build completed unsuccessfully in 0:56:46
2019-07-15T15:42:53.7911866Z ##[error]Bash exited with code '1'.
2019-07-15T15:42:53.7953026Z ##[section]Starting: Checkout
2019-07-15T15:42:53.7972992Z ==============================================================================
2019-07-15T15:42:53.7973102Z Task         : Get sources
2019-07-15T15:42:53.7973153Z 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)

@hellow554
Copy link
Contributor Author

@estebank do you have some time to spare?

help: you might have meant to end the raw string here
|
LL | '##;
| ^^^
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried about the '## not being "##.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, the reason for it is, that I look for #, not for "#[...]. I think I can change this.


fn main() {
m!(r#"abc"##);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add another tests with the following combinations?

macro_rules! m {
    ($tt:tt) => ()
}

 fn main() {
    m!(r#"abc"##);
}
macro_rules! m {
    ($tt:tt #) => ()
}

 fn main() {
    m!(r#"abc"#);
}

Just want us to catch any regressions in the future.

@estebank
Copy link
Contributor

@estebank do you have some time to spare?

What can I help with?

@hellow554
Copy link
Contributor Author

@estebank do you have some time to spare?

What can I help with?

Reviewing this PR ^^ Sorry, if I used the not-quite-correct terms :)

fn fail_unterminated_raw_string(&self, start: Span, hash_count: u16, spans: Vec<Span>) -> ! {
const SPAN_THRESHOLD: usize = 3;
const MSG_STR: &str = "you might have meant to end the raw string here";
let hash_str = format!("\'{}", "#".repeat(hash_count as usize));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let hash_str = format!("\'{}", "#".repeat(hash_count as usize));
let hash_str = format!("\"{}", "#".repeat(hash_count as usize));

The lexer now emits a suggestion for `cargo fix`
@hellow554
Copy link
Contributor Author

With #59706 a lot has changed. I'm not sure if I can keep up with it. :/

@Alexendoo
Copy link
Member

Ping from triage: Hi @hellow554, Have you had a chance to look at #59706?

@hellow554
Copy link
Contributor Author

@Alexendoo unfortunately no, I'm going to close this, because I don't feel like I have the time for this. Sorry to say.

@hellow554 hellow554 closed this Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error for too many trailing #s in raw string literals could be improved
9 participants