[INFO] updating cached repository https://github.com/jtianling/toc-auto-add
[INFO] running `"git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "-c" "remote.origin.fetch=refs/heads/*:refs/heads/*" "fetch" "origin" "--force" "--prune"`
[INFO] running `"git" "rev-parse" "HEAD"`
[INFO] [stdout] 95c05965d9d58cb6207521e97d5ad0fa428d3131
[INFO] checking jtianling/toc-auto-add against master#209b2be09fcaff937480d1fbbe8b31646e361c7a for pr-70917
[INFO] running `"git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjtianling%2Ftoc-auto-add" "/workspace/builds/worker-11/source"`
[INFO] [stderr] Cloning into '/workspace/builds/worker-11/source'...
[INFO] [stderr] done.
[INFO] validating manifest of git repo https://github.com/jtianling/toc-auto-add on toolchain 209b2be09fcaff937480d1fbbe8b31646e361c7a
[INFO] running `"/workspace/cargo-home/bin/cargo" "+209b2be09fcaff937480d1fbbe8b31646e361c7a" "read-manifest" "--manifest-path" "Cargo.toml"`
[INFO] started tweaking git repo https://github.com/jtianling/toc-auto-add
[INFO] finished tweaking git repo https://github.com/jtianling/toc-auto-add
[INFO] tweaked toml for git repo https://github.com/jtianling/toc-auto-add written to /workspace/builds/worker-11/source/Cargo.toml
[INFO] crate git repo https://github.com/jtianling/toc-auto-add already has a lockfile, it will not be regenerated
[INFO] running `"/workspace/cargo-home/bin/cargo" "+209b2be09fcaff937480d1fbbe8b31646e361c7a" "fetch" "--locked" "--manifest-path" "Cargo.toml"`
[INFO] [stderr] error: the lock file /workspace/builds/worker-11/source/Cargo.lock needs to be updated but --locked was passed to prevent this
[INFO] [stderr] If you want to try to generate the lock file without accessing the network, use the --offline flag.
[INFO] the lockfile is outdated, regenerating it
[INFO] running `"/workspace/cargo-home/bin/cargo" "+209b2be09fcaff937480d1fbbe8b31646e361c7a" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"`
[INFO] running `"/workspace/cargo-home/bin/cargo" "+209b2be09fcaff937480d1fbbe8b31646e361c7a" "fetch" "--locked" "--manifest-path" "Cargo.toml"`
[INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+209b2be09fcaff937480d1fbbe8b31646e361c7a" "check" "--frozen" "--all" "--all-targets"`
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] [stdout] 30e217c50a14c45bc9ea67e1534a8928188063ec467eb3e08ee0d6c7705a3137
[INFO] running `"docker" "start" "-a" "30e217c50a14c45bc9ea67e1534a8928188063ec467eb3e08ee0d6c7705a3137"`
[INFO] [stderr]     Checking toc-auto-add v0.1.0 (/opt/rustwide/workdir)
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:155:18
[INFO] [stderr]     |
[INFO] [stderr] 155 |   let mut file = try!(OpenOptions::new().read(true).open(filename));
[INFO] [stderr]     |                  ^^^
[INFO] [stderr]     |
[INFO] [stderr]     = note: `#[warn(deprecated)]` on by default
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:157:3
[INFO] [stderr]     |
[INFO] [stderr] 157 |   try!(file.read_to_string(&mut file_content));
[INFO] [stderr]     |   ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:165:10
[INFO] [stderr]     |
[INFO] [stderr] 165 |   file = try!(File::create(filename));
[INFO] [stderr]     |          ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:166:3
[INFO] [stderr]     |
[INFO] [stderr] 166 |   try!(file.write_all(file_content_with_toc.as_bytes()));
[INFO] [stderr]     |   ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:167:3
[INFO] [stderr]     |
[INFO] [stderr] 167 |   try!(file.sync_all());
[INFO] [stderr]     |   ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:155:18
[INFO] [stderr]     |
[INFO] [stderr] 155 |   let mut file = try!(OpenOptions::new().read(true).open(filename));
[INFO] [stderr]     |                  ^^^
[INFO] [stderr]     |
[INFO] [stderr]     = note: `#[warn(deprecated)]` on by default
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:157:3
[INFO] [stderr]     |
[INFO] [stderr] 157 |   try!(file.read_to_string(&mut file_content));
[INFO] [stderr]     |   ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:165:10
[INFO] [stderr]     |
[INFO] [stderr] 165 |   file = try!(File::create(filename));
[INFO] [stderr]     |          ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:166:3
[INFO] [stderr]     |
[INFO] [stderr] 166 |   try!(file.write_all(file_content_with_toc.as_bytes()));
[INFO] [stderr]     |   ^^^
[INFO] [stderr] 
[INFO] [stderr] warning: use of deprecated item 'try': use the `?` operator instead
[INFO] [stderr]    --> src/main.rs:167:3
[INFO] [stderr]     |
[INFO] [stderr] 167 |   try!(file.sync_all());
[INFO] [stderr]     |   ^^^
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]   --> src/main.rs:56:77
[INFO] [stderr]    |
[INFO] [stderr] 56 |       let title_string: &str = first_level_title_re.captures(line).unwrap().at(1).unwrap();
[INFO] [stderr]    |                                                                             ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]   --> src/main.rs:56:77
[INFO] [stderr]    |
[INFO] [stderr] 56 |       let title_string: &str = first_level_title_re.captures(line).unwrap().at(1).unwrap();
[INFO] [stderr]    |                                                                             ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]   --> src/main.rs:66:78
[INFO] [stderr]    |
[INFO] [stderr] 66 |       let title_string: &str = second_level_title_re.captures(line).unwrap().at(1).unwrap();
[INFO] [stderr]    |                                                                              ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]   --> src/main.rs:66:78
[INFO] [stderr]    |
[INFO] [stderr] 66 |       let title_string: &str = second_level_title_re.captures(line).unwrap().at(1).unwrap();
[INFO] [stderr]    |                                                                              ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]    --> src/main.rs:123:81
[INFO] [stderr]     |
[INFO] [stderr] 123 |     let title_area_string: &str = title_area_re.captures(file_content).unwrap().at(2).unwrap();
[INFO] [stderr]     |                                                                                 ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]    --> src/main.rs:123:81
[INFO] [stderr]     |
[INFO] [stderr] 123 |     let title_area_string: &str = title_area_re.captures(file_content).unwrap().at(2).unwrap();
[INFO] [stderr]     |                                                                                 ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0308]: mismatched types
[INFO] [stderr]    --> src/main.rs:131:12
[INFO] [stderr]     |
[INFO] [stderr] 118 | fn add_or_replace_toc(file_content: &str, toc: &str) -> String {
[INFO] [stderr]     |                                                         ------ expected `std::string::String` because of return type
[INFO] [stderr] ...
[INFO] [stderr] 131 |     return replaced_file_content;
[INFO] [stderr]     |            ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]     |            |
[INFO] [stderr]     |            expected struct `std::string::String`, found enum `std::borrow::Cow`
[INFO] [stderr]     |            help: try using a conversion method: `replaced_file_content.to_string()`
[INFO] [stderr]     |
[INFO] [stderr]     = note: expected struct `std::string::String`
[INFO] [stderr]                  found enum `std::borrow::Cow<'_, str>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]    --> src/main.rs:140:85
[INFO] [stderr]     |
[INFO] [stderr] 140 |     let more_comment_string: &str = more_comment_re.captures(file_content).unwrap().at(0).unwrap();
[INFO] [stderr]     |                                                                                     ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error[E0308]: mismatched types
[INFO] [stderr]    --> src/main.rs:131:12
[INFO] [stderr]     |
[INFO] [stderr] 118 | fn add_or_replace_toc(file_content: &str, toc: &str) -> String {
[INFO] [stderr]     |                                                         ------ expected `std::string::String` because of return type
[INFO] [stderr] ...
[INFO] [stderr] 131 |     return replaced_file_content;
[INFO] [stderr]     |            ^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]     |            |
[INFO] [stderr]     |            expected struct `std::string::String`, found enum `std::borrow::Cow`
[INFO] [stderr]     |            help: try using a conversion method: `replaced_file_content.to_string()`
[INFO] [stderr]     |
[INFO] [stderr]     = note: expected struct `std::string::String`
[INFO] [stderr]                  found enum `std::borrow::Cow<'_, str>`
[INFO] [stderr] 
[INFO] [stderr] error[E0599]: no method named `at` found for struct `regex::Captures<'_>` in the current scope
[INFO] [stderr]    --> src/main.rs:140:85
[INFO] [stderr]     |
[INFO] [stderr] 140 |     let more_comment_string: &str = more_comment_re.captures(file_content).unwrap().at(0).unwrap();
[INFO] [stderr]     |                                                                                     ^^ method not found in `regex::Captures<'_>`
[INFO] [stderr] 
[INFO] [stderr] error: aborting due to 5 previous errors
[INFO] [stderr] 
[INFO] [stderr] Some errors have detailed explanations: E0308, E0599.
[INFO] [stderr] For more information about an error, try `rustc --explain E0308`.
[INFO] [stderr] error: aborting due to 5 previous errors
[INFO] [stderr] 
[INFO] [stderr] Some errors have detailed explanations: E0308, E0599.
[INFO] [stderr] For more information about an error, try `rustc --explain E0308`.
[INFO] [stderr] error: could not compile `toc-auto-add`.
[INFO] [stderr] 
[INFO] [stderr] To learn more, run the command again with --verbose.
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stderr] error: could not compile `toc-auto-add`.
[INFO] [stderr] 
[INFO] [stderr] To learn more, run the command again with --verbose.
[INFO] running `"docker" "inspect" "30e217c50a14c45bc9ea67e1534a8928188063ec467eb3e08ee0d6c7705a3137"`
[INFO] running `"docker" "rm" "-f" "30e217c50a14c45bc9ea67e1534a8928188063ec467eb3e08ee0d6c7705a3137"`
[INFO] [stdout] 30e217c50a14c45bc9ea67e1534a8928188063ec467eb3e08ee0d6c7705a3137
